LIO-SLAM测试编译

原文

  1. 下载
git clone https://github.com/tixiaoShan/LIO-SAM.git
  1. 依赖项
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
  1. 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

如果存在还是存在如下问题:

  1. 下载数据集
    这篇文章链接
  2. 修改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在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值