introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
966 stars 557 forks source link

Error running rtabmap on ROS2 Jazzy: Did not receive data since 5 seconds #1213

Closed michelgokan closed 4 days ago

michelgokan commented 5 days ago

I'm trying to run rtabmap_ros with ROS2 Jazzy using my Intel RealSense D435i following this example. My setup is Ubuntu 24.04 running on a Raspberry Pi 5 8GB.

Here is the command:

ros2 launch rtabmap_examples realsense_d435i_color.launch.py

Here is the output:

[INFO] [launch]: All log files can be found below /home/m/.ros/log/2024-09-26-01-50-14-131146-m-69364
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [realsense2_camera_node-1]: process started with pid [69367]
[INFO] [rgbd_odometry-2]: process started with pid [69368]
[INFO] [rtabmap-3]: process started with pid [69369]
[INFO] [rtabmap_viz-4]: process started with pid [69370]
[INFO] [imu_filter_madgwick_node-5]: process started with pid [69371]
[INFO] [static_transform_publisher-6]: process started with pid [69372]
[static_transform_publisher-6] [WARN] [1727308214.669830541] []: Old-style arguments are deprecated; see --help for new-style arguments
[imu_filter_madgwick_node-5] [INFO] [1727308214.861595578] [imu_filter_madgwick]: Starting ImuFilter
[imu_filter_madgwick_node-5] [INFO] [1727308214.874984366] [imu_filter_madgwick]: Using dt computed from message headers
[imu_filter_madgwick_node-5] [INFO] [1727308214.875127291] [imu_filter_madgwick]: The gravity vector is kept in the IMU message.
[imu_filter_madgwick_node-5] [INFO] [1727308214.875430455] [imu_filter_madgwick]: Imu filter gain set to 0.100000
[imu_filter_madgwick_node-5] [INFO] [1727308214.875479936] [imu_filter_madgwick]: Gyro drift bias set to 0.000000
[imu_filter_madgwick_node-5] [INFO] [1727308214.875508232] [imu_filter_madgwick]: Magnetometer bias values: 0.000000 0.000000 0.000000
[static_transform_publisher-6] [INFO] [1727308215.160699086] [static_transform_publisher_nF54VqRF0ny0kbjh]: Spinning until stopped - publishing transform
[static_transform_publisher-6] translation: ('0.000000', '0.000000', '0.000000')
[static_transform_publisher-6] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-6] from 'camera_gyro_optical_frame' to 'camera_imu_optical_frame'
[realsense2_camera_node-1] [INFO] [1727308215.504176349] [camera.camera]: RealSense ROS v4.55.1
[realsense2_camera_node-1] [INFO] [1727308215.504488383] [camera.camera]: Built with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1727308215.504584604] [camera.camera]: Running with LibRealSense v2.55.1
[realsense2_camera_node-1] [INFO] [1727308216.511496749] [camera.camera]: Device with serial number 233522073357 was found.
[realsense2_camera_node-1] 
[realsense2_camera_node-1] [INFO] [1727308216.511697988] [camera.camera]: Device with physical ID /sys/devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb5/5-1/5-1:1.0/video4linux/video0 was found.
[realsense2_camera_node-1] [INFO] [1727308216.511760117] [camera.camera]: Device with name Intel RealSense D435I was found.
[realsense2_camera_node-1] [INFO] [1727308216.512053670] [camera.camera]: Device with port number 5-1 was found.
[realsense2_camera_node-1] [INFO] [1727308216.513883079] [camera.camera]: Device USB type: 3.2
[realsense2_camera_node-1] [INFO] [1727308216.514160632] [camera.camera]: getParameters...
[realsense2_camera_node-1] [WARN] [1727308216.516946941] [camera.camera]: For the 'unite_imu_method' param update to take effect, re-enable either gyro or accel stream.
[realsense2_camera_node-1] [INFO] [1727308216.517895636] [camera.camera]: JSON file is not provided
[realsense2_camera_node-1] [INFO] [1727308216.517961136] [camera.camera]: Device Name: Intel RealSense D435I
[realsense2_camera_node-1] [INFO] [1727308216.517994302] [camera.camera]: Device Serial No: 233522073357
[realsense2_camera_node-1] [INFO] [1727308216.518027580] [camera.camera]: Device physical port: /sys/devices/platform/axi/1000120000.pcie/1f00300000.usb/xhci-hcd.1/usb5/5-1/5-1:1.0/video4linux/video0
[realsense2_camera_node-1] [INFO] [1727308216.518074764] [camera.camera]: Device FW version: 5.16.0.1
[realsense2_camera_node-1] [INFO] [1727308216.518122468] [camera.camera]: Device Product ID: 0x0B3A
[realsense2_camera_node-1] [INFO] [1727308216.518156930] [camera.camera]: Sync Mode: On
[realsense2_camera_node-1] [INFO] [1727308216.673206886] [camera.camera]: Set ROS param depth_module.depth_profile to default: 848x480x30
[realsense2_camera_node-1] [INFO] [1727308216.677055666] [camera.camera]: Set ROS param depth_module.infra_profile to default: 848x480x30
[realsense2_camera_node-1] [INFO] [1727308216.770241579] [camera.camera]: Set ROS param rgb_camera.color_profile to default: 1280x720x30
[realsense2_camera_node-1] [INFO] [1727308216.787870330] [camera.camera]: Set ROS param gyro_fps to default: 200
[realsense2_camera_node-1] [INFO] [1727308216.791285262] [camera.camera]: Set ROS param accel_fps to default: 100
[realsense2_camera_node-1] [INFO] [1727308216.860278020] [camera.camera]: Stopping Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1727308216.860462018] [camera.camera]: Stopping Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1727308216.860531480] [camera.camera]: Stopping Sensor: Motion Module
[realsense2_camera_node-1] [INFO] [1727308216.947376560] [camera.camera]: Starting Sensor: Depth Module
[realsense2_camera_node-1] [INFO] [1727308216.984194067] [camera.camera]: Open profile: stream_type: Depth(0), Format: Z16, Width: 848, Height: 480, FPS: 30
[realsense2_camera_node-1] [INFO] [1727308217.039017339] [camera.camera]: Starting Sensor: RGB Camera
[realsense2_camera_node-1] [INFO] [1727308217.091579094] [camera.camera]: Open profile: stream_type: Color(0), Format: RGB8, Width: 1280, Height: 720, FPS: 30
[realsense2_camera_node-1]  26/09 01:50:17,118 WARNING [281473152245824] (ds-calib-parsers.cpp:35) IMU Calibration is not available, default intrinsic and extrinsic will be used.
[realsense2_camera_node-1] [INFO] [1727308217.153350082] [camera.camera]: Starting Sensor: Motion Module
[realsense2_camera_node-1] [INFO] [1727308217.168177191] [camera.camera]: Open profile: stream_type: Accel(0)Format: MOTION_XYZ32F, FPS: 100
[realsense2_camera_node-1] [INFO] [1727308217.169664511] [camera.camera]: Open profile: stream_type: Gyro(0)Format: MOTION_XYZ32F, FPS: 200
[realsense2_camera_node-1] [INFO] [1727308217.251956058] [camera.camera]: RealSense Node Is Up!
[rtabmap-3] [INFO] [1727308217.959582529] [rtabmap]: rtabmap(maps): latch                      = true
[rtabmap-3] [INFO] [1727308217.966129878] [rtabmap]: rtabmap(maps): map_filter_radius          = 0.000000
[rtabmap-3] [INFO] [1727308217.966254618] [rtabmap]: rtabmap(maps): map_filter_angle           = 30.000000
[rtabmap-3] [INFO] [1727308217.966297247] [rtabmap]: rtabmap(maps): map_cleanup                = true
[rtabmap-3] [INFO] [1727308217.966326950] [rtabmap]: rtabmap(maps): map_always_update          = false
[rtabmap-3] [INFO] [1727308217.966358061] [rtabmap]: rtabmap(maps): map_empty_ray_tracing      = true
[rtabmap-3] [INFO] [1727308217.966394320] [rtabmap]: rtabmap(maps): cloud_output_voxelized     = true
[rtabmap-3] [INFO] [1727308217.966428209] [rtabmap]: rtabmap(maps): cloud_subtract_filtering   = false
[rtabmap-3] [INFO] [1727308217.966459023] [rtabmap]: rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2
[rtabmap-3] [INFO] [1727308217.971946623] [rtabmap]: rtabmap(maps): octomap_tree_depth         = 16
[rtabmap-3] [INFO] [1727308218.220163676] [rtabmap]: rtabmap: frame_id      = camera_link
[rtabmap-3] [INFO] [1727308218.220339749] [rtabmap]: rtabmap: map_frame_id  = map
[rtabmap-3] [INFO] [1727308218.220382897] [rtabmap]: rtabmap: log_to_rosout_level  = 4
[rtabmap-3] [INFO] [1727308218.220416656] [rtabmap]: rtabmap: initial_pose  = 
[rtabmap-3] [INFO] [1727308218.220446248] [rtabmap]: rtabmap: use_action_for_goal  = false
[rtabmap-3] [INFO] [1727308218.220478340] [rtabmap]: rtabmap: tf_delay      = 0.050000
[rtabmap-3] [INFO] [1727308218.220515044] [rtabmap]: rtabmap: tf_tolerance  = 0.100000
[rtabmap-3] [INFO] [1727308218.220545969] [rtabmap]: rtabmap: odom_sensor_sync   = false
[rtabmap-3] [INFO] [1727308218.220891985] [rtabmap]: rtabmap: pub_loc_pose_only_when_localizing = false
[rtabmap-3] [INFO] [1727308218.220948169] [rtabmap]: rtabmap: gen_scan  = false
[rtabmap-3] [INFO] [1727308218.220974577] [rtabmap]: rtabmap: gen_depth  = false
[rtabmap-3] [INFO] [1727308218.488296812] [rtabmap]: RTAB-Map detection rate = 1.000000 Hz
[rtabmap-3] [INFO] [1727308218.488848030] [rtabmap]: rtabmap: Deleted database "/home/m/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[rtabmap-3] [INFO] [1727308218.488921177] [rtabmap]: rtabmap: Using database from "/home/m/.ros/rtabmap.db" (0 MB).
[rgbd_odometry-2] [INFO] [1727308218.594726755] [rgbd_odometry]: Odometry: frame_id               = camera_link
[rgbd_odometry-2] [INFO] [1727308218.595254362] [rgbd_odometry]: Odometry: odom_frame_id          = odom
[rgbd_odometry-2] [INFO] [1727308218.595288991] [rgbd_odometry]: Odometry: publish_tf             = true
[rgbd_odometry-2] [INFO] [1727308218.595304454] [rgbd_odometry]: Odometry: wait_for_transform     = 0.100000
[rgbd_odometry-2] [INFO] [1727308218.595326472] [rgbd_odometry]: Odometry: log_to_rosout_level    = 4
[rgbd_odometry-2] [INFO] [1727308218.595428731] [rgbd_odometry]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[rgbd_odometry-2] [INFO] [1727308218.595460934] [rgbd_odometry]: Odometry: ground_truth_frame_id  = 
[rgbd_odometry-2] [INFO] [1727308218.595474249] [rgbd_odometry]: Odometry: ground_truth_base_frame_id = camera_link
[rgbd_odometry-2] [INFO] [1727308218.595488878] [rgbd_odometry]: Odometry: config_path            = 
[rgbd_odometry-2] [INFO] [1727308218.595514137] [rgbd_odometry]: Odometry: publish_null_when_lost = true
[rgbd_odometry-2] [INFO] [1727308218.595548915] [rgbd_odometry]: Odometry: publish_compressed_sensor_data = false
[rgbd_odometry-2] [INFO] [1727308218.595575674] [rgbd_odometry]: Odometry: guess_frame_id         = 
[rgbd_odometry-2] [INFO] [1727308218.595624229] [rgbd_odometry]: Odometry: guess_min_translation  = 0.000000
[rgbd_odometry-2] [INFO] [1727308218.595646488] [rgbd_odometry]: Odometry: guess_min_rotation     = 0.000000
[rgbd_odometry-2] [INFO] [1727308218.595664821] [rgbd_odometry]: Odometry: guess_min_time         = 0.000000
[rgbd_odometry-2] [INFO] [1727308218.595688636] [rgbd_odometry]: Odometry: expected_update_rate   = 0.000000 Hz
[rgbd_odometry-2] [INFO] [1727308218.595717321] [rgbd_odometry]: Odometry: max_update_rate        = 0.000000 Hz
[rgbd_odometry-2] [INFO] [1727308218.595749783] [rgbd_odometry]: Odometry: min_update_rate        = 0.000000 Hz
[rgbd_odometry-2] [INFO] [1727308218.595775672] [rgbd_odometry]: Odometry: wait_imu_to_init       = true
[rgbd_odometry-2] [INFO] [1727308218.595794487] [rgbd_odometry]: Odometry: sensor_data_compression_format = .jpg
[rgbd_odometry-2] [INFO] [1727308218.595812931] [rgbd_odometry]: Odometry: sensor_data_parallel_compression = true
[rgbd_odometry-2] [INFO] [1727308218.595879838] [rgbd_odometry]: Odometry: stereoParams_=0 visParams_=1 icpParams_=0
[rtabmap-3] [INFO] [1727308218.651999024] [rtabmap]: rtabmap: Database version = "0.21.6".
[rtabmap-3] [INFO] [1727308218.652127579] [rtabmap]: rtabmap: SLAM mode (Mem/IncrementalMemory=true)
[rtabmap-3] [INFO] [1727308218.813057538] [rtabmap]: Setup callbacks
[rtabmap-3] [INFO] [1727308218.815727958] [rtabmap]: rtabmap: subscribe_depth = true
[rtabmap-3] [INFO] [1727308218.816353971] [rtabmap]: rtabmap: subscribe_rgb = true
[rtabmap-3] [INFO] [1727308218.816392804] [rtabmap]: rtabmap: subscribe_stereo = false
[rtabmap-3] [INFO] [1727308218.816414193] [rtabmap]: rtabmap: subscribe_rgbd = false (rgbd_cameras=1)
[rtabmap-3] [INFO] [1727308218.816432748] [rtabmap]: rtabmap: subscribe_sensor_data = false
[rtabmap-3] [INFO] [1727308218.816446674] [rtabmap]: rtabmap: subscribe_odom_info = true
[rtabmap-3] [INFO] [1727308218.816463489] [rtabmap]: rtabmap: subscribe_user_data = false
[rtabmap-3] [INFO] [1727308218.816485785] [rtabmap]: rtabmap: subscribe_scan = false
[rtabmap-3] [INFO] [1727308218.816507359] [rtabmap]: rtabmap: subscribe_scan_cloud = false
[rtabmap-3] [INFO] [1727308218.816530229] [rtabmap]: rtabmap: subscribe_scan_descriptor = false
[rtabmap-3] [INFO] [1727308218.816550247] [rtabmap]: rtabmap: topic_queue_size = 10
[rtabmap-3] [INFO] [1727308218.816570229] [rtabmap]: rtabmap: sync_queue_size  = 2
[rtabmap-3] [INFO] [1727308218.816627691] [rtabmap]: rtabmap: qos_image       = 0
[rtabmap-3] [INFO] [1727308218.816651209] [rtabmap]: rtabmap: qos_camera_info = 0
[rtabmap-3] [INFO] [1727308218.817335703] [rtabmap]: rtabmap: qos_scan        = 0
[rtabmap-3] [INFO] [1727308218.817361388] [rtabmap]: rtabmap: qos_odom        = 0
[rtabmap-3] [INFO] [1727308218.817380518] [rtabmap]: rtabmap: qos_user_data   = 0
[rtabmap-3] [INFO] [1727308218.817399944] [rtabmap]: rtabmap: approx_sync     = false
[rtabmap-3] [INFO] [1727308218.817455906] [rtabmap]: Setup depth callback
[rtabmap-3] [INFO] [1727308218.875960442] [rtabmap]: 
[rtabmap-3] rtabmap subscribed to (exact sync):
[rtabmap-3]    /odom \
[rtabmap-3]    /camera/color/image_raw \
[rtabmap-3]    /camera/aligned_depth_to_color/image_raw \
[rtabmap-3]    /camera/color/camera_info \
[rtabmap-3]    /odom_info
[rgbd_odometry-2] [INFO] [1727308218.913410739] [rgbd_odometry]: odometry: Subscribing to IMU topic /imu/data
[rgbd_odometry-2] [INFO] [1727308218.913929993] [rgbd_odometry]: odometry: qos_imu = 0
[rgbd_odometry-2] [INFO] [1727308218.913973567] [rgbd_odometry]: odometry: imu_queue_size = 200
[rgbd_odometry-2] [INFO] [1727308218.952173727] [rgbd_odometry]: RGBDOdometry: approx_sync    = false
[rgbd_odometry-2] [INFO] [1727308218.952242968] [rgbd_odometry]: RGBDOdometry: topic_queue_size = 10
[rgbd_odometry-2] [INFO] [1727308218.952257467] [rgbd_odometry]: RGBDOdometry: sync_queue_size  = 2
[rgbd_odometry-2] [INFO] [1727308218.952272338] [rgbd_odometry]: RGBDOdometry: qos             = 0
[rgbd_odometry-2] [INFO] [1727308218.952287819] [rgbd_odometry]: RGBDOdometry: qos_camera_info = 0
[rgbd_odometry-2] [INFO] [1727308218.952310745] [rgbd_odometry]: RGBDOdometry: subscribe_rgbd = false
[rgbd_odometry-2] [INFO] [1727308218.952329022] [rgbd_odometry]: RGBDOdometry: rgbd_cameras   = 1
[rgbd_odometry-2] [INFO] [1727308218.952348133] [rgbd_odometry]: RGBDOdometry: keep_color     = false
[rgbd_odometry-2] [INFO] [1727308218.980100146] [rgbd_odometry]: 
[rgbd_odometry-2] rgbd_odometry subscribed to (exact sync, topic_queue_size=10, sync_queue_size=2):
[rgbd_odometry-2]    /camera/color/image_raw,
[rgbd_odometry-2]    /camera/aligned_depth_to_color/image_raw,
[rgbd_odometry-2]    /camera/color/camera_info
[rtabmap_viz-4] [INFO] [1727308219.576938195] [rtabmap_viz]: rtabmap_viz: Using configuration from "/home/m/.ros/rtabmapGUI.ini"
[rtabmap_viz-4] libpng warning: iCCP: known incorrect sRGB profile
[rtabmap_viz-4] libpng warning: iCCP: known incorrect sRGB profile
[rtabmap_viz-4] libpng warning: iCCP: known incorrect sRGB profile
[rtabmap_viz-4] [WARN] [1727308222.830414752] [rcl.logging_rosout]: Publisher already registered for node name: 'rtabmap_viz'. If this is due to multiple nodes with the same name then all logs for the logger named 'rtabmap_viz' will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[rtabmap_viz-4] [INFO] [1727308222.878046773] [rtabmap_viz]: Reading parameters from the ROS server...
[rgbd_odometry-2] [WARN] [1727308222.999708304] [rgbd_odometry]: rgbd_odometry: 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. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rgbd_odometry-2] rgbd_odometry subscribed to (exact sync, topic_queue_size=10, sync_queue_size=2):
[rgbd_odometry-2]    /camera/color/image_raw,
[rgbd_odometry-2]    /camera/aligned_depth_to_color/image_raw,
[rgbd_odometry-2]    /camera/color/camera_info
[rtabmap-3] [WARN] [1727308223.005695158] [rtabmap]: rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ ros2 topic 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"). Ajusting topic_queue_size (10) and sync_queue_size (2) can also help for better synchronization if framerates and/or delays are different. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rtabmap-3] rtabmap subscribed to (exact sync):
[rtabmap-3]    /odom \
[rtabmap-3]    /camera/color/image_raw \
[rtabmap-3]    /camera/aligned_depth_to_color/image_raw \
[rtabmap-3]    /camera/color/camera_info \
[rtabmap-3]    /odom_info
[rtabmap_viz-4] [INFO] [1727308223.532199333] [rtabmap_viz]: Parameters read = 383
[rtabmap_viz-4] [INFO] [1727308223.532333813] [rtabmap_viz]: Parameters successfully read.
[rtabmap-3] [WARN] [1727308224.324238945] [rtabmap]: rtabmap: Already running!
[rtabmap_viz-4] [INFO] [1727308224.421442026] [rtabmap_viz]: rtabmap_viz: subscribe_depth = true
[rtabmap_viz-4] [INFO] [1727308224.422631700] [rtabmap_viz]: rtabmap_viz: subscribe_rgb = false
[rtabmap_viz-4] [INFO] [1727308224.422645071] [rtabmap_viz]: rtabmap_viz: subscribe_stereo = false
[rtabmap_viz-4] [INFO] [1727308224.422649459] [rtabmap_viz]: rtabmap_viz: subscribe_rgbd = false (rgbd_cameras=1)
[rtabmap_viz-4] [INFO] [1727308224.422654626] [rtabmap_viz]: rtabmap_viz: subscribe_sensor_data = false
[rtabmap_viz-4] [INFO] [1727308224.422658700] [rtabmap_viz]: rtabmap_viz: subscribe_odom_info = true
[rtabmap_viz-4] [INFO] [1727308224.422662830] [rtabmap_viz]: rtabmap_viz: subscribe_user_data = false
[rtabmap_viz-4] [INFO] [1727308224.422666682] [rtabmap_viz]: rtabmap_viz: subscribe_scan = false
[rtabmap_viz-4] [INFO] [1727308224.422670459] [rtabmap_viz]: rtabmap_viz: subscribe_scan_cloud = false
[rtabmap_viz-4] [INFO] [1727308224.422674515] [rtabmap_viz]: rtabmap_viz: subscribe_scan_descriptor = false
[rtabmap_viz-4] [INFO] [1727308224.422678459] [rtabmap_viz]: rtabmap_viz: topic_queue_size = 10
[rtabmap_viz-4] [INFO] [1727308224.422682422] [rtabmap_viz]: rtabmap_viz: sync_queue_size  = 2
[rtabmap_viz-4] [INFO] [1727308224.422686700] [rtabmap_viz]: rtabmap_viz: qos_image       = 0
[rtabmap_viz-4] [INFO] [1727308224.422690885] [rtabmap_viz]: rtabmap_viz: qos_camera_info = 0
[rtabmap_viz-4] [INFO] [1727308224.422695329] [rtabmap_viz]: rtabmap_viz: qos_scan        = 0
[rtabmap_viz-4] [INFO] [1727308224.422699255] [rtabmap_viz]: rtabmap_viz: qos_odom        = 0
[rtabmap_viz-4] [INFO] [1727308224.422703348] [rtabmap_viz]: rtabmap_viz: qos_user_data   = 0
[rtabmap_viz-4] [INFO] [1727308224.422707533] [rtabmap_viz]: rtabmap_viz: approx_sync     = false
[rtabmap_viz-4] [INFO] [1727308224.422734940] [rtabmap_viz]: Setup depth callback
[rtabmap_viz-4] [INFO] [1727308224.458484308] [rtabmap_viz]: 
[rtabmap_viz-4] rtabmap_viz subscribed to (exact sync):
[rtabmap_viz-4]    /odom \
[rtabmap_viz-4]    /camera/color/image_raw \
[rtabmap_viz-4]    /camera/aligned_depth_to_color/image_raw \
[rtabmap_viz-4]    /camera/color/camera_info \
[rtabmap_viz-4]    /odom_info
[rtabmap_viz-4] [INFO] [1727308224.469205305] [rtabmap_viz]: rtabmap_viz started.
[rgbd_odometry-2] [WARN] [1727308224.561994666] [rgbd_odometry]: Odometry: Already running!
[imu_filter_madgwick_node-5] [WARN] [1727308225.039454388] [imu_filter_madgwick]: Still waiting for data on topic /imu/data_raw...
[rgbd_odometry-2] [WARN] [1727308227.999799204] [rgbd_odometry]: rgbd_odometry: 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. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rgbd_odometry-2] rgbd_odometry subscribed to (exact sync, topic_queue_size=10, sync_queue_size=2):
[rgbd_odometry-2]    /camera/color/image_raw,
[rgbd_odometry-2]    /camera/aligned_depth_to_color/image_raw,
[rgbd_odometry-2]    /camera/color/camera_info
[rtabmap_viz-4] [WARN] [1727308228.469129055] [rtabmap_viz]: rtabmap_viz: Did not receive data since 5 seconds! Make sure the input topics are published ("$ ros2 topic 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"). Ajusting topic_queue_size (10) and sync_queue_size (2) can also help for better synchronization if framerates and/or delays are different. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rtabmap_viz-4] rtabmap_viz subscribed to (exact sync):
[rtabmap_viz-4]    /odom \
[rtabmap_viz-4]    /camera/color/image_raw \
[rtabmap_viz-4]    /camera/aligned_depth_to_color/image_raw \
[rtabmap_viz-4]    /camera/color/camera_info \
[rtabmap_viz-4]    /odom_info
[rtabmap-3] [WARN] [1727308229.004720613] [rtabmap]: rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ ros2 topic 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"). Ajusting topic_queue_size (10) and sync_queue_size (2) can also help for better synchronization if framerates and/or delays are different. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rtabmap-3] rtabmap subscribed to (exact sync):
[rtabmap-3]    /odom \
[rtabmap-3]    /camera/color/image_raw \
[rtabmap-3]    /camera/aligned_depth_to_color/image_raw \
[rtabmap-3]    /camera/color/camera_info \
[rtabmap-3]    /odom_info
[rgbd_odometry-2] [WARN] [1727308233.000211039] [rgbd_odometry]: rgbd_odometry: 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. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rgbd_odometry-2] rgbd_odometry subscribed to (exact sync, topic_queue_size=10, sync_queue_size=2):
[rgbd_odometry-2]    /camera/color/image_raw,
[rgbd_odometry-2]    /camera/aligned_depth_to_color/image_raw,
[rgbd_odometry-2]    /camera/color/camera_info
[rtabmap-3] [WARN] [1727308234.005986201] [rtabmap]: rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ ros2 topic 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"). Ajusting topic_queue_size (10) and sync_queue_size (2) can also help for better synchronization if framerates and/or delays are different. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rtabmap-3] rtabmap subscribed to (exact sync):
[rtabmap-3]    /odom \
[rtabmap-3]    /camera/color/image_raw \
[rtabmap-3]    /camera/aligned_depth_to_color/image_raw \
[rtabmap-3]    /camera/color/camera_info \
[rtabmap-3]    /odom_info
[rtabmap_viz-4] [WARN] [1727308234.469012478] [rtabmap_viz]: rtabmap_viz: Did not receive data since 5 seconds! Make sure the input topics are published ("$ ros2 topic 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"). Ajusting topic_queue_size (10) and sync_queue_size (2) can also help for better synchronization if framerates and/or delays are different. Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
[rtabmap_viz-4] rtabmap_viz subscribed to (exact sync):
[rtabmap_viz-4]    /odom \
[rtabmap_viz-4]    /camera/color/image_raw \
[rtabmap_viz-4]    /camera/aligned_depth_to_color/image_raw \
[rtabmap_viz-4]    /camera/color/camera_info \
[rtabmap_viz-4]    /odom_info
...

