A complete multi-robot autonomous warehouse system built on ROS2 Humble. Four AGV robots autonomously pick up and deliver items in a Gazebo-simulated warehouse, coordinated by a central Fleet Manager with conflict-free path planning.
┌─────────────────────────────────────────────────────┐
│ Fleet Manager │
│ ┌──────────────┐ ┌──────────────┐ ┌───────────┐ │
│ │Task Allocator│ │ CBS Resolver │ │ State Mgr │ │
│ │ (Hungarian / │ │ (Conflict - │ │ (Battery, │ │
│ │ Greedy) │ │ Based Search │ │ Heartbeat)│ │
│ └──────────────┘ └──────────────┘ └───────────┘ │
└──────────────────────────┬──────────────────────────┘
│ Nav2 Actions
┌────────────┬─────┼──────┬────────────┐
▼ ▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ Robot 1 │ │ Robot 2 │ │ Robot 3 │ │ Robot 4 │
│ Nav2+ │ │ Nav2+ │ │ Nav2+ │ │ Nav2+ │
│ SLAM │ │ SLAM │ │ SLAM │ │ SLAM │
└────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘
└────────────┴────────────┴────────────┘
▼
┌──────────────────┐
│ Gazebo Sim │
│ (Warehouse + │
│ AGV robots) │
└──────────────────┘
│
┌──────────────────┐
│ Web Dashboard │
│ Flask+SocketIO │
│ localhost:5000 │
└──────────────────┘
| Package | Description |
|---|---|
warehouse_msgs |
Custom ROS2 msgs, srvs, actions |
warehouse_description |
AGV URDF/Xacro, Gazebo world |
warehouse_gazebo |
Simulation launch files |
warehouse_navigation |
Nav2 + SLAM config |
fleet_manager |
Task allocation, CBS, state management |
warehouse_dashboard |
Flask+SocketIO web UI |
- ROS2 Humble
- Gazebo Classic 11
ros-humble-navigation2,ros-humble-slam-toolbox
# Install ROS2 dependencies
cd ~/multi_robot_warehouse_ws
rosdep install --from-paths src --ignore-src -r -y
# Install Python deps
pip3 install flask flask-socketio eventlet scipy numpy
# Build
colcon build --symlink-install
source install/setup.bash# Full system (Gazebo + 4 robots + Nav2 + Fleet Manager + Dashboard)
ros2 launch warehouse_gazebo full_simulation.launch.py
# Dashboard available at: http://localhost:5000# 1. Start Gazebo world
ros2 launch warehouse_gazebo warehouse_world.launch.py
# 2. Spawn all robots (in new terminal)
ros2 launch warehouse_gazebo spawn_multi_robot.launch.py
# 3. Start Nav2 (requires warehouse_map.yaml)
ros2 launch warehouse_navigation multi_nav2_bringup.launch.py
# 4. Start Fleet Manager
ros2 launch fleet_manager fleet_manager.launch.py
# 5. Start Dashboard
ros2 launch warehouse_dashboard dashboard.launch.py# Start SLAM on robot_1 and teleoperate to map the warehouse
ros2 launch warehouse_navigation slam.launch.py robot_name:=robot_1
# Drive robot_1 with keyboard
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r cmd_vel:=/robot_1/cmd_vel
# Save map when done
ros2 run nav2_map_server map_saver_cli -f src/warehouse_navigation/maps/warehouse_mapcd docker
docker-compose up --build
# Dashboard: http://localhost:5000# Via ROS2 topic
ros2 topic pub /task_requests warehouse_msgs/msg/TaskRequest \
'{task_id: "test_1", task_type: 0, pickup_zone: "loading_dock_1",
dropoff_zone: "unloading_dock_1", priority: 1,
pickup_location: {position: {x: -14.0, y: 3.0, z: 0.0}},
dropoff_location: {position: {x: 14.0, y: 3.0, z: 0.0}}}'
# Via service
ros2 service call /assign_task warehouse_msgs/srv/AssignTask \
'{task: {task_id: "test_2", task_type: 0, priority: 2,
pickup_location: {position: {x: -14.0, y: -3.0, z: 0.0}},
dropoff_location: {position: {x: 14.0, y: -3.0, z: 0.0}}}}'
# Via dashboard: http://localhost:5000- Greedy: O(n) — assigns each task to closest battery-sufficient robot
- Hungarian: O(n³) — globally optimal batch assignment
- Plan individual A* paths for each robot
- Detect spatiotemporal vertex conflicts
- Branch constraint tree (constrain robot A or B at conflict point)
- Replan with constraints until no conflicts remain
- Fallback: priority-based planning if CBS exceeds timeout
- Moving: ~0.5%/s drain → ~3.3 min runtime
- Charging: ~2%/s → ~50s to full
- Auto-dispatch to nearest free charging station at 20%
W=32m, H=22m
Loading Docks Shelves (4×5) Unloading Docks
LD1 (-14,3) R1 R2 R3 R4 UD1 (14,3)
LD2 (-14,-3) rows at x=-10,-4,4,10 UD2 (14,-3)
Charging Stations (corners):
CS1(-13,9) CS2(13,9) CS3(-13,-9) CS4(13,-9)
/fleet_status warehouse_msgs/FleetStatus @ 1Hz
/task_requests warehouse_msgs/TaskRequest
/task_results warehouse_msgs/TaskResult
/robot_X/scan sensor_msgs/LaserScan
/robot_X/odom nav_msgs/Odometry
/robot_X/cmd_vel geometry_msgs/Twist
Services:
/assign_task warehouse_msgs/srv/AssignTask
/cancel_task warehouse_msgs/srv/CancelTask
/get_robot_status warehouse_msgs/srv/GetRobotStatus
Komutlar ve kullanım kılavuzu için: COMMANDS.md