livox_camera_calib的使用

livox_camera_calib的使用

livox_camera_calib是火星实验室开发的一款的激光雷达和相机标定的算法,标定得到的参数用于进行r3live的建图,代码链接为:livox_camera_calib

1.下载&&编译

cd livox_camera_calib_ws/catkin_ws
catkin_make

2.路径修改

在calib.yaml文件中修改如下,注意都是绝对路径,并且将png和pcd文件放置于相应的文件夹,pcd和png为同一个地方同一时间的文件,不超过10s。

# Data path. adjust them!
common:
    image_file: "/home/test/lidarimu/catkin_ws/src/livox_camera_calib/data/0.png"##存放照片的地址
    pcd_file: "/home/test/lidarimu/catkin_ws/src/livox_camera_calib/data/0.pcd"##存放pcd的地址
    result_file: "/home/test/lidarimu/catkin_ws/src/livox_camera_calib/result/extrinsic.txt"##存放结果的文件

# Camera Parameters. Adjust them!
#注意修改
camera:
    camera_matrix: [1364.45, 0.0,      958.327,
                0.0,     1366.46,  535.074,
                0.0,     0.0,      1.0     ]
    dist_coeffs: [0.0958277, -0.198233, -0.000147133, -0.000430056, 0.000000]

# Calibration Parameters.!
calib:
    calib_config_file: "/home/test/lidarimu/catkin_ws/src/livox_camera_calib/config/config_outdoor.yaml"##连接的另外一个yaml的文件
    use_rough_calib: true # set true if your initial_extrinsic is bad

3.启动命令

source ~/catkin_ws/devel/setup.bash
roslaunch livox_camera_calib calib.launch

4.结果

pcd_file path:/home/test/lidarimu/catkin_ws/src/livox_camera_calib/data/0.pcd
[ INFO] [1661861080.024207677]: Sucessfully load calib config file
[ INFO] [1661861080.088885682]: Sucessfully load image!
[ INFO] [1661861080.144565487]: Sucessfully extract edge from image, edge size:99218
[ INFO] [1661861080.144599053]: Loading point cloud from pcd file.
[ INFO] [1661861104.525277856]: Sucessfully load pcd, pointcloud size: 6168000
[ INFO] [1661861104.525309529]: Building Voxel
[ INFO] [1661861147.666460708]: Extracting Lidar Edge
[ INFO] [1661861181.076330050]: Finish prepare!
Initial rotation matrix:
 0 -1  0
 0  0 -1
 1  0  0
Initial translation:0 0 0
Rough calibration min cost:0.834552
Rough calibration min cost:0.834196
Rough calibration min cost:0.833889
Rough calibration min cost:0.833497
Rough calibration min cost:0.831829
Rough calibration min cost:0.831829
Rough calibration min cost:0.831829
Rough calibration min cost:0.831829
Rough calibration min cost:0.831829
Rough calibration min cost:0.831829
Iteration:0 Dis:30 pnp size:13950
iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time
   0  5.392464e+05    0.00e+00    1.97e+06   0.00e+00   0.00e+00  1.00e+04        0    2.68e+00    2.69e+00
   1  4.558275e+05    8.34e+04    1.24e+04   9.21e-02   9.99e-01  3.00e+04        1    2.81e+00    5.50e+00
   2  4.558233e+05    4.17e+00    2.93e+01   1.12e-03   9.96e-01  9.00e+04        1    2.80e+00    8.30e+00
Ceres Solver Report: Iterations: 3, Initial cost: 5.392464e+05, Final cost: 4.558233e+05, Termination: CONVERGENCE
q_dis:0.247546 ,t_dis:0.0910649
Iteration:1 Dis:30 pnp size:13892
iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time
   0  4.111625e+05    0.00e+00    8.01e+05   0.00e+00   0.00e+00  1.00e+04        0    2.66e+00    2.67e+00
   1  3.897798e+05    2.14e+04    2.25e+03   3.01e-02   9.99e-01  3.00e+04        1    2.78e+00    5.45e+00
Ceres Solver Report: Iterations: 2, Initial cost: 4.111625e+05, Final cost: 3.897798e+05, Termination: CONVERGENCE
q_dis:0.215628 ,t_dis:0.0300071
Iteration:2 Dis:29 pnp size:13698
iter      cost      cost_change  |gradient|   |step|    tr_ratio  tr_radius  ls_iter  iter_time  total_time
   0  3.855072e+05    0.00e+00    1.21e+06   0.00e+00   0.00e+00  1.00e+04        0    2.63e+00    2.63e+00
   1  3.682016e+05    1.73e+04    1.20e+03   2.20e-02   1.00e+00  3.00e+04        1    2.75e+00    5.38e+00
Ceres Solver Report: Iterations: 2, Initial cost: 3.855072e+05, Final cost: 3.682016e+05, Termination: CONVERGENCE
q_dis:0.175368 ,t_dis:0.0218984
Iteration:3 Dis:29 pnp size:13890

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

参考

livox_camera_calib

  • 3
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值