Here is the topic list while above is running:

ros2 topic list
/camera/aligned_depth_to_color/image_raw
/camera/camera/accel/imu_info
/camera/camera/accel/metadata
/camera/camera/accel/sample
/camera/camera/aligned_depth_to_color/camera_info
/camera/camera/aligned_depth_to_color/image_raw
/camera/camera/color/camera_info
/camera/camera/color/image_raw
/camera/camera/color/metadata
/camera/camera/depth/camera_info
/camera/camera/depth/image_rect_raw
/camera/camera/depth/metadata
/camera/camera/extrinsics/depth_to_accel
/camera/camera/extrinsics/depth_to_color
/camera/camera/extrinsics/depth_to_gyro
/camera/camera/gyro/imu_info
/camera/camera/gyro/metadata
/camera/camera/gyro/sample
/camera/camera/imu
/camera/color/camera_info
/camera/color/image_raw
/camera/imu
/cloud_ground
/cloud_map
/cloud_obstacles
/diagnostics
/global_path
/global_path_nodes
/global_pose
/goal
/goal_node
/goal_out
/goal_reached
/gps/fix
/grid_prob_map
/imu/data
/info
/initialpose
/labels
/landmark_detection
/landmark_detections
/landmarks
/local_grid_empty
/local_grid_ground
/local_grid_obstacle
/local_path
/local_path_nodes
/localization_pose
/map
/mapData
/mapGraph
/mapOdomCache
/mapPath
/octomap_binary
/octomap_empty_space
/octomap_full
/octomap_global_frontier_space
/octomap_grid
/octomap_ground
/octomap_obstacles
/octomap_occupied_space
/odom
/odom_info
/odom_info_lite
/odom_last_frame
/odom_local_map
/odom_local_scan_map
/odom_rgbd_image
/odom_sensor_data/compressed
/odom_sensor_data/features
/odom_sensor_data/raw
/parameter_events
/rosout
/rtabmap/republish_node_data
/tf
/tf_static
/user_data_async

