Ubuntu 18.04 ———(Intel RealSense D435i)运行VINS-Mono

2023-05-16

Intel RealSense D435i

  • 一、准备工作
  • 二、修改参数
    • rs_camera.launch
    • realsense_color_config.yaml
  • 参考文献

一、准备工作

1、Intel Realsense D435i、Ubuntu 18.04
2、已经安装好Realsense驱动
3、已经安装好VINS-Mono并且能运行数据集

二、修改参数

rs_camera.launch

  1. 修改部分参数【rs_camera.launch】;

第一处,修改unite_imu_method如下,这里是让IMU的角速度和加速度作为一个topic输出

#6450<arg name="unite_imu_method"      default="copy"/>

第二处,修改enable_sync参数为true,这里是开机相机和IMU的同步

#5250<arg name="enable_sync"           default="true"/>

第三处,修改enable_gyro,enable_accel为true;默认不发布

<arg name="enable_gyro"   default="true"/>
<arg name="enable_accel"  default="true"/>

realsense_color_config.yaml

1、订阅的topic

#common parameters
imu_topic: "/camera/imu"
image_topic: "/camera/color/image_raw"

2、相机的内参,通过读取camera_info得到或者自己标定,采用以下命令可以读取厂家的camera_info,但与实际可能存在差距。

rostopic echo /camera/color/camera_info

3、IMU到相机的变换矩阵
IMU到相机的变换矩阵,默认0这里我根据注释的提示修改成2

# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 2   # 0  Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
                        # 1  Have an initial guess about extrinsic parameters. We will optimize around your initial guess.
                        # 2  Don't know anything about extrinsic parameters. You don't need to give R,T. We will try to calibrate it. Do some rotation movement at beginning.                        
#If you choose 0 or 1, you should write down the following matrix.

这里IMU和camera之间的外参矩阵建议使用Kalibr工具进行离线标定,也可以改成1或者2让估计器自己标定和优化。

4、IMU参数,这个需要对IMU的噪声和Bias进行标定,同时重力加速度对结果有影响。

#imu parameters       The more accurate parameters you provide, the better performance
acc_n: 0.2          # accelerometer measurement noise standard deviation. #0.2
gyr_n: 0.05         # gyroscope measurement noise standard deviation.     #0.05
acc_w: 0.02         # accelerometer bias random work noise standard deviation.  #0.02
gyr_w: 4.0e-5       # gyroscope bias random work noise standard deviation.     #4.0e-5
g_norm: 9.81       # gravity magnitude

5、realsense d435i说是已经做好了硬件同步所以不需要在线估计同步时差(但是用kalibr标定出来和在线估计出来都存在大概-0.06的时间差)

#unsynchronization parameters
estimate_td: 0                      # online estimate time offset between camera and imu
td: 0.000                           # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)

6、相机曝光方式应为全局曝光

#rolling shutter parameters
rolling_shutter: 0                      # 0: global shutter camera, 1: rolling shutter camera
rolling_shutter_tr: 0               # unit: s. rolling shutter read out time per frame (from data sheet). 

然后就可以运行了

roslaunch realsense2_camera rs_camera.launch 
roslaunch vins_estimator realsense_color.launch 
roslaunch vins_estimator vins_rviz.launch

报错:

[ WARN] [1652767456.813384298]: waiting for image and imu...
vocabulary_file/home/sfann/catkin_ws/src/VINS-Mono/pose_graph/../support_files/brief_k10L6.bin
loop start load vocabulary
OpenCV Error: Assertion failed (_mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image))) in goodFeaturesToTrack, file /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/featureselect.cpp, line 366
terminate called after throwing an instance of 'cv::Exception'
  what():  /build/opencv-L2vuMj/opencv-3.2.0+dfsg/modules/imgproc/src/featureselect.cpp:366: error: (-215) _mask.empty() || (_mask.type() == CV_8UC1 && _mask.sameSize(_image)) in function goodFeaturesToTrack

