rtabmap won't subscribe to scan topic when in stereo mode

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

rtabmap won't subscribe to scan topic when in stereo mode

blue_ringed_octopus
hi, i'm trying to run rtabmap with stereo camera and a lidar (in gazebo). But i cannot get any 2d occupancy grid map from rtabmap

in the terminal it shows
[ WARN] (2020-08-24 18:56:17.529) OccupancyGrid.cpp:357::createLocalMap() Cannot create local map, scan is empty (node=16).

but in rviz, there are clearly lidar scan publishing. Then i checked the rqt graph

rtabmap was not subsribed to scan at all.

Then I switch from stereo mode to RGBD mode without changing anything else, suddenly the scan starts working again. any idea whats wrong?

here is my launch file
rtabmap_stereo.launch
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap won't subscribe to scan topic when in stereo mode

matlabbe
Administrator
With stereo input, we cannot synchronize to laser scan. The trick is to use rgbd_sync set to true in rtabmap.launch. Set also approx_rgbd_sync to false because you have stereo data. approx_sync should be set to true to synchronize scan with stereo data.

roslaunch rtabmap_stereo.launch rgbd_sync:=true approx_rgbd_sync:=false approx_sync:=true
Reply | Threaded
Open this post in threaded view
|

Re: rtabmap won't subscribe to scan topic when in stereo mode

blue_ringed_octopus
It worked! thanks!