Here is the output of hz command:

$ ros2 topic hz /camera/camera/color/image_raw
average rate: 14.192
    min: 0.011s max: 615s std dev: 0.07643s window: 250
$ ros2 topic hz /camera/camera/color/camera_info
average rate: 17.491
    min: 0.004s max: 0.161s std dev: 0.06321s window: 21

As you can see, the main error is rtabmap: Did not receive data since 5 seconds!

I tried run nodes separately and played with different combinations for several hours.

Any ideas what's wrong?

I can confirm that the camera is functioning properly, and realsense-viewer successfully displays the output. Additionally, when I manually add the camera in RViz, both depth and RGB data/images are visible.

michelgokan commented 4 days ago

Alright, I think I figured out the issue!

  1. I need to copy the project into my own workspace (instead of relying on the pre-built package).
  2. I need to change /camera to /camera/camera in the example files.
  3. I have to rebuild the project and rerun it.
  4. I found out that the realsense_d435i_color.launch.py file is too resource-heavy to run on a Raspberry Pi. It takes a few minutes before something appears on the screen. On the other hand, the realsense_d435i_stereo.launch.py file produces faster and better results (and without the 5-second warning).

I believe the 5-second warning occurs due to the overall computational intensity of RTAB-Map when processing color data.

matlabbe commented 1 day ago

