https://github.com/96syh/multi-vehicle-formation-system
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.6%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: 96syh
- License: mit
- Language: Python
- Default Branch: main
- Size: 56.6 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Multi-Vehicle Formation Control System 🚁
✨ Features
🎯 Core Capabilities
- Multiple Formation Types: Line, V-shape, Diamond, Circle formations
- Intelligent Algorithms: Artificial potential field, consensus-based control
- Obstacle Avoidance: Dynamic window approach (DWA) integration
- Real-time Visualization: Interactive matplotlib interface with live parameter adjustment
- Multi-platform Support: Standalone Python, ROS2, and embedded systems
🔧 Technical Highlights
- Physics-based Simulation: Gazebo-compatible vehicle dynamics
- Distributed Control: Decentralized formation algorithms
- Interactive UI: Real-time parameter tuning and visualization
- Hardware Ready: STM32 embedded system integration
- Scalable Architecture: Support for 2-20+ vehicles
🚀 Quick Start
Prerequisites
```bash
Python dependencies
pip install numpy matplotlib
For ROS2 integration (optional)
sudo apt install ros-humble-desktop sudo apt install ros-humble-ros-gz ```
Standalone Simulation
```bash
Clone the repository
git clone https://github.com/yourusername/multi-vehicle-formation-system.git cd multi-vehicle-formation-system
Run interactive demo
python runformationdemo.py
Or run directly with parameters
python formationsimulationstandalone.py -n 6 -f v_shape --auto-start ```
ROS2 + Gazebo Simulation
```bash
Build and run with Ignition Gazebo
./scripts/buildandrun_ignition.sh -n 8 -f diamond ```
🎮 Demo
Interactive Simulation Interface

Controls: - 🖱️ Double-click: Set new target position - 🎛️ Right Panel: Adjust formation type and parameters - ⏯️ Buttons: Start/pause/reset simulation - 📊 Real-time Info: Live formation error and status display
Formation Types
| Formation | Description | Best Use Case | |-----------|-------------|---------------| | 🔹 Line | Vehicles in straight line | Highway convoy | | 🔸 V-Shape | V formation with leader | Aerial formations | | 💎 Diamond | Diamond/rhombus pattern | Defensive positions | | ⭕ Circle | Circular formation | Area patrol |
📁 Project Structure
multi-vehicle-formation-system/
├── 🎯 formation_simulation_standalone.py # Main standalone simulation
├── 🎮 run_formation_demo.py # Interactive demo launcher
├── 📚 docs/ # Documentation
│ ├── algorithm_design.md # Algorithm details
│ ├── parameter_tuning.md # Parameter guide
│ └── ignition_gazebo_guide.md # ROS2/Gazebo setup
├── 🤖 ros2_workspace/ # ROS2 integration
│ └── src/multi_vehicle_formation/ # ROS2 package
├── 🔧 scripts/ # Build and run scripts
├── 💻 embedded_system/ # STM32 embedded code
└── 🧪 tests/ # Test framework
📖 Documentation
Algorithm Design
The system implements multiple formation control algorithms:
- 🧲 Artificial Potential Field: Attractive and repulsive forces for formation keeping
- 🤝 Consensus-based Control: Distributed coordination between vehicles
- 🚧 Obstacle Avoidance: Dynamic window approach for collision-free navigation
- ⚖️ Formation Transitions: Smooth transitions between different formations
Key Parameters
```python
Formation control gains
katt = 1.0 # Attraction to target
krep = 2.0 # Repulsion from neighbors
kform = 1.5 # Formation constraint force
kobstacle = 3.0 # Obstacle avoidance force
Physical constraints
maxspeed = 2.0 # m/s maxacceleration = 1.0 # m/s² influence_radius = 3.0 # meters ```
🛠️ Development
Architecture Overview
mermaid
graph TD
A[Vehicle Sensors] --> B[Formation Controller]
B --> C[Path Planner]
C --> D[Vehicle Actuators]
B --> E[Visualization]
F[User Interface] --> B
G[Parameter Tuning] --> B
Adding New Formations
- Define Formation Pattern: Add new formation type in
FormationController.generate_formation_positions() - Update UI: Add to formation selection in control panel
- Test: Run with new formation type
```python
Example: Adding triangular formation
elif self.formationtype == "triangle": # Define triangle vertices positions[0] = [0, formationscale] # Top positions[1] = [-formationscale, -formationscale] # Bottom left positions[2] = [formationscale, -formationscale] # Bottom right ```
Performance Optimization
- Real-time Factor: Adjustable simulation speed (0.1x - 3.0x)
- Update Frequency: 50Hz physics, 30Hz visualization
- Scalability: Tested with up to 20 vehicles
- Memory Usage: ~50MB for 10-vehicle simulation
🧪 Testing
```bash
Run unit tests
python -m pytest tests/
Formation convergence test
python tests/testformationconvergence.py
Performance benchmark
python tests/benchmark_performance.py ```
🚀 Deployment
Embedded Systems (STM32)
```bash
Compile for STM32F4
cd embeddedsystem ./compilestm32.sh ./flash_firmware.sh ```
ROS2 Integration
```bash
Build ROS2 workspace
cd ros2_workspace colcon build source install/setup.bash
Launch full simulation
ros2 launch multivehicleformation simulation.launch.py ```
📊 Performance Metrics
| Metric | Value | Unit | |--------|-------|------| | Formation Error | < 0.1 | meters | | Convergence Time | 5-15 | seconds | | Update Rate | 50 | Hz | | Max Vehicles | 20+ | count | | CPU Usage | < 30% | single core |
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
```bash
Clone with submodules
git clone --recursive https://github.com/yourusername/multi-vehicle-formation-system.git
Install development dependencies
pip install -r requirements-dev.txt
Run pre-commit hooks
pre-commit install ```
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- ROS2 Community for excellent robotics framework
- Gazebo Team for physics simulation engine
- NumPy/Matplotlib for scientific computing and visualization
- Formation Control Research community for algorithmic foundations
📞 Support
- 📧 Email: mrsong96sy@outlook.com
- 💬 Discussions: GitHub Discussions
- 🐛 Issues: GitHub Issues
- 📖 Wiki: Project Wiki
Owner
- Login: 96syh
- Kind: user
- Repositories: 1
- Profile: https://github.com/96syh
GitHub Events
Total
- Push event: 1
- Create event: 1
Last Year
- Push event: 1
- Create event: 1
Dependencies
- argparse *
- dataclasses *
- matplotlib >=3.5.0
- numpy >=1.20.0