Skip to content

Commit

Permalink
Fixed rgbd_cameras=0 when rtabmap is not built with multi rgbd callba…
Browse files Browse the repository at this point in the history
…cks #1046
  • Loading branch information
matlabbe committed Oct 14, 2023
1 parent 68066b7 commit 61bd84b
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions rtabmap_sync/src/CommonDataSubscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,22 +518,8 @@ void CommonDataSubscriber::setupCallbacks(
}
else if(subscribedToRGBD_)
{
if(rgbdCameras == 0)
{
setupRGBDXCallbacks(
nh,
pnh,
subscribedToOdom_,
subscribeUserData,
subscribeScan2d,
subscribeScan3d,
subscribeScanDesc,
subscribeOdomInfo,
queueSize_,
approxSync_);
}
#ifdef RTABMAP_SYNC_MULTI_RGBD
else if(rgbdCameras >= 6)
if(rgbdCameras >= 6)
{
if(rgbdCameras > 6)
{
Expand Down Expand Up @@ -619,6 +605,20 @@ void CommonDataSubscriber::setupCallbacks(
"but you will have to synchronize RGBDImage topics yourself.");
}
#endif
else if(rgbdCameras == 0)
{
setupRGBDXCallbacks(
nh,
pnh,
subscribedToOdom_,
subscribeUserData,
subscribeScan2d,
subscribeScan3d,
subscribeScanDesc,
subscribeOdomInfo,
queueSize_,
approxSync_);
}
else
{
setupRGBDCallbacks(
Expand Down

0 comments on commit 61bd84b

Please sign in to comment.