introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.83k 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 3 weeks ago

lalondelalonde commented 3 weeks 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 3 weeks 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 3 weeks 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 3 weeks ago

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

lalondelalonde commented 2 weeks ago

How would you go about this?

Any idea what might cause such issue?

Thanks

matlabbe commented 2 weeks 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 2 weeks 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 2 weeks ago

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

matlabbe commented 2 weeks 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
lalondelalonde commented 1 day ago

Quick update:

I'm making progress but still having issues.

I created a URDF and it seems that my RVIZ is doing great now and that all topics are being published under base_link: 2024-11-21_14-40

I also succeeded to save a rosbag and have it play inside Rviz.

That being said... this rtabmap.. I can't make it work.

I can open it with a .launch file while my rviz is opening with the right topics and .config but still have nothing being publish in rtabmap.

So I will keep on working on this but wanted to update you all.

PEACE

lalondelalonde commented 20 hours ago

Improving, after 5 weeks! Finally some response in RTABMAP!

Nothing perfect but thats a milestone for non-programmer like me: 2024-11-21_20-03