Cartographer Mapping for LiDAR Mapping

Environment: ubuntu20.04 dual system ros: noetic
(1) Install according to the official website , the main installation includes three parts : cartographer, cartographer_ros, ceres-solver. If you install it completely according to the official website, there is no problem with the first two, but if your computer does not bypass the wall, an error will occur in the third installation, because the downloaded URL is blocked (I am because of this The reason is that the installation has been wrong, and my own ROS system has collapsed, so it is easy to get mental if there is no overturning the wall), of course, we can also download the third part separately, but we need to change the address to no For the walled github, the link is as follows: https://blog.csdn.net/rjasd1128hf/article/details/79888305
If you download it on the official website, the link is as follows: Cartographer official website download
(but I personally do not recommend this way of downloading), the following I Introduce my download method
(2) One-click download according to the download method of the domestic Yuxiang ROS collection

wget http://fishros.com/install -O fishros && bash fishros 

insert image description hereChoose 9, and then follow the required steps all the time (since the editor has already installed it, so I won’t demonstrate it anymore). After the installation is completed, open a new terminal and compile and install it in the cartographer_ws directory:

 catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash

The compilation can be completed without error, and finally open a new terminal, source /home/wy/dev/carto_ws/install_isolated/setup.bash (wy is the personal directory, pay attention to change), you can also open the .bashrc file, put the above line of code at the end, so you don’t have to re-source every time you open cartographer .
3. Test:
1. Official website test: Cartographer official website
can download a 2D and 3D package for testing
insert image description hereinsert image description hereand then compile and run
2D:

roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=/home/wy/cartographer_ws/b0-2014-07-21-12-42-53.bag

insert image description hereinsert image description here3D:

roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=/home/wy/cartographer_ws/b3-2016-03-01-13-39-41.bag

insert image description here
insert image description here
Finally, I ran it on my own radar (mine is the Silan series).
When I ran my own map, I encountered a phenomenon that my own map could not appear. The possible reason is that the lua file was not configured properly. After I opened a new terminal and installed it sudo apt install libgmock-devagain After compiling once, there is no problem after running

roslaunch rplidar_ros rplidar.launch
roslaunch cartographer_ros demo_revo_lds.launch

Turn on the rivz and start successfully.
insert image description here

Guess you like

Origin blog.csdn.net/m0_56895840/article/details/127604537