RTAB-Map 3D mapping navigation

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 Yahboom RDK-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. Install RTAB-MAP

For example, using ROS2 box, input following command:

3.Mapping

Input following command:

Note: This mapping algorithm requires a bit of high hardware requirements, and some motherboards may get stuck. It is recommended to configure a virtual machine and run the RTAB-MAP algorithm on the virtual machine.

image-20231109181632879

4. Save map

After completing the mapping, press 【 ctrl+c 】 to exit the mapping node, and the system will automatically save the map.

The default path for saving maps is [~/. ros/rtabmap. db].

5. Navigation

Input following command:

Navigation can be divided into single point navigation and multi-point navigation.

Click on the 2D Pose Estimate on rviz, then compare the pose of the car and mark the initial pose of the car on the map.

image-20231109181958488

By comparing the overlap between the radar scanning points and obstacles, the initial pose of the car can be set multiple times until the radar scanning points roughly overlap with the obstacles.

After setting the initial pose, you can click on 【 2D Goal Pose 】 to set a navigation target point, and the car will start single point navigation,

image-20231109182053989

After setting the initial pose, you can click on the [Panels] in the upper left corner of rviz ->select [Navigation 2], and the [Navigation 2] panel will be displayed.

image-20231109182231866

image-20231109182251468

Click on the Waypoint mode in the above image, then click on the Navigation2 Goal on rviz to mark a target point on the map.

Click on Navigation2 Goal again to mark the second target point on the map.

By looping through, multiple target points can be marked at once.

image-20231109182332025

After marking multiple target points, click on 【 Start Navigation 】 to start multi-point navigation.

After completing the multi-point navigation, the car will remain in the position of the last target point.

image-20231109182358052