I used multirobot_map_merge package to merge maps from two robots simulated in Stage robot simulator.
Move into ~/catkin_ws/src
directory and clone this repository in a folder called ca_mapping
by running following command:
git clone https://github.com/umerjamil16/multirobot-map-merge.git ca_mapping
Now, run
roscore
And source the .bash
file.
source ~/.bashrc
source ~/catkin_ws/devel/setup.bash
- To launch Rviz,
.world
file in Stage and broadcast respective TFs:
roslaunch ca_mapping main.launch
- To launch
gmapping
node:
roslaunch ca_mapping gmapping_3.launch
- To launch
multirobot_map_merge_package
:
roslaunch ca_mapping map_merge.launch
-
To change the position of the robots, run the following command in a terminal:
rosrun teleop_twist_keyboard teleop_twist_keyboard.py cmd_vel:=/robot_N/cmd_vel
-
Move into maps directory and save the merged map by:
rosrun map_server map_saver -f FILENAME map:=/map_merged_1
- To provide the saved merged map:
roslaunch ca_mapping provide_merged_map.launch
To manually launch a .world
file in Stage, move into world directory of this repository and run:.
rosrun stage_ros stageros island.world
For TFs visualization:
rosrun rqt_tf_tree rqt_tf_tree