lio-mapping使用

直接下载lio-mapping的包下来,然后按照教程操作可以测试:

  1. source devel/setup.zsh, or setup.bash if your prefer bash.
  2. roslaunch lio test_indoor.launch &.
  3. roslaunch lio map_4D_indoor.launch &.
  4. rosbag play fast1.bag.

lio-mapping订阅的topic为:

/imu/data and /velodyne_points

但是当我们使用自己的bag测试时没有反应,然后看config文件中

# Extrinsic parameter between IMU and Camera (adapted from VINS-mono)
estimate_extrinsic: 2   # 0  Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
                        # 1  Have an initial guess about extrinsic parameters. We will optimize around your initial guess.
                        # 2  Don't know anything about extrinsic parameters. You don't need to give R,T. We will try to calibrate it. Do some rotation movement at beginning.

这个参数有点猫腻,原来他参考VINS那样自动优化得到IMU和Lidar的外参,那我们这里要求也不高,直接把它设成0即可,意思是按照我们给定的外参,不需要他自动优化。

当以为万事大吉时,又出现了一个报错

kyle@kyle:~/ros/kyle_ws$ roslaunch lio test_outdoor.launch 
... logging to /home/kyle/.ros/log/3d72b450-9c26-11eb-a769-08d23ee82e11/roslaunch-kyle-29747.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://kyle:35815/

SUMMARY
========

PARAMETERS
 * /lio_estimator/config_file: /home/kyle/ros/ky...
 * /lio_processor/rad_diff: 0.2
 * /rosdistro: melodic
 * /rosversion: 1.14.9

NODES
  /
    lio_estimator (lio/lio_estimator_node)
    lio_processor (lio/lio_processor_node)

ROS_MASTER_URI=http://localhost:11311

process[lio_processor-1]: started with pid [29765]
process[lio_estimator-2]: started with pid [29766]
I0413 15:32:54.060197 29765 processor_node.cc:81] Sensor type: 16
[ INFO] [1618299186.991712059]: IMU excitation not enough!
[ INFO] [1618299187.289841677]: IMU excitation not enough!
[ INFO] [1618299187.595478036]: IMU excitation not enough!
[ INFO] [1618299187.877556615]: IMU excitation not enough!
[ INFO] [1618299188.157275748]: IMU excitation not enough!
[ INFO] [1618299188.512538281]: IMU excitation not enough!
[ INFO] [1618299188.775213906]: IMU excitation not enough!
[ INFO] [1618299189.085436131]: IMU excitation not enough!
[ INFO] [1618299189.364731832]: IMU excitation not enough!
[ INFO] [1618299189.714636491]: IMU excitation not enough!
[ INFO] [1618299189.986467154]: IMU excitation not enough!
[ INFO] [1618299190.287896602]: IMU excitation not enough!
[ INFO] [1618299190.602215905]: IMU excitation not enough!
[ INFO] [1618299190.880124531]: IMU excitation not enough!

IMU励磁不足?什么鬼?查了一下,好像是初始启动时运动要足够剧烈才可以,但是我们这个是录好的数据包,没办法改呢,那我们改代码算了,直接把代码里这的判断注释掉:

    if (var < 0.25) {
      ROS_INFO("IMU excitation not enough!");
      return false;
    }

重新编译即可使用

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值