一、ros自带标定程序
1、程序安装启动
1.流程
(1)安装camera_calibration
sudo apt-get install ros-noetic-camera-calibration
(2)启动ros主节点
roscore
(3)新终端启动相机节点
cd ~/桌面/Project/rtsp_ws
roslaunch rocon_rtsp_camera_relay rtsp_camera_relay.launch --screen
(4)新终端运行标定程序
rosrun camera_calibration cameracalibrator.py --size 11x8 --square 0.06 image:=/rtsp_camera_relay/image camera:=/camera --no-service-check
2.错误记录
- ImportError: /lib/libgdal.so.26: undefined symbol: TIFFReadRGBATileExt, version LIBTIFF_4.0
Exception in thread Thread-4:
Traceback (most recent call last):
File "/home/chen/anaconda3/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/opt/ros/noetic/lib/python3/dist-packages/camera_calibration/camera_calibrator.py", line 107, in run
self.function(m)
File "/opt/ros/noetic/lib/python3/dist-packages/camera_calibration/camera_calibrator.py", line 188, in handle_monocular
drawable = self.c.handle_msg(msg)
File "/opt/ros/noetic/lib/python3/dist-packages/camera_calibration/calibrator.py", line 945, in handle_msg
gray = self.mkgray(msg)
File "/opt/ros/noetic/lib/python3/dist-packages/camera_calibration/calibrator.py", line 351, in mkgray
if self.br.encoding_to_dtype_with_channels(msg.encoding)[0] in ['uint16', 'int16']:
File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels
return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding))
File "/opt/ros/noetic/lib/python3/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2
from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: /lib/libgdal.so.26: undefined symbol: TIFFReadRGBATileExt, version LIBTIFF_4.0
QObject::moveToThread: Current thread (0xfa3730) is not the object's thread (0x7fd748085950).
Cannot move to target thread (0xfa3730)
解决办法:先运行下面代码
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtiff.so.5
参考:https://www.ngui.cc/article/show-922806.html?action=onClick
2、标定过程
界面打开后没有X、Y按钮,因为标定板还没有进入画面
移动标定板,采集足够数据后点击标定、保存。
具体要求依照参考链接来进行。
二、Autoware相机内参标定
1、安装autoware.ai
链接: ubuntu20.04镜像方法安装Autoware.ai
没有继续,待补充