You may not have needed to rebuild the full package. You can copy/paste the launch file from github or from the installed one on the computer, then modify the launch and start it directly with ros2 launch my_modified_realsense_d435i_stereo.launch.py.

Note sure why there is so much difference between color and stereo modes, they should run fairly the same, unless there is some synchronization issues or topic latency difference. Comparison on my desktop computer:

ros2 launch rtabmap_examples realsense_d435i_color.launch.py
[rgbd_odometry-2] [INFO] [1727657321.475066553] [rgbd_odometry]: Odom: quality=230, std dev=0.006382m|0.017944rad, update time=0.034914s delay=0.075090s
[rgbd_odometry-2] [INFO] [1727657321.544284506] [rgbd_odometry]: Odom: quality=239, std dev=0.006054m|0.021189rad, update time=0.034261s delay=0.077593s

ros2 launch rtabmap_examples realsense_d435i_stereo.launch.py
[stereo_odometry-2] [INFO] [1727657276.020022049] [stereo_odometry]: Odom: quality=257, std dev=0.019710m|0.022810rad, update time=0.049626s delay=0.083757s
[stereo_odometry-2] [INFO] [1727657276.085717890] [stereo_odometry]: Odom: quality=278, std dev=0.021567m|0.020040rad, update time=0.048890s delay=0.082494s

It is actually slower on stereo mode (because we need to compute the stereo correspondences).