Lio-SAM mapping

1、Radar configuration

Enter the command in the terminal and press the Enter key:

Taking my car as an example, the Jetson nano's IP is 10.168.1.100 and the radar IP is 10.168.1.68, so modify it as shown in the picture below.

截屏2023-10-16 18.46.00

2、Run mapping

There are two ways to run mapping, one is online mapping and the other is offline mapping. Online mapping uses lidar scanning and mapping in real time. Offline mapping uses a bag with radar data for mapping, which can be done without radar.

Before mapping, we need to calibrate the 16-line lidar and imu. Before calibration, you need to start the imu and radar, and perform imu and radar calibration through the bag that records imu data and radar data.

 

Enter the aloam workspace through the terminal, and enter the command in the terminal to start imu and radar data. The imu I use here is Vette's 10-axis imu. It should be noted that the transmission frequency of imu needs to be 200hz:

This launch starts the radar package, as well as the data conversion package and imu package.

Then open a new terminal, enter the workspace of lio_sam, and enter the command in the terminal:

At this time, rotate the car on the x-axis, y-axis, and z-axis. After recording the data for about 1 minute, press ctrl + c in the packet recording terminal to save. The picture below shows saving the calibration data package.

截屏2023-12-05 16.40.56

Open the file (note that src is preceded by your own workspace path)

Modify the bag path you just saved as shown in the figure below

截屏2023-12-05 16.54.11

Close the vanjee_to_velodyne node and enter the command in the terminal

Wait for calibration to complete

The picture below shows the result of successful calibration.

截屏2023-12-05 17.20.20

You can see the saved calibration files in the working directory: 截屏2023-12-05 17.22.14

We open the file and take the transpose of the three-dimensional matrix in the upper left corner as the result of our calibration

截屏2023-12-05 17.24.24

Modify the values of extrinsicRot and extrinsicRPY in the lio-sam configuration file by transposing the above result.

The configuration file path of Lio-sam is (note that src is preceded by the path of the workspace):

截屏2023-12-05 17.33.30

 

  1. Online mapping

    Enter Lio-Sam's workspace through the terminal and enter the command in the terminal:

    Open a new terminal, enter Lio-Sam's workspace, and enter the command in the terminal:

    As shown in the figure below, the operation status

    截屏2023-12-05 17.49.03

    Then drive around to build the map. After the map is completed, reopen a terminal and enter the following command

    The picture below shows the saved map file截屏2023-12-05 18.01.59

    1. Offline mapping

    The difference between offline mapping and online mapping is that offline mapping uses recorded bags for mapping. We have already mentioned the method of recording the bag when calibrating it above, so we won’t go into it here. Now by default we already have the collected data bag.

    Open a new terminal, enter Lio-Sam's workspace, and enter the command in the terminal:

    Note: test.bag is a recorded bag with lidar and imu data.

Open a new terminal, enter Lio-Sam's workspace, and enter the command in the terminal

After waiting for the bag to run, you can save the map. For the method of saving the map, see the save map command of the online mapping tutorial.