- 下载
git clone https://github.com/tixiaoShan/LIO-SAM.git
- 依赖项
sudo apt-get install -y ros-kinetic-navigation --allow-unauthenticated
sudo apt-get install -y ros-kinetic-robot-localization
sudo apt-get install -y ros-kinetic-robot-state-publisher
- gstam(4.0.2 版本)下载
git clone -b 4.0.2 https://github.com/borglab/gtsam.git
修改:CMakeLists.txt 使用系统版本的Eigen
并且要保证/usr/include/eigen3 与/usr/local/include/eigen3 版本一致否则编译通过时会运行报错
set(GTSAM_USE_SYSTEM_EIGEN ON)
编译
终端无法打出大写T的问题
mkdir build
cd build
cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..
make
sudo make install
如果存在还是存在如下问题:
- 下载数据集
这篇文章链接 - 修改params.yaml(outdoor.bag为例,默认为casual_walk.bag不用修改)
rosbag info -y outdoor.bag
如下
path: outdoor.bag
version: 2.0
duration: 58.632152
start: 1574086536.184822
end: 1574086594.816974
size: 352061920
messages: 29898
indexed: True
compression: none
types:
- type: sensor_msgs/Imu
md5: 6a62c6daae103f4ff57a132d6f95cec2
- type: sensor_msgs/PointCloud2
md5: 1158d486dd51d683ce2f1be655c3c181
topics:
- topic: /imu_correct
type: sensor_msgs/Imu
messages: 29316
- topic: /points_raw
type: sensor_msgs/PointCloud2
messages: 582
修改
pointCloudTopic: "points_raw" # Point cloud data
imuTopic: "/imu_correct" # IMU data
extrinsicRot: [1, 0, 0,
0, 1, 0,
0, 0, 1]
extrinsicRPY: [ 1, 0, 0,
0, 1 , 0,
0, 0, 1]
6.测试效果如下
roslaunch lio_sam run.launch
rosbag play outdoor.bag
outdoor.bag