[Solved] rtabmap with external odometry (Realsense T265)
OS: Ubuntu 16.04.6 LTS
ROS version: Lunar
RTAB-Map: 0.17.6
Cameras: Realsense D435 and T265
I'm starting both cameras with this launch command: roslaunch realsense2_camera rs_d400_and_t265.launch align_depth:=true
(see rs_d400_and_t265.launch)
The map frame looks like this.
When I start rtabmap without external odometry and have visual odometry (uses the image/depth data provided by the D435), it seems to be working fine: roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/d400/aligned_depth_to_color/image_raw rgb_topic:=/d400/color/image_raw camera_info_topic:=/d400/color/camera_info approx_sync:=false frame_id:=t265_odom_frame
This starts rtabmap and shows the 3D image as expected.
But when I include external odometry from the T265 then I get an empty rtabmap window where nothing is displayed: roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/d400/aligned_depth_to_color/image_raw rgb_topic:=/d400/color/image_raw camera_info_topic:=/d400/color/camera_info approx_sync:=false frame_id:=t265_odom_frame visual_odometry:=false odom_topic:=/t265/odom/sample
There's also a warning message on stdout which only happens if I include external odometry:
[ WARN] [1581412938.063114202]: /rtabmap/rtabmapviz: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called. /rtabmap/rtabmapviz subscribed to (exact sync): /t265/odom/sample, /d400/color/image_raw, /d400/aligned_depth_to_color/image_raw, /d400/color/camera_info, /rtabmap/odom_info [ WARN] [1581412938.420139502]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called. /rtabmap/rtabmap subscribed to (exact sync): /t265/odom/sample, /d400/color/image_raw, /d400/aligned_depth_to_color/image_raw, /d400/color/camera_info, /rtabmap/odom_info
Odometry data is coming through fine as the command rostopic echo /t265/odom/sample
shows:
header: seq: 2186 stamp: secs: 1581324175 nsecs: 245380878 frame_id: "t265_odom_frame" child_frame_id: "t265_pose_frame" pose: pose: position: x: -0.000204464944545 y: -7.67098099459e-05 z: -0.000421570963226 orientation: x: -0.00432776007801 y: 0.0274204164743 z: 0.000154268200276 w: 0.999614655972 covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001] twist: twist: linear: x: 0.00355814174321 y: -0.00205399848924 z: 0.000575806943033 angular: x: 0.00179574472786 y: 0.00634724180174 z: 0.00126657017099 covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0 ...
Same issue with realsense D415 and T265 on Melodic! Did you fix it?