0
$\begingroup$

trying to run RtabMap on my realsense-435 device. I've set up all the topics and made sure they are published and subscribed, nevertheless, RtabMap gives me this error:

[ WARN] [1649509757.946524434]: /rtabmap/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. 
/rtabmap/rgbd_odometry subscribed to (approx sync):
   /rtabmap/odom \
   /dynamic_image \
   /dynamic_masked_image_raw \
   /sync_camera_info

P.S.: I've synced all these ( the last three topics), therefore there aren't any delays among them.

/rtabmap/odom topic doesn't get published. I'm guessing the issue might have been raised from a bad tf tree??!!

any help is appreciated

the codes I ran:

roslaunch realsense2_camera rs_camera.launch align_depth:=true

then

roslaunch rtabmap_ros rtabmap.launch     rtabmap_args:="--delete_db_on_start"     depth_topic:=/dynamic_masked_image_raw     rgb_topic:=/dynamic_image     camera_info_topic:=/sync_camera_info     approx_sync:=false

the three topics(i.e./dynamic_masked_image_raw /dynamic_image /sync_camera_info) are published with the same timestamp and contain the frames and camera info. each terminal is sourced with the specific workspace. out put of rostopic hz (the topics):

/dynamic_image              16.09   0.04809     0.09111     0.008274   354   
/dynamic_masked_image_raw   16.09   0.04802     0.09153     0.008369   354   
/sync_camera_info           16.09   0.048       0.09235     0.00834    353 

full output error:

[ WARN] [1649758359.612186938]: /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):
   /rtabmap/odom \
   /dynamic_image \
   /dynamic_masked_image_raw \
   /sync_camera_info \
   /rtabmap/odom_info
$\endgroup$
1
  • $\begingroup$ Can you please edit your question to provide more information about what you did to set up and run rtabmap (what guide you followed, etc.), and the full output, including the command you ran. $\endgroup$
    – Geoff
    Apr 11 at 22:17

2 Answers 2

0
$\begingroup$

You're showing that these topics are published:

/dynamic_image
/dynamic_masked_image_raw
/sync_camera_info    

but your warning says it's also subscribed to:

/rtabmap/odom
/rtabmap/odom_info

so what's up with those topics? You also mention that

the three topics(i.e./dynamic_masked_image_raw /dynamic_image /sync_camera_info) are published with the same timestamp

but you have FIVE topics that you're subscribed to, and your error message says (emphasizing):

[ WARN] [1649758359.612186938]: /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.

There is an answer here on the ROS forums that says, in part:

try setting approx_sync to true. Could be some of the topics don't have sync'd timesteps.

$\endgroup$
1
  • $\begingroup$ those topics are supposed to be published by "rtabmap/odometry". those other three topics are the actual inputs of the system and should be provided for the RtabMap to be run. Also turning on the approx_sync doesn't have any effect $\endgroup$
    – mobiiin
    Apr 14 at 11:18
0
$\begingroup$

turns out the culprit was the type of encoding that I used to convert the depth topic from ROS message to OpenCV. For others facing the same issue, the depth image should have 16UC1 encoding. I'm still trying to fix the problem but for now I've found the source of the issue

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.