BRIEF_PATTERN_FILE/home/sfann/catkin_ws/src/VINS-Mono/pose_graph/../support_files/brief_pattern.yml
/home/tony-ws1/output/pose_graph/ not exists, trying to create it 
/home/tony-ws1/output not exists, trying to create it 
/home/tony-ws1 not exists, trying to create it 
Failed to create folder /home/tony-ws1 
/home/tony-ws1/output/ not exists, trying to create it 
/home/tony-ws1 not exists, trying to create it 
Failed to create folder /home/tony-ws1 
no previous pose graph
[feature_tracker-1] process has died [pid 8424, exit code -6, cmd /home/sfann/catkin_ws/devel/lib/feature_tracker/feature_tracker __name:=feature_tracker __log:=/home/sfann/.ros/log/2a718c1c-d5a7-11ec-a32c-000c298e2de6/feature_tracker-1.log].
log file: /home/sfann/.ros/log/2a718c1c-d5a7-11ec-a32c-000c298e2de6/feature_tracker-1*.log
[ WARN] [1652767552.186227336]: image discontinue! detect a new sequence!
new sequence
sequence cnt 2 
[ WARN] [1652767557.666477363]: image discontinue! detect a new sequence!
new sequence
sequence cnt 3 
[ WARN] [1652767601.168880999]: image discontinue! detect a new sequence!
new sequence
sequence cnt 4 
[ WARN] [1652767626.179102064]: image discontinue! detect a new sequence!
new sequence
sequence cnt 5 
[ WARN] [1652767632.880353309]: image discontinue! detect a new sequence!
new sequence
sequence cnt 6 
[ WARN] [1652767632.908686706]: only support 5 sequences since it's boring to copy code for more sequences.
[FATAL] [1652767632.908739701]: BREAKPOINT HIT
	file = /home/sfann/catkin_ws/src/VINS-Mono/pose_graph/src/pose_graph_node.cpp
	line=77

[pose_graph-3] process has died [pid 8426, exit code -9, cmd /home/sfann/catkin_ws/devel/lib/pose_graph/pose_graph __name:=pose_graph __log:=/home/sfann/.ros/log/2a718c1c-d5a7-11ec-a32c-000c298e2de6/pose_graph-3.log].
log file: /home/sfann/.ros/log/2a718c1c-d5a7-11ec-a32c-000c298e2de6/pose_graph-3*.log

解决办法:

修改enable_gyro,enable_accel为true;默认不发布

<arg name="enable_gyro"   default="true"/>
<arg name="enable_accel"  default="true"/>

修改相机的图片大小相关参数,以及根据相机的内参矩阵K对相机的内参进行修改

image_width: 1280
image_height: 720

修改后的文件

在这里插入图片描述

参考文献

https://blog.csdn.net/weixin_44444810/article/details/121252009?
https://blog.csdn.net/qq_41839222/article/details/86552367

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ubuntu 18.04 ———(Intel RealSense D435i)运行VINS-Mono 的相关文章

