一、建图
1.源码下载
https://github.com/hku-mars/FAST_LIO
2.配置环境
步奏一:安装PCL >= 1.8, PCL的安装可以参考 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
下载pcl1.8 https://github.com/Kyle-ak/pcl/releases/tag/pcl-1.8.0 进行漫长时间编译
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
步奏二: Eigen >= 3.3.4,
--下载路径
https:
--编译
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、编译fast-lio包
用git下载源码时,不使用git clone 时,nclude中ikd-Tree文件夹是空的,因为源码git提供了一个git链接,可以自己去下,fast-lio2一大创新就在于使用了ikd-Tree来维护大量的地图点。 第一步:下载链接fast-lio https://github.com/hku-mars/FAST_LIO 下载链接kdtree链接 https://github.com/hku-mars/ikd-Tree
第二步:将下载的完整fast-lio放到创建的工作空间catkin_ws/src路径下,运行
catkin_make
出现一些库问题参考https://blog.csdn.net/qin__han/article/details/123409914解决
第三步:配置文件: 1、修改FAST_LIO\src\FAST_LIO\config\velodyne.yaml 话题对应设置
common:
lid_topic: "/velodyne_points"
imu_topic: "/imu/data"
激光雷达配置
preprocess:
lidar_type: 2 # 1 表示Livox 雷达, 2 表示Velodyne 雷达, 3 表示ouster 雷达
scan_line: 32 # 32线
scan_rate: 10 # velodyne 频率, unit: Hz,
IMU和lidar相对外参、
extrinsic_T: [ 0, 0, 0]
extrinsic_R: [ 1, 0, 0,
0, 1, 0,
0, 0, 1]
# 我的参数是因为IMU在lidar的正上方位置
|