Mapping an environment - LCAS/bacchus_lcas GitHub Wiki
If you want to perform a mapping task in a simulation or in a real environment, you can use the gmapping
package by passing the correct parameters. This can be achieved in the following order:
- First, we need to merge front and back laserscan in a single pointcloud so to get a 360degrees view over the environment.
roslaunch bacchus_move_base corner_lasers_merger.launch
- Secondly, we can run
gmapping
which will create a temporary transformation from a globalmap
frame to our robot'sbase_link
one.
rosrun gmapping slam_gmapping scan:=/thorvald_001/scan _odom_frame:=thorvald_001/odom _base_frame:=thorvald_001/base_link
- After the environment has been mapped, we can save the map on disk with. This will generate a .pgm file and a .yaml with configuration regarding the map.
rosrun map_server map_saver -f <name_map>