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
文章来源:https://www.toymoban.com/news/detail-617612.html
参考
livox_camera_calib文章来源地址https://www.toymoban.com/news/detail-617612.html
到了这里,关于livox_camera_calib的使用的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!