36 #define IMAGE_CONVERSION() \ 38 std::vector<cv_bridge::CvImageConstPtr> imageMsgs(4); \ 39 std::vector<cv_bridge::CvImageConstPtr> depthMsgs(4); \ 40 rtabmap_ros::toCvShare(image1Msg, imageMsgs[0], depthMsgs[0]); \ 41 rtabmap_ros::toCvShare(image2Msg, imageMsgs[1], depthMsgs[1]); \ 42 rtabmap_ros::toCvShare(image3Msg, imageMsgs[2], depthMsgs[2]); \ 43 rtabmap_ros::toCvShare(image4Msg, imageMsgs[3], depthMsgs[3]); \ 44 if(!depthMsgs[0].get()) \ 46 std::vector<sensor_msgs::CameraInfo> cameraInfoMsgs; \ 47 cameraInfoMsgs.push_back(image1Msg->rgb_camera_info); \ 48 cameraInfoMsgs.push_back(image2Msg->rgb_camera_info); \ 49 cameraInfoMsgs.push_back(image3Msg->rgb_camera_info); \ 50 cameraInfoMsgs.push_back(image4Msg->rgb_camera_info); \ 51 std::vector<rtabmap_ros::GlobalDescriptor> globalDescriptorMsgs; \ 52 std::vector<std::vector<rtabmap_ros::KeyPoint> > localKeyPoints; \ 53 std::vector<std::vector<rtabmap_ros::Point3f> > localPoints3d; \ 54 std::vector<cv::Mat> localDescriptors; \ 55 if(!image1Msg->global_descriptor.data.empty()) \ 56 globalDescriptorMsgs.push_back(image1Msg->global_descriptor); \ 57 if(!image2Msg->global_descriptor.data.empty()) \ 58 globalDescriptorMsgs.push_back(image2Msg->global_descriptor); \ 59 if(!image3Msg->global_descriptor.data.empty()) \ 60 globalDescriptorMsgs.push_back(image3Msg->global_descriptor); \ 61 if(!image4Msg->global_descriptor.data.empty()) \ 62 globalDescriptorMsgs.push_back(image4Msg->global_descriptor); \ 63 localKeyPoints.push_back(image1Msg->key_points); \ 64 localKeyPoints.push_back(image2Msg->key_points); \ 65 localKeyPoints.push_back(image3Msg->key_points); \ 66 localKeyPoints.push_back(image4Msg->key_points); \ 67 localPoints3d.push_back(image1Msg->points); \ 68 localPoints3d.push_back(image2Msg->points); \ 69 localPoints3d.push_back(image3Msg->points); \ 70 localPoints3d.push_back(image4Msg->points); \ 71 localDescriptors.push_back(rtabmap::uncompressData(image1Msg->descriptors)); \ 72 localDescriptors.push_back(rtabmap::uncompressData(image2Msg->descriptors)); \ 73 localDescriptors.push_back(rtabmap::uncompressData(image3Msg->descriptors)); \ 74 localDescriptors.push_back(rtabmap::uncompressData(image4Msg->descriptors)); 77 void CommonDataSubscriber::rgbd4Callback(
78 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
79 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
80 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
81 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
85 nav_msgs::OdometryConstPtr odomMsg;
86 rtabmap_ros::UserDataConstPtr userDataMsg;
87 sensor_msgs::LaserScan scanMsg;
88 sensor_msgs::PointCloud2 scan3dMsg;
89 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
90 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
92 void CommonDataSubscriber::rgbd4Scan2dCallback(
93 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
94 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
95 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
96 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
97 const sensor_msgs::LaserScanConstPtr& scanMsg)
101 nav_msgs::OdometryConstPtr odomMsg;
102 rtabmap_ros::UserDataConstPtr userDataMsg;
103 sensor_msgs::PointCloud2 scan3dMsg;
104 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
105 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
107 void CommonDataSubscriber::rgbd4Scan3dCallback(
108 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
109 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
110 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
111 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
112 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
116 nav_msgs::OdometryConstPtr odomMsg;
117 rtabmap_ros::UserDataConstPtr userDataMsg;
118 sensor_msgs::LaserScan scanMsg;
119 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
120 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
122 void CommonDataSubscriber::rgbd4ScanDescCallback(
123 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
124 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
125 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
126 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
127 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
131 nav_msgs::OdometryConstPtr odomMsg;
132 rtabmap_ros::UserDataConstPtr userDataMsg;
133 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
134 if(!scanDescMsg->global_descriptor.data.empty())
136 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
138 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
140 void CommonDataSubscriber::rgbd4InfoCallback(
141 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
142 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
143 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
144 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
145 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
149 nav_msgs::OdometryConstPtr odomMsg;
150 rtabmap_ros::UserDataConstPtr userDataMsg;
151 sensor_msgs::LaserScan scanMsg;
152 sensor_msgs::PointCloud2 scan3dMsg;
153 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
157 void CommonDataSubscriber::rgbd4OdomCallback(
158 const nav_msgs::OdometryConstPtr & odomMsg,
159 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
160 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
161 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
162 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
166 rtabmap_ros::UserDataConstPtr userDataMsg;
167 sensor_msgs::LaserScan scanMsg;
168 sensor_msgs::PointCloud2 scan3dMsg;
169 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
170 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
172 void CommonDataSubscriber::rgbd4OdomScan2dCallback(
173 const nav_msgs::OdometryConstPtr & odomMsg,
174 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
175 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
176 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
177 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
178 const sensor_msgs::LaserScanConstPtr& scanMsg)
182 rtabmap_ros::UserDataConstPtr userDataMsg;
183 sensor_msgs::PointCloud2 scan3dMsg;
184 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
185 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
187 void CommonDataSubscriber::rgbd4OdomScan3dCallback(
188 const nav_msgs::OdometryConstPtr & odomMsg,
189 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
190 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
191 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
192 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
193 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
197 rtabmap_ros::UserDataConstPtr userDataMsg;
198 sensor_msgs::LaserScan scanMsg;
199 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
200 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
202 void CommonDataSubscriber::rgbd4OdomScanDescCallback(
203 const nav_msgs::OdometryConstPtr & odomMsg,
204 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
205 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
206 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
207 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
208 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
212 rtabmap_ros::UserDataConstPtr userDataMsg;
213 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
214 if(!scanDescMsg->global_descriptor.data.empty())
216 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
218 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
220 void CommonDataSubscriber::rgbd4OdomInfoCallback(
221 const nav_msgs::OdometryConstPtr & odomMsg,
222 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
223 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
224 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
225 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
226 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
230 rtabmap_ros::UserDataConstPtr userDataMsg;
231 sensor_msgs::LaserScan scanMsg;
232 sensor_msgs::PointCloud2 scan3dMsg;
233 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
236 #ifdef RTABMAP_SYNC_USER_DATA 238 void CommonDataSubscriber::rgbd4DataCallback(
239 const rtabmap_ros::UserDataConstPtr& userDataMsg,
240 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
241 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
242 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
243 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
247 nav_msgs::OdometryConstPtr odomMsg;
248 sensor_msgs::LaserScan scanMsg;
249 sensor_msgs::PointCloud2 scan3dMsg;
250 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
251 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
253 void CommonDataSubscriber::rgbd4DataScan2dCallback(
254 const rtabmap_ros::UserDataConstPtr& userDataMsg,
255 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
256 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
257 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
258 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
259 const sensor_msgs::LaserScanConstPtr& scanMsg)
263 nav_msgs::OdometryConstPtr odomMsg;
264 sensor_msgs::PointCloud2 scan3dMsg;
265 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
266 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
268 void CommonDataSubscriber::rgbd4DataScan3dCallback(
269 const rtabmap_ros::UserDataConstPtr& userDataMsg,
270 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
271 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
272 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
273 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
274 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
278 nav_msgs::OdometryConstPtr odomMsg;
279 sensor_msgs::LaserScan scanMsg;
280 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
281 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
283 void CommonDataSubscriber::rgbd4DataScanDescCallback(
284 const rtabmap_ros::UserDataConstPtr& userDataMsg,
285 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
286 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
287 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
288 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
289 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
293 nav_msgs::OdometryConstPtr odomMsg;
294 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
295 if(!scanDescMsg->global_descriptor.data.empty())
297 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
299 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
301 void CommonDataSubscriber::rgbd4DataInfoCallback(
302 const rtabmap_ros::UserDataConstPtr& userDataMsg,
303 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
304 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
305 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
306 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
307 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
311 nav_msgs::OdometryConstPtr odomMsg;
312 sensor_msgs::LaserScan scanMsg;
313 sensor_msgs::PointCloud2 scan3dMsg;
314 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
318 void CommonDataSubscriber::rgbd4OdomDataCallback(
319 const nav_msgs::OdometryConstPtr& odomMsg,
320 const rtabmap_ros::UserDataConstPtr& userDataMsg,
321 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
322 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
323 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
324 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
328 sensor_msgs::LaserScan scanMsg;
329 sensor_msgs::PointCloud2 scan3dMsg;
330 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
331 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
333 void CommonDataSubscriber::rgbd4OdomDataScan2dCallback(
334 const nav_msgs::OdometryConstPtr& odomMsg,
335 const rtabmap_ros::UserDataConstPtr& userDataMsg,
336 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
337 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
338 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
339 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
340 const sensor_msgs::LaserScanConstPtr& scanMsg)
344 sensor_msgs::PointCloud2 scan3dMsg;
345 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
346 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
348 void CommonDataSubscriber::rgbd4OdomDataScan3dCallback(
349 const nav_msgs::OdometryConstPtr& odomMsg,
350 const rtabmap_ros::UserDataConstPtr& userDataMsg,
351 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
352 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
353 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
354 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
355 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
359 sensor_msgs::LaserScan scanMsg;
360 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
361 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
363 void CommonDataSubscriber::rgbd4OdomDataScanDescCallback(
364 const nav_msgs::OdometryConstPtr& odomMsg,
365 const rtabmap_ros::UserDataConstPtr& userDataMsg,
366 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
367 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
368 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
369 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
370 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
374 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
375 if(!scanDescMsg->global_descriptor.data.empty())
377 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
379 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
381 void CommonDataSubscriber::rgbd4OdomDataInfoCallback(
382 const nav_msgs::OdometryConstPtr& odomMsg,
383 const rtabmap_ros::UserDataConstPtr& userDataMsg,
384 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
385 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
386 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
387 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
388 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
392 sensor_msgs::LaserScan scanMsg;
393 sensor_msgs::PointCloud2 scan3dMsg;
394 commonDepthCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
398 void CommonDataSubscriber::setupRGBD4Callbacks(
402 bool subscribeUserData,
403 bool subscribeScan2d,
404 bool subscribeScan3d,
405 bool subscribeScanDesc,
406 bool subscribeOdomInfo,
413 for(
int i=0; i<4; ++i)
418 #ifdef RTABMAP_SYNC_USER_DATA 419 if(subscribeOdom && subscribeUserData)
423 if(subscribeScanDesc)
427 if(subscribeOdomInfo)
430 ROS_WARN(
"subscribe_odom_info ignored...");
434 else if(subscribeScan2d)
438 if(subscribeOdomInfo)
441 ROS_WARN(
"subscribe_odom_info ignored...");
445 else if(subscribeScan3d)
449 if(subscribeOdomInfo)
452 ROS_WARN(
"subscribe_odom_info ignored...");
456 else if(subscribeOdomInfo)
472 if(subscribeScanDesc)
476 if(subscribeOdomInfo)
479 ROS_WARN(
"subscribe_odom_info ignored...");
483 else if(subscribeScan2d)
487 if(subscribeOdomInfo)
490 ROS_WARN(
"subscribe_odom_info ignored...");
494 else if(subscribeScan3d)
498 if(subscribeOdomInfo)
501 ROS_WARN(
"subscribe_odom_info ignored...");
505 else if(subscribeOdomInfo)
516 #ifdef RTABMAP_SYNC_USER_DATA 517 else if(subscribeUserData)
520 if(subscribeScanDesc)
524 if(subscribeOdomInfo)
527 ROS_WARN(
"subscribe_odom_info ignored...");
531 else if(subscribeScan2d)
535 if(subscribeOdomInfo)
538 ROS_WARN(
"subscribe_odom_info ignored...");
542 else if(subscribeScan3d)
546 if(subscribeOdomInfo)
549 ROS_WARN(
"subscribe_odom_info ignored...");
553 else if(subscribeOdomInfo)
567 if(subscribeScanDesc)
571 if(subscribeOdomInfo)
574 ROS_WARN(
"subscribe_odom_info ignored...");
578 else if(subscribeScan2d)
582 if(subscribeOdomInfo)
585 ROS_WARN(
"subscribe_odom_info ignored...");
589 else if(subscribeScan3d)
593 if(subscribeOdomInfo)
596 ROS_WARN(
"subscribe_odom_info ignored...");
600 else if(subscribeOdomInfo)
std::string uFormat(const char *fmt,...)
#define SYNC_DECL7(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5, SUB6)
#define SYNC_DECL5(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4)
virtual void commonDepthCallback(const nav_msgs::OdometryConstPtr &odomMsg, const rtabmap_ros::UserDataConstPtr &userDataMsg, const std::vector< cv_bridge::CvImageConstPtr > &imageMsgs, const std::vector< cv_bridge::CvImageConstPtr > &depthMsgs, const std::vector< sensor_msgs::CameraInfo > &cameraInfoMsgs, const sensor_msgs::LaserScan &scanMsg, const sensor_msgs::PointCloud2 &scan3dMsg, const rtabmap_ros::OdomInfoConstPtr &odomInfoMsg, const std::vector< rtabmap_ros::GlobalDescriptor > &globalDescriptorMsgs=std::vector< rtabmap_ros::GlobalDescriptor >(), const std::vector< std::vector< rtabmap_ros::KeyPoint > > &localKeyPoints=std::vector< std::vector< rtabmap_ros::KeyPoint > >(), const std::vector< std::vector< rtabmap_ros::Point3f > > &localPoints3d=std::vector< std::vector< rtabmap_ros::Point3f > >(), const std::vector< cv::Mat > &localDescriptors=std::vector< cv::Mat >())=0
message_filters::Subscriber< rtabmap_ros::UserData > userDataSub_
bool subscribedToOdomInfo_
#define SYNC_DECL6(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5)
message_filters::Subscriber< rtabmap_ros::OdomInfo > odomInfoSub_
#define IMAGE_CONVERSION()
bool subscribedToScanDescriptor_
message_filters::Subscriber< sensor_msgs::LaserScan > scanSub_
message_filters::Subscriber< rtabmap_ros::ScanDescriptor > scanDescSub_
#define SYNC_DECL4(PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3)
message_filters::Subscriber< nav_msgs::Odometry > odomSub_
message_filters::Subscriber< sensor_msgs::PointCloud2 > scan3dSub_
void subscribe(ros::NodeHandle &nh, const std::string &topic, uint32_t queue_size, const ros::TransportHints &transport_hints=ros::TransportHints(), ros::CallbackQueueInterface *callback_queue=0)
std::vector< message_filters::Subscriber< rtabmap_ros::RGBDImage > * > rgbdSubs_