当前位置:网站首页>kalibr标定realsenseD435i --多相机标定
kalibr标定realsenseD435i --多相机标定
2022-07-26 22:08:00 【萌褚】
镜像下载、域名解析、时间同步请点击 阿里云开源镜像站
kalibr标定板(棋盘格)用师兄的(长这样)

步骤一:建立的ROS中的Kalibr的工作空间,建立一个名为:checkerboard.yaml的文件,内容为:
target_type: 'checkerboard' targetCols: 11 //内角的个数 targetRows: 8 colSpacingMeters: 0.02 rowSpacingMeters: 0.02 步骤二:启动关闭结构光
默认开始结构光时,双目图像会有很多点,这些点可能对标定有影响,所以使用时需要关闭结构光。
先在终端启动
roslaunch realsense2_camera rs_camera.launch新打开终端,运行
rosrun rqt_reconfigure rqt_reconfigure打开后将camera->stereo_module中的emitter_enabled设置为off(0)
步骤三:确定realsense D435i放在合适位置
新打开终端,运行rviz
rviz在rviz中将Global Option中的Fixed Frame后面选择camera_link
点击Add在topic中分别选择
/camera/color/image_raw、/camera/infra1/image_rect_raw、/camera/infra2/image_rect_raw,打开(双击camera)即添加成功。
之后对准标定板,尝试移动realsense D435i,同时要确保标定板一直在三个图像当中,如下图

步骤四:修改相机帧数(官方推荐是4Hz,尽管实际频率不完全准确,但是不影响结果)
kalibr在处理标定数据的时候要求频率不能太高,一般为4Hz,我们可以使用如下命令来更改topic的频率,实际上是将原来的topic以新的频率转成新的topic,实际测试infra1才是对应左目相机。
使用Ctrl+shift+T,打开新的终端,一个终端运行一个,分别运行
rosrun topic_tools throttle messages /camera/color/image_raw 4.0 /color rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 4.0 /infra_left rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 4.0 /infra_right步骤五:录制ROS数据包
使用Ctrl+shift+T,打开另一个新的终端运行:
rosbag record -O multicameras_calibration /infra_left /infra_right /color后面三个topic就是转换频率后的topic,我录制了3分钟,录的时候对着标定板移动,按下ctrl+c 结束录制,看到当前文件夹会出现multicameras_calibration.bag文件。
步骤六:使用Kalibr标定
先激活环境变量
source ~/kalibr_workspace/devel/setup.bash然后运行:
kalibr_calibrate_cameras --target checkerboard.yaml --bag multicameras_calibration.bag --models pinhole-equi pinhole-equi pinhole-equi --topics /infra_left /infra_right /color --bag-from-to 10 100 --show-extraction --approx-sync 0.04最后:
最终得到的结果为三个文件:
camchain-multicameras_calibration.yaml
report-cam-multicameras_calibration.pdf
results-cam-multicameras_calibration.txt

注:可能会遇到的问题
1、kalibr_calibrate_cameras:未找到命令

解决方法:
重新进行编译:
~/kalibr_workspace$ catkin build -DCMAKE_BUILD_TYPE=Release -j8再:
source ~/kalibr_workspace/devel/setup.bash2、
File"/home/lab/kalibr_workspace/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_common/ConfigReader.py", line 234, in raiseError
raise RuntimeError( "{0}{1}".format(header, message) )RuntimeError: [CalibrationTargetConfig Reader]: Could not read configuration from ../checkerboard.yaml

解决方法:修改checkerboard.yaml文件为上面的内容(步骤一)。
原文链接:https://blog.csdn.net/weixin_45868890/article/details/123197364
边栏推荐
- 参数解析与跳石板
- what is a kit in qt
- "Mongodb" here are all the basic mongodb operations you want
- systemctl命令
- Leetcode 122: the best time to buy and sell stocks II
- Shardingsphere JDBC keyword problem
- Blog Garden beautification skills summary
- LeetCode 121:买卖股票的最佳时机
- MySQL数据库介绍
- New thrust of Moore's law, detailed explanation of Intel Advanced Packaging Technology!
猜你喜欢

DTS is equipped with a new self-developed kernel, which breaks through the key technology of the three center architecture of the two places Tencent cloud database

Linear DP of dynamic programming

Development status of Dao

Chapter 15 MySQL user management

Liepin questionnaire star has become a "parasite" on wechat

Unity operates on Explorer, opens explorer, selects files, and filters files

博途PLC输出通道映射FC

Financial institution map
![[IO Development Notes] smart cloud intelligent watering device practice (1) - Basic demo implementation](/img/db/122cc54ad8b5b06c885d7455ecb034.png)
[IO Development Notes] smart cloud intelligent watering device practice (1) - Basic demo implementation

测试开发是开发吗?
随机推荐
[hcip] OSPF special area, summary, certification
LeetCode 121:买卖股票的最佳时机
"Mongodb" here are all the basic mongodb operations you want
Leetcode 122: the best time to buy and sell stocks II
[hcip] OSPF relationship establishment
VCs compilation and simulation process
Day07 MySQL knowledge points re summary and multi table query
基于C语言的页式文件系统
At the 100 billion yogurt track, dairy giants and new brands have started a tug of war
what is qrc in qt
Y78. Chapter IV Prometheus' monitoring system and practice -- Prometheus' service discovery mechanism (IX)
Sell 700million a year, and get ready for the IPO of Dezhou braised chicken
[IO Development Notes] smart cloud intelligent watering device practice (3) - automatic code generation and transplantation
Botu PLC output channel mapping FC
Leetcode:857. Minimum cost of employing K workers [think in blocks + start with simplicity]
Module 8 (message queue MySQL table storing message data)
Relying on metauniverse and NFT, the world shows crazy "cutting leeks"?
模块8(消息队列存储消息数据的mysql表格)
7.27 watch first | openeuler is ambitious, open source Huizhi creates the future - the most detailed agenda of the Euler sub forum of the open atom global open source summit is released
『MongoDB』你想要的MongoDB基本操作这里都有