- ROS2 installed (tested with ROS2 Humble/Foxy)
- TurtleBot3 simulation dependencies installed
- A properly configured ROS2 workspace (
<ros2_ws>)
-
Navigate to your workspace source directory:
cd <ros2_ws>/src
-
Clone the repository:
git clone https://github.com/VedantC2307/MultiRobotProject-Private
-
Build the workspace:
cd <ros2_ws> colcon build --symlink-install
If you encounter any errors, try building again:
colcon build --symlink-install
Open a terminal and run the following commands to launch the multi-robot simulation with SLAM:
export TURTLEBOT3_MODEL=waffle
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/${ROS_DISTRO}/share/turtlebot3_gazebo/models
ros2 launch multirobot_map_merge multi_tb3_simulation_launch.py slam_gmapping:=TrueIn a second terminal, source the workspace and start the random walk exploration node for robot 1:
source <ros2_ws>/install/setup.bash
ros2 run multi_robot_explore multi_robot_random_walk_robot1 --ros-args --params-file ./src/multi_robot_explore/config/robot_params.yamlOpen third terminal, source the workspace and start the random walk exploration node for robot 2:
source <ros2_ws>/install/setup.bash
ros2 run multi_robot_explore multi_robot_random_walk_robot2 --ros-args --params-file ./src/multi_robot_explore/config/robot_params.yamlIn a forth terminal, launch the map merge node to combine the maps from multiple robots:
ros2 launch multirobot_map_merge map_merge.launch.pyIn a fivth terminal, launch RViz for visualization:
rviz2 -d <ros2_ws>/src/m-explore-ros2/map_merge/launch/map_merge.rviz