introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.79k stars 787 forks source link

rtabmap/rgbd_odometry: Did not receive data since 5 seconds! (/camera/color/image_raw \ + /camera/aligned_depth_to_color/image_raw \ + /camera/color/camera_info) #1372

Open lalondelalonde opened 4 days ago

lalondelalonde commented 4 days ago

Hello guys,

I've been stock on this for days now... 2024-10-31_17-41

I'm currently trying to build a mobile 3d mapping kit using:

My rtabmap won't work with neither D435i or M2M2 Mapper (zero success so far). 2024-10-31_18-00

I've been able to make my sensor work in Rviz. M2M2 is doing a real-time 2d map (nice), IMU seems to be working (I'm no expert), pointcloud, odometry and so on. D435i is also being detected as you see in the screen shot: 2024-10-31_17-52 D435i is also working in Realsense Viewer: 2024-10-31_17-58

Please note that my coding skill is not high.

I've been trying to see what is the issue. /camera/color/image_raw \ + /camera/aligned_depth_to_color/image_raw \ + /camera/color/camera_info are all published under : rostopic list.

If I run rostopic hz, all topic will display : No new message. I've update dependencies and package and everything seems to be up-to-date.

I can't achieve the RGB-D Handheld Mapping tutorial.

Thank you all Peace & Blessings

matlabbe commented 4 days ago

If I run rostopic hz, all topic will display : No new message.

You are on something, rostopic hz should at least show some frame rate for sensor topics. If you can record/share a rosbag of the camera and scan topics, that would be useful, e.g. (note that I guessed the scan topic name):

rosbag record /tf /tf_static /camera/color/image_raw /camera/aligned_depth_to_color/image_raw /camera/color/camera_info /scan

You may also show which commands you tried to start realsense, the lidar and rtabmap.

lalondelalonde commented 4 days ago

Hello Mat, thank you for the input.

I went for : rosbag record /tf /tf_static /camera/color/image_raw /camera/aligned_depth_to_color/image_raw /camera/color/camera_info /camera/aligned_depth_to_color/camera_info /slamware_ros_sdk_server_node/scan

I've done 2 rosbag for 2 realsense commands:

ROSBAG1: Commands used:

M2M2 = roslaunch slamware_ros_sdk slamware_ros_sdk_server_node.launch ip_address:=xxx.xxx.xx.x roslaunch slamware_ros_sdk view_slamware_ros_sdk_server_node.launch Rtabmap = roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" rviz:=true D435i = roslaunch realsense2_camera rs_camera.launch 2024-11-01_10-34

ROSBAG2: Commands used:

M2M2 = roslaunch slamware_ros_sdk slamware_ros_sdk_server_node.launch ip_address:=xxx.xxx.xx.x roslaunch slamware_ros_sdk view_slamware_ros_sdk_server_node.launch Rtabmap = roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" rviz:=true D435i =

 # ISSUE: Use unite_imu_method:="copy" if imu topics keep stopping
 roslaunch realsense2_camera rs_camera.launch \
    align_depth:=true \
    unite_imu_method:="linear_interpolation" \
    enable_gyro:=true \
     enable_accel:=true

 rosrun imu_filter_madgwick imu_filter_node \
    _use_mag:=false \
    _publish_tf:=false \
    _world_frame:="enu" \
    /imu/data_raw:=/camera/imu \
    /imu/data:=/rtabmap/imu

2024-11-01_10-35

Seems like the command #2 for the D435i is failing to work properly, but the #1 seems to be working fine.

Still, with both, rtabmap is still giving the error message.

Peace.

matlabbe commented 4 days ago

In rosbag 1, the depth image topic is missing. In rosbag 2, only the scan topic is there.

lalondelalonde commented 3 days ago

How would you go about this?

Any idea what might cause such issue?

Thanks

matlabbe commented 3 days ago

Can you do this:

roslaunch realsense2_camera rs_camera.launch \
    align_depth:=true \
    unite_imu_method:="linear_interpolation" \
    enable_gyro:=true \
     enable_accel:=true

roslaunch slamware_ros_sdk slamware_ros_sdk_server_node.launch ip_address:=xxx.xxx.xx.x 

roslaunch slamware_ros_sdk view_slamware_ros_sdk_server_node.launch

rosbag record /tf /tf_static \
   /camera/imu \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /slamware_ros_sdk_server_node/scan

Record 10 sec, then verify that all those topics are in the rosbag. If one or more are missing, you should debug why the corresponding nodes are not publishing them. If all topics are there, can you share the rosbag on a dropbox/googledrive?

lalondelalonde commented 3 days ago

Hello Mat, I really appreciate the time, sincerely thank you.

As discussed, I ran:

followed by :

Please note I didn't run any rtabmap command.

Here is the result:

2024-11-02_10-52

I also ran rostopic list (all camera topics are there, even IMU that doesn't show up on the image): 2024-11-02_10-54

I assume I will have to try to debug those nodes since none (camera related) are actually showing up.

Peace.

lalondelalonde commented 3 days ago

Just want to add a rqt_graph: 2024-11-02_12-15

matlabbe commented 2 days ago

Yes, you would need to debug why the camera is not publishing anything. For convenience, instead of recording a bag, you can debug with:

rostopic hz \
   /camera/imu \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /slamware_ros_sdk_server_node/scan