RTAB-Map not publishing when using ekf_localization

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RTAB-Map not publishing when using ekf_localization

bolt
Hi.

I am attempting to use ekf_localization in combination with RTAB-Map on my robot. However, when I do this, the rtabmap node does not publish any data.

The command line output after running rtabmap end with:

   /rtabmap/rtabmap subscribed to (approx sync):
      /camera/rgb/image_rect_color,
      /camera/depth_registered/image_raw,
      /camera/rgb/camera_info,
      /odometry/filtered
   [ INFO] [1489070587.409150293]: rtabmap 0.11.8 started...

I have checked (using rostopic echo) that each of these topics are being published to, and they are. Here is the result of rqt_graph to show that they are being correctly subscribed to by rtabmap:



In addition, here is the TF free, confirming that ekf_localization is publishing the transform from odom to base_footprint:



As you can see, rtabmap is not publishing any transform from map to odom. Is there anything which rtabmap would be waiting for in order to start publishing, or anything which could be stopping it?

I should also mention that If I do not run ekf_localization, but instead just use RTAB-Map's rgbd_odometry node to publish the odometry, with all other parameters set the same, then rtabmap starts publishing successfully.

I would really appreciate your help.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-Map not publishing when using ekf_localization

matlabbe
Administrator
Hi,

rtabmap will publish /map -> /odom only if it is able to synchronize the input topics. What is the framerate of the input topics? You may increase the queue_size if odometry is published a lot faster than the other topics. Make sure they have all timestamps synchronized with the same machine (at least the clock of the machines should be synchronized if odometry is published from a different computer than the images from the camera).  

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTAB-Map not publishing when using ekf_localization

bolt
Mathieu,

I think you hit the nail on the head. I have the RTAB-Map running on one machine and ekf_localization running on another, and it seems that the timestamps were slightly out of sync. I used chrony, as per Section 5 of this guide, and it now seems to be working correctly.

Many thanks for your help,
Jon.