安装kalibr
参考
https://zhuanlan.zhihu.com/p/309287821
出现了C++17兼容性的问题,修改对应的CMAKELists,加上
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -w")
出现了一些opencv版本导致的编译问题,逐个去修改就好
遇到了一些python问题,参考
如果pip安装python-igraph失败就用apt-get insatll
error code: ImportError: dynamic module does not define module export function (PyInit_libnumpy_eigen)
https://blog.csdn.net/weixin_44049220/article/details/124690787
过程参考
http://zhaoxuhui.top/blog/2020/09/29/intel-realsense-D435i-calibration-kalibr.html
https://blog.csdn.net/heyijia0327/article/details/83583360
运行双目bag中发生的错误
Cameras are not connected through mutual observations, please check the dataset. Maybe adjust the approx. sync. tolerance.
我调整了image topic的发布频率为20HZ(单目时用4HZ),注释一部分python代码,详细见github issue
https://github.com/ethz-asl/kalibr/issues/332
具体流程
//启动相机
roslaunch realsense2_camera rs_camera_copy.launch
//查看
rqt_image_view
//修改发布信息
rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 20.0 /left
rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 20.0 /right
//录制rosbag,ctrl+c结束录制
rosbag record -O stereo_calibra.bag /left /right
//到kalibrworkspace
//source
rosrun kalibr kalibr_calibrate_cameras --bag stereo_calibra.bag --topics /left /right --models pinhole-equi pinhole-equi --target april_6x6.yaml --show-extractio --approx-sync 0.04