-
Notifications
You must be signed in to change notification settings - Fork 0
Mapping
Mapping in both simulation and physically. There are different configurations for both scenarios. Mapping done with gmapping. Mapping with Google's cartographer system is still a TODO and a future tentative implementation.

To map solely in the Gazebo simulation, specify the world argument in the following launch command:
roslaunch macbot_gazebo default.launch world:=maze rviz_config:=mapping
In a separate tab, start the gmapping node so that can begin to build the map:
roslaunch macbot_navigation gmap.launch
To drive the robot in simulation with teleop, launch the following in the third tab:
roslaunch macbot_gazebo teleop.launch
When you're done mapping, save your map with the following command:
rosrun map_server map_saver -f ~/catkin_ws/src/macbot/macbot_navigation/map/map_name
Saved map file (.pgm) will look something as follows:
To map with the actual MacBot, we'll launch the following:
roslaunch macbot_navigation gmap_macbot.launch
And then we'll drive the robot around to map the environment:
roslaunch macbot_physical diff_drive.launch
Save the map with the map_server node:
rosrun map_server map_saver -f ~/catkin_ws/src/macbot/macbot_navigation/map/map_name
If we want to localize ourselves in the map we just created, we'll use the amcl package. Run the following:
roslaunch macbot_navigation localization.launch map_arg:=map_name