Welcome to EAI X3 Pro LiDAR repository
7.gmapping mapping
Gmapping mapping
This chapter needs to be used with a car chassis and other sensors to operate. This is just an explanation of the implementation method. In fact, it cannot be run. It needs to be used with the company's rosmaster-X3 car to achieve this function.
If you need to transplant it to your own motherboard, you need to install other dependency files.
1. Function description
After the program is started, control the car through the handle or keyboard.
The car will use radar scanning data during movement, use the gmapping algorithm to build a map, and save the map after the construction is completed.
The process is visualized in rviz.
2. Code path
gmapping code:
The source code of this function is located in the supporting virtual machine system.
~/rplidar_ws/src/slam_gmapping~/rplidar_ws/src/openslam_gmappinglaunch code:
The source code of this function is located in the supporting virtual machine system.
x
~/ydlidar_ws/src/yahboomcar_nav/launch3. Start up
3.1 Mapping
Input following command:
xxxxxxxxxxros2 launch yahboomcar_nav map_gmapping_launch.py
3.2 Save map
Input following command:
xxxxxxxxxxros2 launch yahboomcar_nav save_map_launch.py
The map saving path is as follows:
x
~/ydlidar_ws/src/yahboomcar_nav/mapsThere is a .pgm image and a .yaml file.
The contents of the yaml file are as follows: