mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-09 11:17:03 +08:00
Added RTABMAP_SYNC_USER_DATA (default OFF) and RTABMAP_SYNC_MULTI_RGBD (default ON, OFF on windows) build options. Fixed some compilation errors on Windows.
This commit is contained in:
@@ -230,6 +230,7 @@ void CommonDataSubscriber::rgbd4OdomScan3dInfoCallback(
|
||||
commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg);
|
||||
}
|
||||
|
||||
#ifdef RTABMAP_SYNC_USER_DATA
|
||||
// 2 RGBD + User Data
|
||||
void CommonDataSubscriber::rgbd4DataCallback(
|
||||
const rtabmap_ros::UserDataConstPtr& userDataMsg,
|
||||
@@ -413,6 +414,7 @@ void CommonDataSubscriber::rgbd4OdomDataScan3dInfoCallback(
|
||||
sensor_msgs::LaserScanConstPtr scanMsg; // Null
|
||||
commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg);
|
||||
}
|
||||
#endif
|
||||
|
||||
void CommonDataSubscriber::setupRGBD4Callbacks(
|
||||
ros::NodeHandle & nh,
|
||||
@@ -433,6 +435,7 @@ void CommonDataSubscriber::setupRGBD4Callbacks(
|
||||
rgbdSubs_[i] = new message_filters::Subscriber<rtabmap_ros::RGBDImage>;
|
||||
rgbdSubs_[i]->subscribe(nh, uFormat("rgbd_image%d", i), 1);
|
||||
}
|
||||
#ifdef RTABMAP_SYNC_USER_DATA
|
||||
if(subscribeOdom && subscribeUserData)
|
||||
{
|
||||
odomSub_.subscribe(nh, "odom", 1);
|
||||
@@ -478,7 +481,9 @@ void CommonDataSubscriber::setupRGBD4Callbacks(
|
||||
SYNC_DECL6(rgbd4OdomData, approxSync, queueSize, odomSub_, userDataSub_, (*rgbdSubs_[0]), (*rgbdSubs_[1]), (*rgbdSubs_[2]), (*rgbdSubs_[3]));
|
||||
}
|
||||
}
|
||||
else if(subscribeOdom)
|
||||
else
|
||||
#endif
|
||||
if(subscribeOdom)
|
||||
{
|
||||
odomSub_.subscribe(nh, "odom", 1);
|
||||
if(subscribeScan2d)
|
||||
@@ -522,6 +527,7 @@ void CommonDataSubscriber::setupRGBD4Callbacks(
|
||||
SYNC_DECL5(rgbd4Odom, approxSync, queueSize, odomSub_, (*rgbdSubs_[0]), (*rgbdSubs_[1]), (*rgbdSubs_[2]), (*rgbdSubs_[3]));
|
||||
}
|
||||
}
|
||||
#ifdef RTABMAP_SYNC_USER_DATA
|
||||
else if(subscribeUserData)
|
||||
{
|
||||
userDataSub_.subscribe(nh, "user_data", 1);
|
||||
@@ -566,6 +572,7 @@ void CommonDataSubscriber::setupRGBD4Callbacks(
|
||||
SYNC_DECL5(rgbd4Data, approxSync, queueSize, userDataSub_, (*rgbdSubs_[0]), (*rgbdSubs_[1]), (*rgbdSubs_[2]), (*rgbdSubs_[3]));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
if(subscribeScan2d)
|
||||
|
||||
Reference in New Issue
Block a user