Intel Realsense D435i Run VINS-Mono

Intel Realsense D435i Run VINS-Mono

    • 0.引言
    • 1.VINS-Mono Install
    • 2.Intel Realsense Camera modified
    • 3.RealSense Yaml-File Modified In VINS-Mono
    • 4.RUN
    • 5.Other

0.引言

后面自己标定后再来。原谅文件名之前一直写成了D453I实际应该是D435I。

1.VINS-Mono Install

  • VINS-Mono.Link

2.Intel Realsense Camera modified

运行VINSMono不使用rs_rgbd.launch因为这个启动文件里面没有IMU相关的topic,所以使用rs_camera.launch启动文件。rs_camera.launch文件也需要修改,文件路径如下图。Intel Realsense D435i Run VINS-Mono_第1张图片
默认的是陀螺仪与加速度计的数据分开public,使用的时候需要将其对齐。
Modified:

...

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

...

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

...

修改完后可以查看一下topic数据:

rostopic list
rostopic echo /camera/imu

3.RealSense Yaml-File Modified In VINS-Mono

VINS-Mono中带有配置文件,路径如图。
Intel Realsense D435i Run VINS-Mono_第2张图片
显然是在realsense_color_config.yaml文件中修改相关参数。
Modified:

#common parameters 这里的主题也可以在上一步中使用rostopic list显示出来对应上。
imu_topic: "/camera/imu"
image_topic: "/camera/color/image_raw"
output_path: "/home/fb/output/"

#相机内参、IMU与相机的外参、IMU内参
#camera calibration 
model_type: PINHOLE
camera_name: camera
image_width: 640
image_height: 480
distortion_parameters:
   k1: 9.2615504465028850e-02
   k2: -1.8082438825995681e-01
   p1: -6.5484100374765971e-04
   p2: -3.5829351558557421e-04
projection_parameters:
   fx: 616.1290893554688
   fy: 616.3303833007812
   cx: 319.9371032714844
   cy: 240.64352416992188

# 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.
#Rotation from camera frame to imu frame, imu^R_cam


...


#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

...

#相机曝光方式,默认是卷帘相机rolling shutter,改为全局曝光global shutter
#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). 

对于相机内参,可以查看topic查询出厂默认值:rostopic echo /camera/color/camera_info

该配置文件对应的launch文件:realsense_color_config.yaml路径如图。
Intel Realsense D435i Run VINS-Mono_第3张图片

4.RUN

#1.启动Real sense D435i相机
roslaunch realsense2_camera rs_camera.launch 
#2.加载realsense_color_config.yaml文件
roslaunch vins_estimator realsense_color.launch 
#3.启动VINS-Mono
roslaunch vins_estimator vins_rviz.launch

Result:
Intel Realsense D435i Run VINS-Mono_第4张图片

飘了,不能偷懒,参数还是得自己标定!不过跑两个Demo把相关的文件结构弄清楚了,和小觅相机还是类似!

5.Other

  • 1.相机有时候启动过后没有数据发布,可以先使用rviz或者rostopic echo 看一下图像和IMU数据是否发布成功;
  • 2.rs_camera.launch文件中acc、gyro频率不一样:
  <arg name="gyro_fps"            default="400"/>
  <arg name="accel_fps"           default="250"/>

后面试试改为200Hzde效果。

20191015Update.success.
Intel Realsense D435i Run VINS-Mono_第5张图片

你可能感兴趣的:(slam)