Ask Your Question

rtabmap: Did not receive data since 5 seconds ! (but it should be receiving !)

asked 2020-09-10 11:24:50 -0500

Kendolph gravatar image

Hello, I'm using ros-noetic-desktop-full/focal,now 1.5.0-1focal.20200826.205403 amd64 [installed] on Ubuntu 20

rtabmap says it's not receiving data but the topics it's subscribed to are sending data.

[ INFO] [1599753269.979982470]: Odom: quality=374, std dev=0.008319m|0.038960rad, update time=0.048805s
[ INFO] [1599753270.384529419]: Odom: quality=366, std dev=0.008452m|0.027549rad, update time=0.055490s
[ INFO] [1599753270.783139929]: Odom: quality=382, std dev=0.008427m|0.036256rad, update time=0.054365s
[ INFO] [1599753270.980215457]: Odom: quality=381, std dev=0.009444m|0.027549rad, update time=0.052128s
[ INFO] [1599753271.187793313]: Odom: quality=366, std dev=0.009227m|0.041195rad, update time=0.057325s
[ INFO] [1599753271.582514826]: Odom: quality=361, std dev=0.008557m|0.032761rad, update time=0.052902s
[ INFO] [1599753271.782553265]: Odom: quality=375, std dev=0.008748m|0.036256rad, update time=0.051991s
[ WARN] [1599753272.071042131]: /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"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=5000).
/rtabmap/rtabmap subscribed to (approx sync):
[ INFO] [1599753272.190012838]: Odom: quality=359, std dev=0.008809m|0.027549rad, update time=0.056297s
[ INFO] [1599753272.393765113]: Odom: quality=374, std dev=0.008249m|0.036256rad, update time=0.061737s

I can see the odometry with rtabmapviz and as you can see it's working (well ?) . I've check all 5 topics one by one because multiple topic checks fails with this

rostopic hz /stereo_odometry /stereo_camera/left/image_rect /stereo_camera/left/camera_info
subscribed to [/stereo_odometry]
subscribed to [/stereo_camera/left/image_rect]
subscribed to [/stereo_camera/left/camera_info]
Traceback (most recent call last):  
File "/opt/ros/noetic/bin/rostopic",
line 35, in <module>
    rostopic.rostopicmain()   File "/opt/ros/noetic/lib/python3/dist-packages/rostopic/",
line 2132, in rostopicmain
    _rostopic_cmd_hz(argv)   File "/opt/ros/noetic/lib/python3/dist-packages/rostopic/",
line 1523, in _rostopic_cmd_hz
    _rostopic_hz(topics, window_size=window_size,
filter_expr=filter_expr,   File
line 323, in _rostopic_hz
    rt.print_hz(topics)   File "/opt/ros/noetic/lib/python3/dist-packages/rostopic/",
line 270, in print_hz
    print(_get_ascii_table(header, stats))   File
line 285, in _get_ascii_table
    body = '\n'.join('   '.join(cols[h][i] for h in header) for
i in xrange(n_rows)) NameError: name
'xrange' is not defined

So after checking the topics one by one all of them are publishing data at about 4-5 messages per second. I'm lost :) . Am I misunderstanding the message somehow ?

Thanks in advance

edit retag flag offensive close merge delete


I managed to "fix" the error with rostopic by just renaming xrange() to range()

Kendolph gravatar image Kendolph  ( 2020-09-12 11:12:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-09-10 13:28:57 -0500

matlabbe gravatar image

updated 2020-09-15 17:38:33 -0500

For rtabmap node, try with approx_sync:=false as you are using stereo data (which should be exactly synchronized). You can also try to increase the queue_size. Note also that on Noetic, we got some issues with message_filters not able to synchronize some topics for some unknown reasons. We did a fix recently to set the queue_size of individual subscribers (which was 1 before like in this tutorial) with same queue_size of the sync policy. This fix is not in binaries yet, you would have to build rtabmap_ros from source:

$ sudo apt remove ros-$ROS_DISTRO-rtabmap-ros
$ cd ~/catkin_ws/src
$ git clone
$ cd ~/catkin_ws
$ catkin_make

If you have compilation errors with rtabmap library, you will have to build rtabmap from source too:

$ sudo apt remove ros-$ROS_DISTRO-rtabmap
$ cd ~
$ git clone
$ cd ~/rtabmap/build
$ cmake ..
$ make -j4
$ sudo make install

Then go back try building your catkin workspace.

edit flag offensive delete link more


The first thing (approx_sync) didn't work. It even complains about it now :) . And the queue_size is already 5000.... I'll try to rebuild rtabmap-ros now and see what happens

[ INFO] [1599909781.316510633]: Odom: quality=404, std dev=0.004559m|0.027549rad, update time=0.046234s
[ WARN] [1599909781.590796230]: /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.
Kendolph gravatar image Kendolph  ( 2020-09-12 06:26:37 -0500 )edit

I had to hard code PCL_ROOT to "/usr" after :

# PCLConfig.cmake is installed to PCL_ROOT/cmake
  get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)
# PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y
  get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../.." ABSOLUTE)

CMake was supposed to be a fix / better to "configure" scripts lol. Not getting there any time soon I guess :)