随机推荐

  • Postman操作基本教程

    一 xff1a 基本介绍 xff1a Postman是一款功能强大的网页调试与发送网页HTTP请求的Chrome插件 Postman背景介绍 用户在开发或者调试网络程序或者是网页B S模式的程序的时候是需要一些方法来跟踪网页请求的 xff0
  • ROS中rosserial通讯协议初探

    ROS中rosserial通讯协议初探 串行的通讯 xff0c 我们用串口模拟下通讯图 官方 http wiki ros org rosserial rosserial 1概述 标准ROS序列化message的协议 xff0c 可以让一个字
  • 使用cmake交叉编译arm平台so

    使用cmake交叉编译arm平台so 众所周知 xff0c androidStudio可以编译apk及so 具体配置此处不一一介绍 xff0c 但对于需要经常编译不同项目的小编来说 xff0c 太过重量级了 xff0c 假如在编译系统下并没
  • Linux编译C文件

    熟悉了Windows平台下编译一个C 43 43 工程后 xff0c 你是否会提出这样一个问题 xff1a 在Linux平台下又如何编译一个C 43 43 工程呢 xff1f 希望本文能给正在学习或想学习Linux C 43 43 开发的你
  • stm32 esp8266 ota升级-qt bin文件处理工具

    stm32 esp8266 ota系列文章 xff1a stm32 esp8266 ota 快速搭建web服务器之docker安装openresty stm32 esp8266 ota升级 tcp模拟http stm32 esp8266 o
  • 04.Android调用C语言的方法

    为了在Android端调用底层的驱动程序 xff0c 我们需要在Android中调用C语言 直接新建一个Native C 43 43 工程 xff0c 然后按照这篇文章的方法 xff1a JNI与NDK简析 xff08 一 xff09 St
  • gazebo教程---使用gazebo插件

    一 添加传感器插件 xff08 1 xff09 在rrbot xacro中添加 lt link gt 和 lt joint gt xff0c 内容如下 xff1a lt joint name 61 span class token stri
  • 基于加速度计与磁力计的姿态解算方法(加计补偿偏航)

    附上转载文章链接 加速度计实时输出机体坐标系下的三轴线加速度 xff0c 磁力计实时输出机体坐标系下的三轴地磁强度 xff0c 加速度计能解算出俯仰角与横滚角 xff0c 由磁力计计算出航向角 xff0c 两者相互配合可以解算三个姿态角信息
  • Xavier踩坑之-GPIO做外触发

    Xavier入门踩坑 PWM问题解决方法 GPIO问题解决方法 PWM问题 由于需要做外部传感器的触发同步 xff0c 所以需要一个方波 xff0c 考虑用Xavier的PWM xff0c 结果折腾了好久发现需要配置内部硬件 xff0c 折
  • Kalibr进行相机-IMU联合标定踩坑记录RuntimeError: Optimization failed!

    1 具体标定步骤 xff0c 跟网上别的一模一样 xff0c 此处就不列举 2 记录踩坑过程 xff1a RuntimeError Optimization failed 当执行到开始联合标定时 xff0c 也就是如下指令 xff1a ka
  • “GPG 错误导致没有公钥,无法验证签名”的问题解决

    W GPG 错误 xff1a http packages ros org ros ubuntu xenial InRelease 由于没有公钥 xff0c 无法验证下列签名 xff1a NO PUBKEY F42ED6FBAB17C654
  • 加快从github的git clone速度

    对于国内用户来说遇到clone Github速度十分缓慢的问题实在是一个令人头疼崩溃的问题 下面介绍一个简单的方法解决这个问题 xff0c 也就是先从github拉取到自己的码云帐号 xff0c 然后再从自己的帐号git clone 方法
  • 快速了解机器人操作系统ROS

    ROS xff08 Robot Operating System xff09 机器人操作系统 xff0c 由斯坦福大学人工智能实验室开发的一套提供类似操作系统服务的机器人专用开源系统 ROS包括一个类似于硬件系统的硬件抽象 xff0c 但它
  • 《大话数据结构》C++实现哈希表的创建、查找和插入

    include lt iostream gt using namespace std typedef int status constexpr auto SUCCESS 61 1 constexpr auto UNSUCCESS 61 0
  • 一文理解UART通信

    还记得当年的打印机 xff0c 鼠标和调制解调器吗 他们都有巨大笨重的连接器和粗电缆 xff0c 并且必须拧到你的电脑上 这些设备正是使用UART协议与计算机进行通信 虽然USB几乎完全取代了旧的电缆和连接器 xff0c 但UART绝对没有
  • UART串口通信协议概述

    1 UART协议介绍 UART是一种通用串行数据总线 xff0c 用于异步通信 UART能实现双向通信 xff0c 在嵌入式设计中 xff0c 常用于主机与辅助设备通信 UART包括RS232 RS449 RS423等接口标准规范和总线标准
  • 深入浅出C语言:(十)C预处理

    目录 一 C 语言 include 的用法 xff08 文件包含命令 xff09 二 C 语言宏定义 xff08 define 的用法 xff09 1 define 的基础用法 2 C 语言带参数的宏定义 3 对带参宏定义的说明 4 用宏参
  • STM32串口——5个串口的使用方法

    串口是我们常用的一个数据传输接口 xff0c STM32F103系列单片机共有5个串口 xff0c 其中1 3是 通用同步 异步串行接口 USART Universal Synchronous Asynchronous Receiver T
  • Ubuntu18.04 —— 安装环境及运行Vins_mono(2022年)

    Ubuntu18 04 安装环境及运行Vins mono 一 环境安装1 检查安装版本openCVEigenPangolin 二 ubunt18 04使用国内源安装ros及问题解决1 添加国内中科大源2 软件库更新3 安装全功能版本的ROS
  • Ubuntu 18.04 ———(Intel RealSense D435i)运行VINS-Mono

    Intel RealSense D435i 一 准备工作二 修改参数rs camera launchrealsense color config yaml 参考文献 一 准备工作 1 Intel Realsense D435i Ubuntu