Open
Conversation
Owner
|
This is impressive work! Is this part of a school project? These changes are too large for me to add them to orca4. They should stand alone as a new work. I have added a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multi-AUV Formation Simulation
This setup extends the Orca4 AUV simulation to support 3 AUVs flying in formation. AUV1 acts as the leader, while AUV2 and AUV3 automatically follow in a triangular formation.
Features
AUV Configuration
Port Assignments
Formation Layout
Usage
1. Build the Docker Image
cd /home/udy/orca4/docker ./build.sh2. Launch the Multi-AUV Simulation
This will start:
3. Control the Formation
The formation controller automatically manages AUV2 and AUV3 to follow AUV1. You can control the entire formation by sending commands to AUV1.
Option A: Manual Control
Send velocity commands to AUV1:
Option B: Automated Mission
Run a pre-programmed formation mission:
4. Monitor the AUVs
RViz Visualization
The custom RViz configuration shows:
Camera Feeds
Individual camera topics:
/auv1/stereo_left,/auv1/stereo_right/auv2/stereo_left,/auv2/stereo_right/auv3/stereo_left,/auv3/stereo_rightTrajectory Paths
Real-time path visualization:
/auv1/path(Magenta)/auv2/path(Green)/auv3/path(Blue)5. Advanced Usage
Individual AUV Control
You can also control followers individually if needed:
Formation Parameters
The formation controller can be tuned by modifying:
formation_distance: Distance followers stay behind leader (default: 3.0m)formation_offset: Lateral separation of followers (default: 2.0m)kp_linear,kp_angular: Control gainsmax_linear_speed,max_angular_speed: Speed limitsFile Structure
New Model Files
orca_description/models/auv1/- AUV1 model with port 9002orca_description/models/auv2/- AUV2 model with port 9012orca_description/models/auv3/- AUV3 model with port 9022orca_description/worlds/multi_auv_sand.world- World with 3 AUVsNew Launch Files
orca_bringup/launch/multi_auv_sim_launch.py- Main multi-AUV launcherorca_bringup/launch/multi_auv_bringup.py- Coordinates all AUV nodesNew Parameter Files
orca_bringup/params/auv1_mavros_params.yaml- MAVROS config for AUV1orca_bringup/params/auv2_mavros_params.yaml- MAVROS config for AUV2orca_bringup/params/auv3_mavros_params.yaml- MAVROS config for AUV3orca_bringup/params/auv1_orca_params.yaml- Orca config for AUV1orca_bringup/params/auv2_orca_params.yaml- Orca config for AUV2orca_bringup/params/auv3_orca_params.yaml- Orca config for AUV3New Scripts
orca_base/scripts/formation_controller.py- Formation control logicorca_base/scripts/multi_auv_path_publisher.py- Trajectory visualizationorca_base/scripts/formation_mission_runner.py- Example missionNew Configuration
orca_bringup/cfg/multi_auv_sim_launch.rviz- RViz config for multi-AUVTroubleshooting
AUVs Not Following Formation
ros2 node list | grep formationros2 topic list | grep odometryMissing Camera Feeds
ros2 node list | grep image_bridgeros2 topic list | grep stereoArduSub Connection Issues
ros2 topic list | grep mavrosTF Transform Issues
If you see warnings like "No transform from [auvX/base_link] to [map]" in RViz:
Wait for initialization: These warnings are normal during the first 10-15 seconds as the system initializes.
Check TF status: Use the quick TF checker:
Verify static transforms: Ensure all static transform publishers are running:
ros2 node list | grep static_transform_publisherCheck base controller status: The base controllers need some time to initialize:
The TF tree structure for each AUV should be:
Recent Fixes Applied
Check the TF tree: Run the TF tree checker:
Verify static transforms: Ensure all static transform publishers are running:
ros2 node list | grep static_transform_publisherCheck base controller status: The base controllers need static transforms to initialize:
The TF tree structure for each AUV should be:
Most TF warnings resolve within 10-15 seconds as the system initializes and the base controllers start publishing dynamic transforms.
Performance Issues
Extending the System
Adding More AUVs
auv4/)Custom Formation Patterns
Modify
formation_controller.pyto implement:Mission Planning
Extend
formation_mission_runner.pywith:This multi-AUV setup provides a comprehensive platform for testing formation control, cooperative behaviors, and multi-vehicle coordination in underwater environments.