Kendolph gravatar image Kendolph  ( 2020-09-12 09:57:29 -0500 )edit

Well basically nothing changed with the new 'rtabmap_ros' :) I fixed the 'rostopic' this is the output.

               topic                    rate   min_delta   max_delta   std_dev    window
/stereo_odometry                       5.006   0.184       0.2092      0.007313   21
/stereo_camera/left/image_rect_color   5.001   0.1925      0.2051      0.003302   21
/stereo_camera/left/camera_info        5.0     0.1952      0.2059      0.002057   20
/stereo_camera/right/image_rect        5.0     0.1823      0.2169      0.007288   20
/stereo_camera/right/camera_info       5.0     0.1959      0.2036      0.001369   20
Kendolph gravatar image Kendolph  ( 2020-09-12 11:15:46 -0500 )edit

A queue_size of 5000 is too huge, keep it at 10 by default. Sorry I messed up the answer, you should build master branch of rtabmap_ros to have the latest fixes (I'll update the answer).

matlabbe gravatar image matlabbe  ( 2020-09-15 17:35:43 -0500 )edit

I guess I have to - it needs rtabmap 0.20.2 and the package is "ros-noetic-rtabmap/focal,now 0.20.0-3focal.20200812.201538 amd64 [installed,auto-removable]"

Kendolph gravatar image Kendolph  ( 2020-09-17 09:39:13 -0500 )edit

Yeah, I added this detail to the answer too, rebuild also rtabmap.

matlabbe gravatar image matlabbe  ( 2020-09-17 10:58:04 -0500 )edit

Did it - I had to add 4 more Gigs to the test machine apparently for C++ 4GB RAM (I even killed the X server) is not enough - one of the (many) reasons I prefer C :)
So I got to here (Odometry still works fine):

[FATAL] (2020-09-17 22:14:33.619) Features2d.cpp:745::generateDescriptors() Condition (descriptors.rows == (int)keypoints.size()) not met! [descriptors=0, keypoints=1000]
terminate called after throwing an instance of 'UException'
  what():  [FATAL] (2020-09-17 22:14:33.619) Features2d.cpp:745::generateDescriptors() Condition (descriptors.rows == (int)keypoints.size()) not met! [descriptors=0, keypoints=1000]

Any ideas ? Thank you for the help so far ! :)

Kendolph gravatar image Kendolph  ( 2020-09-17 14:22:08 -0500 )edit

"Fixed" the problem - BRIEF was not available. But I got it to here - buffer overflow sounds like a problem :)

[ INFO] [1600704092.320869806]: rtabmap (1): Rate=1.00s, Limit=0.700s, RTAB-Map=0.1281s, Maps update=0.0017s pub=0.0004s (local map=1, WM=1)
[ INFO] [1600704092.395859803]: Odom: quality=417, std dev=0.010630m|0.000032rad, update time=0.027884s
*** buffer overflow detected ***: terminated
*** buffer overflow detected ***: terminated
[rtabmap/rtabmap-7] process has died [pid 50201, exit code -6, cmd /home/tbyte/catkin_ws/devel/lib/rtabmap_ros/rtabmap --delete_db_on_start left/image_rect:=/stereo_camera/left/image_rect_color right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info odom:=/stereo_odometry __name:=rtabmap
Kendolph gravatar image Kendolph  ( 2020-09-21 11:05:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-09-10 11:24:50 -0500

Seen: 35 times

Last updated: Sep 15