Robotics StackExchange | Archived questions

bag from D435i cannot run rtabmap_ros

The SDK of D435i can save bag files (from PC without ROS). And i use(pc with ROS) rosbag play the bag ,i can see the rgb image and depth image in topics (by rviz and rostopic list):

depth_topic:=/device_0/sensor_0/Depth_0/image/data rgb_topic:=/device_0/sensor_1/Color_0/image/data camera_info_topic:=/device_0/sensor_1/Color_0/info/camera_info

So i change default of rtabmap:

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info approx_sync:=false

to:

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/device_0/sensor_0/Depth_0/image/data rgb_topic:=/device_0/sensor_1/Color_0/image/data camera_info_topic:=/device_0/sensor_1/Color_0/info/camera_info approx_sync:=false

And when i run it , errors come again:

[ WARN] [1574141417.225224637, 0.005708109]: /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):
   /rtabmap/odom,
   /device_0/sensor_1/Color_0/image/data,
   /device_0/sensor_0/Depth_0/image/data,
   /device_0/sensor_1/Color_0/info/camera_info,
   /rtabmap/odom_info

I try to add "--clock" to "rosbag play" and " usesimtime:=true" to "roslaunch.." too and change "approxsync:=false" to "approxsync:=true" . And i all failed! Any suggestion is great! Thanks! (My labtop cannot use ROS and rtabmap ,and my desktop can use rtabmap .And our professor buy D435i for us to run outdoors' slam .So i have to save bag from labtop, and run it in my desktop!)

when

rostopic hz /device_0/sensor_1/Color_0/image/data /device_0/sensor_0/Depth_0/image/data /device_0/sensor_1/Color_0/info/camera_info

get:

subscribed to [/device_0/sensor_1/Color_0/image/data]
subscribed to [/device_0/sensor_0/Depth_0/image/data]
subscribed to [/device_0/sensor_1/Color_0/info/camera_info]

                topic                    rate   min_delta   max_delta   std_dev    window
=========================================================================================
/device_0/sensor_1/Color_0/image/data   9.282   0.1017      0.117       0.006138   7     
/device_0/sensor_0/Depth_0/image/data   30.04   0.02849     0.03895     0.002327   7     

                topic                    rate   min_delta   max_delta   std_dev    window
=========================================================================================
/device_0/sensor_1/Color_0/image/data   9.467   0.1004      0.117       0.005116   17    
/device_0/sensor_0/Depth_0/image/data   29.99   0.02769     0.03895     0.002151   17    

It may caused by caminfo missing and wrong topics (It needs aligneddepthtocolor, but SDK only provides origin). And i try another way : When i use D435i and RTABmap ,it works .But if i record the topics ,and replay it. it showed:

    [ WARN] [1574562843.229735865]: odometry: Could not get transform from camera_link to camera_color_optical_frame (stamp=1574511134.203767) after 0.200000 seconds ("wait_for_transform_duration"=0.200000)! Error="canTransform: target_frame camera_link does not exist. canTransform: source_frame camera_color_optical_frame does not exist.. canTransform returned after 0.201408 timeout was 0.2."
[ WARN] [1574562843.449741623]: odometry: Could not get transform from camera_link to camera_color_optical_frame (stamp=1574511134.425091) after 0.200000 seconds ("wait_for_transform_duration"=0.200000)! Error="canTransform: target_frame camera_link does not exist. canTransform: source_frame camera_color_optical_frame does not exist.. canTransform returned after 0.200914 timeout was 0.2."
[ WARN] [1574562843.652638689]: odometry: Could not get transform from camera_link to camera_color_optical_frame (stamp=1574511134.627412) after 0.200000 seconds ("wait_for_transform_duration"=0.200000)! Error="canTransform: target_frame camera_link does not exist. canTransform: source_frame camera_color_optical_frame does not exist.. canTransform returned after 0.200092 timeout was 0.2."
[ WARN] [1574562844.946892773]: /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.

by:

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info approx_sync:=false

and the topic in my rosbag:

/camera/aligned_depth_to_color/image_raw
/camera/color/camera_info
/camera/color/image_raw
/clock
/rosout
/rosout_agg

Is something i missing?

Asked by lixz123007 on 2019-11-19 00:40:11 UTC

Comments

Could you run a rostopic list when only playing the bag file (not rtabmap) and post it?

Asked by bob-ROS on 2019-11-19 04:01:41 UTC

Post also output of $ rostopic hz /device_0/sensor_1/Color_0/image/data /device_0/sensor_0/Depth_0/image/data /device_0/sensor_1/Color_0/info/camera_info

Asked by matlabbe on 2019-11-19 09:31:52 UTC

I have post that, the rate is different.Is that i problem?

Asked by lixz123007 on 2019-11-21 00:12:16 UTC

The camera_info is missing.

Asked by matlabbe on 2019-11-21 10:20:39 UTC

But when i try rostopic echo /device_0/sensor_1/Color_0/info/camera_info ,it has messages! Maybe i will try other camera_info

Asked by lixz123007 on 2019-11-21 23:29:34 UTC

For the TF warning, you need to also record /tf and /tf_static in your bag.

Asked by matlabbe on 2019-11-24 09:08:44 UTC

Answers