How gingineer95/multi-robot-exploration-and-map-merging works
Project Type & Purpose
• A ROS-based multi-robot exploration and map‐merging package written in C++/XML/YAML.
• Enables two (or more) Turtlebot3 robots to autonomously explore an environment (Gazebo or real world), build individual occupancy grids via slam_toolbox, then merge them into a single global map using map_expansion + multirobot_map_merge.
Top-Level Components
• ROS Master: central orchestrator.
• Gazebo Simulation:
• bookstore.world (worlds/)
• Robot definitions (urdf/tb3_0*.xacro, tb3_1*.xacro)
• ROS Nodes (src/):
• frontier_exploration: single_tb_FE, tb3_0_FE, tb3_1_FE (frontier goal generation & cmd_vel)
• map_expansion: aligns and pads individual maps
• multirobot_map_merge (external package, modified)
• slam_toolbox (external)
• Config (config/): global/local costmap YAMLs, mapper_params, RViz configs
• Launch Files (launch/): robot spawn, simulation setups, SLAM, exploration, merging
• Services (srv/): /tb3_0_start, /tb3_1_start for triggering exploration
Relationships & Data Flow
• Gazebo → (sensor data) → frontier_exploration & slam_toolbox
• slam_toolbox → publishes → /tb3_i/map
• frontier_exploration → waits on → /tb3_i_start service → publishes → /tb3_i/cmd_vel → Gazebo
• map_expansion node → subscribes → /tb3_i/map → publishes → expanded map topics
• multirobot_map_merge → subscribes → expanded map topics → publishes → /map (merged)
• RViz → visualizes → /tb3_0/map, /tb3_1/map, /map
Architectural Patterns & Principles
• Publish/Subscribe: decoupling via ROS topics
• Service invocation: synchronized start commands
• Namespaces for modular multi-robot support
• Configuration-driven via YAML for costmaps & SLAM parameters
• Launch orchestration for swapping between simulation and real hardware
• Pipeline design: SLAM → map expansion → map merging
• sensor → SLAM → /tb3_i/map → map_expansion → expanded_map_i
• expanded_map_i → multirobot_map_merge → /map
• frontier_exploration → /cmd_vel → Gazebo
c. Service calls: frontier_exploration client → /tb3_i_start server.
e. URDF/XACRO processing feeding Gazebo spawn.