[视觉惯性导航系列]相机标定工具--kalibr

前言

有很多博主推荐kalibr进行相机标定, 我参考博主 纷繁中淡定–Kalibr标定Intel D435i相机.
完成相机标定.
但是kalibr在安装过程中会出现很多令人头秃的报错信息,综合了网上好多人的方法,才完成,本文做一点记录.
本文不涉及具体使用方法,只记录编译过程中遇到的错误和解决方法.

问题及解决措施

aslam_cv_python 编译失败

编译过程中出现如下问题:

/usr/local/include/boost/python/detail/destroy.hpp:20:9: error: ‘Eigen::MatrixBase<Derived>::~MatrixBase() [with Derived = Eigen::Matrix<double, -1, 1>]’ is protected within this context
         p->~T();

Failed     << aslam_cv_python:make    

这个意思时说kalibr中一个模块aslam_cv_python 编译失败

解决方法:
两位大佬说kalibr应该使用opencv 2.4版本进行联合编译
https://www.it610.com/article/1294681263818481664.htm
https://blog.csdn.net/Ferrari_hong/article/details/82292106
详细过程参考上面两个文章就好.

error: ‘Eigen::MatrixBase

详细报错信息:

error: ‘Eigen::MatrixBase<Derived>::~MatrixBase() [with Derived = Eigen::Matrix<double, -1, 1>]’ is protected within this context

参考大佬Okonogi的回答,怀疑是egein版本不对.
报错信息与 eigen库相关,观察eigen版本,跟我之前能编译成功的电脑eigen版本一样
但是opencv 版本不一致,重新编译opencv.
需要Eigen版本和opencv版本都能对的上才行

Eigen库版本的定义在/usr/include/eigen3/Eigen/src/Core/util/Macros.h 里面。
直接打开该文件,即可知道eigen版本
利用pkg-config --modversion opencv
查看opencv版本
我的eigen库是3.3.4
我的opencv库是3.4.15
但是后来发现opencv3版本就是不行,得用下面这个方法才可

opencv重新编译的问题

../../lib/libopencv_ts.a(ts_gtest.cpp.o):在函数‘testing::internal::RE::~RE()’中:
ts_gtest.cpp:(.text._ZN7testing8internal2RED2Ev+0xf):对‘regfreeA’未定义的引用
ts_gtest.cpp:(.text._ZN7testing8internal2RED2Ev+0x18):对‘regfreeA’未定义的引用

这个当时切换各种opencv版本尝试使用,都还不行,最后还是使用2.4.13版本才一遍通过.

在编译opencv2.4.13版本过程中也会遇到问题:

错误 chamfermatching.cpp:969:30: error: the compiler can assume that the address of ‘annotate_img’...

参考https://www.cnblogs.com/rabitvision/p/7588124.html
通过修改 ./build/modules/contrib/CMakeFiles/opencv_contrib.dir/flags.make文件,删掉-Werror=address,然后重新make解决.

undefined symbol: _ZN20ddynamic_reconfigure19

错误信息:

/opt/ros/melodic/lib/nodelet/nodelet: symbol lookup error: /home/wty/d435_ws/devel/lib//librealsense2_camera.so: undefined symbol: _ZN20ddynamic_reconfigure19DDynamicReconfigureC1ERKN3ros10NodeHandleE
[camera/realsense2_camera_manager-2] process has died [pid 4162, exit code 127, cmd /opt/ros/melodic/lib/nodelet/nodelet manager __name:=realsense2_camera_manager __log:=/home/wty/.ros/log/c54b3928-c81e-11eb-a7c2-7c2a31b60314/camera-realsense2_camera_manager-2.log].
log file: /home/wty/.ros/log/c54b3928-c81e-11eb-a7c2-7c2a31b60314/camera-realsense2_camera_manager-2*.log
[camera/realsense2_camera-3] process has finished cleanly

github上的一个回答

Hi @Y-pandaman In a discussion about the symbol error involving _ZN20ddynamic_reconfigure1 it is advised that it may be caused by having more than one instance of ddynamic_reconfigure installed on your computer.

推测是ddynamic_reconfigure出现问题,需要单独编译.

D435i相机的IMU输出频率设置

d435i官方说明,加速度只有两种输出频率,63/250hz…
The D435i depth camera generates and transmits the gyro and accelerometer samples independently, as the inertial sensors exhibit different FPS rates (200/400Hz for gyro, 63/250Hz for accelerometer). Each IMU data packet is timestamped using the depth sensor hardware clock to allow temporal synchronization between gyro, accel and depth frames.

我之前还一直想着要加速度计和陀螺仪以相同频率输出,结果总是不能行,后来看了官方文档才知道这个问题.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值