cartographer 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 while moving, use the cartographer algorithm to build a map, and save the map after the construction is completed.

2. Install cartographer

Taking ros2-foxy as an example, input following command:

3. Code path

The source code of this function is located in the supporting virtual machine system.

4. Start up

4.1 Mapping

Input following command:

4.2 Save map

Input following command:

The map saving path is as follows:

There is a .pgm image and a .yaml file.

The contents of the yaml file are as follows:

Parameter analysis:

5. Code analysis

map_cartographer_launch.py

laser_bringup_launch.py starts the radar chassis,

cartographer_launch.py starts gmapping mapping related nodes.

cartographer_launch