Re: Differences between ROS output vs. desktop

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Differences-between-ROS-output-vs-desktop-tp9333p9334.html

Hi,

after investigating the results, it seems in ROS2 you are not subscribing to a rectified RGB image. Following ROS1 suggestions from my pull request here: https://github.com/microsoft/Azure_Kinect_ROS_Driver/pull/166

here is the corresponding ROS2 version for RGB+Depth:

# compute quaternion of the raw /imu
ros2 run imu_filter_madgwick imu_filter_madgwick_node --ros-args \
    -r /imu/data_raw:=/imu \
    -p use_mag:=false \
    -p publish_tf:=false

# Rectify RGB image /rgb/image_raw -> /rgb/image_rect
ros2 run image_proc image_proc --ros-args \
    -r camera_info:=/rgb/camera_info \
    -r image:=/rgb/image_raw \
    -r image_rect:=/rgb/image_rect

# RTAB-Map
ros2 launch rtabmap_launch rtabmap.launch.py     \
    rtabmap_args:="--delete_db_on_start"     \
    rgb_topic:=/rgb/image_rect     \
    depth_topic:=/depth_to_rgb/image_raw     \
    camera_info_topic:=/rgb/camera_info     \
    frame_id:=camera_base     \
    approx_sync:=true  \
    approx_sync_max_interval:=0.1   \
    wait_imu_to_init:=true     \
    imu_topic:=/imu/data     \
    qos:=1    \
    queue_size:=30

# Launch the MKV
ros2 run azure_kinect_ros_driver node --ros-args \
    -p recording_file:=kitchen_loop19_tilt30_720p_30fps_wfov.mkv \
    -p color_enabled:=true \
    -p fps:=30 \
    -p depth_mode:=WFOV_2X2BINNED

When showing the graph without loop closures, it is easier to see that when using raw RGB images, the visual odometry is drifting a lot:


This is visual odometry with rectified RGB images:


This is with rectified RGB and with loop closures (results very similar to RTAB-Map standalone):


EDIT: Thank you for the patch, I integrated it in this commit: https://github.com/introlab/rtabmap/commit/59d220c54f58c66f3d11484176003ba89ef6bdf5

cheers,
Mathieu