1. Mapping
1. Source code download
https://github.com/hku-mars/FAST_LIO
2. Configure the environment
Step 1: Install PCL >= 1.8, PCL installation can refer to
https://blog.csdn.net/qq_33328642/article/details/119186766
sudo apt-get update
sudo apt-get install git build-essential linux-libc-dev
sudo apt-get install cmake cmake-gui
sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev
sudo apt-get install mpi-default-dev openmpi-bin openmpi-common
sudo apt-get install libflann1.9 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
1 sudo apt-get install libvtk7.1-qt libvtk7.1 libvtk7-qt-dev
--如果上面1报错,先运行下面指令
sudo apt-get install libvtk7-jni
--再重新运行,如果1正常则不需要运行sudo apt-get install libvtk7-jni
sudo apt-get install libqhull* libgtest-dev
sudo apt-get install freeglut3-dev pkg-config
sudo apt-get install libxmu-dev libxi-dev
sudo apt-get install mono-complete
sudo apt-get install openjdk-8-jdk openjdk-8-jre
Download pcl1.8
https://github.com/Kyle-ak/pcl/releases/tag/pcl-1.8.0
for long time compilation
cd pcl-1.8
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_GPU=ON-DBUILD_apps=ON -DBUILD_examples=ON \ -DCMAKE_INSTALL_PREFIX=/usr ..
make -j8
sudo make install
Step 2: Eigen >= 3.3.4 ,
--下载路径
https://github.com/eigenteam/eigen-git-mirror/archive/3.3.7.tar.gz true
--编译
cd eigen-git-mirror
mkdir build
cd build
cmake ..
sudo make install
-- 添加链接
sudo cp -r /usr/local/include/eigen3 /usr/include/eigen3
sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eigen
3. Compile the fast-lio package
When using git to download the source code, when git clone is not used, the ikd-Tree folder in include is empty, because the source code git provides a git link, which can be downloaded by yourself. A major innovation of fast-lio2 is the use of ikd-Tree. to maintain a large number of map points.
The first step: download link fast-lio
https://github.com/hku-mars/FAST_LIO
download link kdtree link
https://github.com/hku-mars/ikd-Tree
Step 2: Put the downloaded complete fast-lio in the created workspace catkin_ws/src path, run
catkin_make
For some library problems, please refer to https://blog.csdn.net/qin__han/article/details/123409914 to solve
Step 3: Configuration file:
1. Modify the FAST_LIO\src\FAST_LIO\config\velodyne.yaml
topic corresponding settings
common:
lid_topic: "/velodyne_points"
imu_topic: "/imu/data"
Lidar configuration
preprocess:
lidar_type: 2 # 1 表示Livox 雷达, 2 表示Velodyne 雷达, 3 表示ouster 雷达
scan_line: 32 # 32线
scan_rate: 10 # velodyne 频率, unit: Hz,
IMU and lidar are relatively external parameters,
extrinsic_T: [ 0, 0, 0]
extrinsic_R: [ 1, 0, 0,
0, 1, 0,
0, 0, 1]
# 我的参数是因为IMU在lidar的正上方位置