Launch VINS-Mono with Realsense D435i in RTAB-Map

Preparation:

  1. Remap topic from D435i to rtabmap
  2. Feed the odometry to rtabmap

In the rqt_graph of vins_estimator, topic /vins_estimator/odometry is what rtabmap needs.

vins_estimator

Running

Launch rtabmap:


roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info approx_sync:=false odom_topic:=/vins_estimator/odometry

Launch vins:


roslaunch vins_estimator realsense_color.launch

Launch realsense d434i:


roslaunch realsense2_camera rs_camera.launch

In addition, drifting of imu can be seen in rqt_plot by:


 rqt_plot /camera/imu/linear_acceleration/x:y:z /camera/imu/angular_velocity/x:y:z


rosbag record

rosbag record -O wh_test /tf_static /camera/aligned_depth_to_color/image_raw /camera/color/image_raw /camera/color/camera_info /vins_estimator/odometry

Note that never forget topic /tf_static. It can be seen in rqt_graph when rtabmap was run successfully.


References:
[1] RGB-D Handheld Mapping
[2] 如何用Realsense D435i运行VINS-Mono等VIO算法 获取IMU同步数据

原文地址:https://www.cnblogs.com/linweilin/p/10774579.html