A comprehensive ROS2 workspace for multi-robot control of Boston Dynamics Spot robots with advanced localization, point cloud processing, and distributed communication capabilities.
This workspace integrates multiple robotics components to enable coordinated control of multiple Spot robots:
- Multi-Spot Control: Coordinate multiple Boston Dynamics Spot robots
- Fiducial-Based Localization: GraphNav with ICP-enhanced point cloud registration
- Distributed Communication: Zenoh-based networking for robot coordination
- Docker Support: Containerized deployment for consistent environments
- Unity Integration: ROS# communication bridge for visualization and simulation
The system consists of several key components:
- Spot ROS2: Official Boston Dynamics ROS2 driver for Spot robots
- Spot Multi: Custom multi-robot coordination package with ICP localization
- Small GICP: Fast point cloud registration library
- ROS Sharp: Communication bridge between ROS2 and Unity/C# applications
- Zenoh Router: Distributed networking for multi-robot communication
- Docker and Docker Compose
- Valid Spot robot credentials
- Network access to Spot robots
git clone --recursive <repository-url>
cd spot_ros2_multi_wsCreate configuration files in the secrets/ directory:
# Copy example configs and edit with your robot details
cp src/spot_multi/configs/spot_gouger.yaml secrets/
cp src/spot_multi/configs/spot_tusker.yaml secrets/Edit the YAML files with your robot IP addresses, usernames, and passwords.
# Start all services
docker-compose up -d
# Access the ROS2 container
docker exec -it ros2_ws bash
# Inside container, source and launch
source install/setup.bash# Install ROS2 dependencies
rosdep install --from-paths src --ignore-src -r -y
# build the package
colcon build --symlink-install
# launch these commands
./launch_multi_spot.sh- Ubuntu 22.04 with ROS2 Humble
- Python 3.8+
- Git with submodule support
mkdir -p ~/spot_ros2_multi_ws/src
cd ~/spot_ros2_multi_wsgit clone --recursive <repository-url> .# Install ROS2 dependencies
rosdep install --from-paths src --ignore-src -r -y
# Install Python dependencies
cd src/spot_ros2/ && ./install_spot_ros2.shcolcon build --symlink-install./launch_multi_spot.shwill launch everything in a tmux workspace. To learn about each command, read below.
Place robot-specific configuration files in ~/spot_configs/ in the container or secrets/ directory under host machine if using docker.
The Zenoh router is still under progress.
Edit zenoh-config.json5 to configure distributed networking:
{
"mode": "router",
"connect": {
"endpoints": ["tcp/your-central-router:7447"]
},
"listen": {
"endpoints": ["tcp/0.0.0.0:7447", "udp/0.0.0.0:7447"]
}
}ros2 launch spot_driver spot_driver.launch.py config_file:=$HOME/spot_configs/spot_gouger.yamlros2 launch spot_driver spot_driver.launch.py config_file:=$HOME/spot_configs/spot_tusker.yamlros2 launch file_server2 ros_sharp_communication.launch.pyros2 launch spot_multi spot_multi.launch.py/multi_spot/cmd_vel- Coordinated velocity commands/spot_tf_compute- ICP-enhanced localization/gouger/lidar/points- Point cloud data from Gouger/tusker/lidar/points- Point cloud data from Tusker
# Build only spot_multi package
colcon build --packages-select spot_multi
# Build with debug symbols
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug-
Robot Connection Failed
- Verify IP addresses in configuration files
- Check network connectivity to robots
- Confirm credentials are correct
-
ICP Registration Poor
- Ensure sufficient point cloud overlap
- Check velodyne sensor configuration
- Verify robot positioning
-
Unity Communication Issues
- Confirm ROS# bridge is running
- Check firewall settings
- Verify network ports are open
# View ROS2 logs
ros2 log list
ros2 log view <node_name>
# Docker logs
docker-compose logs ros2_ws
docker-compose logs zenoh_routerThis project integrates multiple open-source components. See individual package licenses in their respective directories.