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<sensor_msgs::CameraInfo> depthCameraInfoMsgs; \ 52 depthCameraInfoMsgs.push_back(image1Msg->depth_camera_info); \ 53 depthCameraInfoMsgs.push_back(image2Msg->depth_camera_info); \ 54 depthCameraInfoMsgs.push_back(image3Msg->depth_camera_info); \ 55 depthCameraInfoMsgs.push_back(image4Msg->depth_camera_info); \ 56 std::vector<rtabmap_ros::GlobalDescriptor> globalDescriptorMsgs; \ 57 std::vector<std::vector<rtabmap_ros::KeyPoint> > localKeyPoints; \ 58 std::vector<std::vector<rtabmap_ros::Point3f> > localPoints3d; \ 59 std::vector<cv::Mat> localDescriptors; \ 60 if(!image1Msg->global_descriptor.data.empty()) \ 61 globalDescriptorMsgs.push_back(image1Msg->global_descriptor); \ 62 if(!image2Msg->global_descriptor.data.empty()) \ 63 globalDescriptorMsgs.push_back(image2Msg->global_descriptor); \ 64 if(!image3Msg->global_descriptor.data.empty()) \ 65 globalDescriptorMsgs.push_back(image3Msg->global_descriptor); \ 66 if(!image4Msg->global_descriptor.data.empty()) \ 67 globalDescriptorMsgs.push_back(image4Msg->global_descriptor); \ 68 localKeyPoints.push_back(image1Msg->key_points); \ 69 localKeyPoints.push_back(image2Msg->key_points); \ 70 localKeyPoints.push_back(image3Msg->key_points); \ 71 localKeyPoints.push_back(image4Msg->key_points); \ 72 localPoints3d.push_back(image1Msg->points); \ 73 localPoints3d.push_back(image2Msg->points); \ 74 localPoints3d.push_back(image3Msg->points); \ 75 localPoints3d.push_back(image4Msg->points); \ 76 localDescriptors.push_back(rtabmap::uncompressData(image1Msg->descriptors)); \ 77 localDescriptors.push_back(rtabmap::uncompressData(image2Msg->descriptors)); \ 78 localDescriptors.push_back(rtabmap::uncompressData(image3Msg->descriptors)); \ 79 localDescriptors.push_back(rtabmap::uncompressData(image4Msg->descriptors)); 82 void CommonDataSubscriber::rgbd4Callback(
83 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
84 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
85 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
86 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
90 nav_msgs::OdometryConstPtr odomMsg;
91 rtabmap_ros::UserDataConstPtr userDataMsg;
92 sensor_msgs::LaserScan scanMsg;
93 sensor_msgs::PointCloud2 scan3dMsg;
94 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
95 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
97 void CommonDataSubscriber::rgbd4Scan2dCallback(
98 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
99 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
100 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
101 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
102 const sensor_msgs::LaserScanConstPtr& scanMsg)
106 nav_msgs::OdometryConstPtr odomMsg;
107 rtabmap_ros::UserDataConstPtr userDataMsg;
108 sensor_msgs::PointCloud2 scan3dMsg;
109 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
110 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
112 void CommonDataSubscriber::rgbd4Scan3dCallback(
113 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
114 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
115 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
116 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
117 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
121 nav_msgs::OdometryConstPtr odomMsg;
122 rtabmap_ros::UserDataConstPtr userDataMsg;
123 sensor_msgs::LaserScan scanMsg;
124 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
125 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
127 void CommonDataSubscriber::rgbd4ScanDescCallback(
128 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
129 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
130 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
131 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
132 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
136 nav_msgs::OdometryConstPtr odomMsg;
137 rtabmap_ros::UserDataConstPtr userDataMsg;
138 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
139 if(!scanDescMsg->global_descriptor.data.empty())
141 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
143 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
145 void CommonDataSubscriber::rgbd4InfoCallback(
146 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
147 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
148 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
149 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
150 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
154 nav_msgs::OdometryConstPtr odomMsg;
155 rtabmap_ros::UserDataConstPtr userDataMsg;
156 sensor_msgs::LaserScan scanMsg;
157 sensor_msgs::PointCloud2 scan3dMsg;
158 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
162 void CommonDataSubscriber::rgbd4OdomCallback(
163 const nav_msgs::OdometryConstPtr & odomMsg,
164 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
165 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
166 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
167 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
171 rtabmap_ros::UserDataConstPtr userDataMsg;
172 sensor_msgs::LaserScan scanMsg;
173 sensor_msgs::PointCloud2 scan3dMsg;
174 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
175 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
177 void CommonDataSubscriber::rgbd4OdomScan2dCallback(
178 const nav_msgs::OdometryConstPtr & odomMsg,
179 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
180 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
181 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
182 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
183 const sensor_msgs::LaserScanConstPtr& scanMsg)
187 rtabmap_ros::UserDataConstPtr userDataMsg;
188 sensor_msgs::PointCloud2 scan3dMsg;
189 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
190 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
192 void CommonDataSubscriber::rgbd4OdomScan3dCallback(
193 const nav_msgs::OdometryConstPtr & odomMsg,
194 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
195 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
196 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
197 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
198 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
202 rtabmap_ros::UserDataConstPtr userDataMsg;
203 sensor_msgs::LaserScan scanMsg;
204 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
205 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
207 void CommonDataSubscriber::rgbd4OdomScanDescCallback(
208 const nav_msgs::OdometryConstPtr & odomMsg,
209 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
210 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
211 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
212 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
213 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
217 rtabmap_ros::UserDataConstPtr userDataMsg;
218 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
219 if(!scanDescMsg->global_descriptor.data.empty())
221 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
223 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
225 void CommonDataSubscriber::rgbd4OdomInfoCallback(
226 const nav_msgs::OdometryConstPtr & odomMsg,
227 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
228 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
229 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
230 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
231 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
235 rtabmap_ros::UserDataConstPtr userDataMsg;
236 sensor_msgs::LaserScan scanMsg;
237 sensor_msgs::PointCloud2 scan3dMsg;
238 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
241 #ifdef RTABMAP_SYNC_USER_DATA 243 void CommonDataSubscriber::rgbd4DataCallback(
244 const rtabmap_ros::UserDataConstPtr& userDataMsg,
245 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
246 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
247 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
248 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
252 nav_msgs::OdometryConstPtr odomMsg;
253 sensor_msgs::LaserScan scanMsg;
254 sensor_msgs::PointCloud2 scan3dMsg;
255 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
256 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
258 void CommonDataSubscriber::rgbd4DataScan2dCallback(
259 const rtabmap_ros::UserDataConstPtr& userDataMsg,
260 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
261 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
262 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
263 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
264 const sensor_msgs::LaserScanConstPtr& scanMsg)
268 nav_msgs::OdometryConstPtr odomMsg;
269 sensor_msgs::PointCloud2 scan3dMsg;
270 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
271 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
273 void CommonDataSubscriber::rgbd4DataScan3dCallback(
274 const rtabmap_ros::UserDataConstPtr& userDataMsg,
275 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
276 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
277 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
278 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
279 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
283 nav_msgs::OdometryConstPtr odomMsg;
284 sensor_msgs::LaserScan scanMsg;
285 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
286 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
288 void CommonDataSubscriber::rgbd4DataScanDescCallback(
289 const rtabmap_ros::UserDataConstPtr& userDataMsg,
290 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
291 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
292 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
293 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
294 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
298 nav_msgs::OdometryConstPtr odomMsg;
299 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
300 if(!scanDescMsg->global_descriptor.data.empty())
302 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
304 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
306 void CommonDataSubscriber::rgbd4DataInfoCallback(
307 const rtabmap_ros::UserDataConstPtr& userDataMsg,
308 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
309 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
310 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
311 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
312 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
316 nav_msgs::OdometryConstPtr odomMsg;
317 sensor_msgs::LaserScan scanMsg;
318 sensor_msgs::PointCloud2 scan3dMsg;
319 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
323 void CommonDataSubscriber::rgbd4OdomDataCallback(
324 const nav_msgs::OdometryConstPtr& odomMsg,
325 const rtabmap_ros::UserDataConstPtr& userDataMsg,
326 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
327 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
328 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
329 const rtabmap_ros::RGBDImageConstPtr& image4Msg)
333 sensor_msgs::LaserScan scanMsg;
334 sensor_msgs::PointCloud2 scan3dMsg;
335 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
336 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
338 void CommonDataSubscriber::rgbd4OdomDataScan2dCallback(
339 const nav_msgs::OdometryConstPtr& odomMsg,
340 const rtabmap_ros::UserDataConstPtr& userDataMsg,
341 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
342 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
343 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
344 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
345 const sensor_msgs::LaserScanConstPtr& scanMsg)
349 sensor_msgs::PointCloud2 scan3dMsg;
350 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
351 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, *scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
353 void CommonDataSubscriber::rgbd4OdomDataScan3dCallback(
354 const nav_msgs::OdometryConstPtr& odomMsg,
355 const rtabmap_ros::UserDataConstPtr& userDataMsg,
356 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
357 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
358 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
359 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
360 const sensor_msgs::PointCloud2ConstPtr& scan3dMsg)
364 sensor_msgs::LaserScan scanMsg;
365 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
366 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, *scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
368 void CommonDataSubscriber::rgbd4OdomDataScanDescCallback(
369 const nav_msgs::OdometryConstPtr& odomMsg,
370 const rtabmap_ros::UserDataConstPtr& userDataMsg,
371 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
372 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
373 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
374 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
375 const rtabmap_ros::ScanDescriptorConstPtr& scanDescMsg)
379 rtabmap_ros::OdomInfoConstPtr odomInfoMsg;
380 if(!scanDescMsg->global_descriptor.data.empty())
382 globalDescriptorMsgs.push_back(scanDescMsg->global_descriptor);
384 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanDescMsg->scan, scanDescMsg->scan_cloud, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
386 void CommonDataSubscriber::rgbd4OdomDataInfoCallback(
387 const nav_msgs::OdometryConstPtr& odomMsg,
388 const rtabmap_ros::UserDataConstPtr& userDataMsg,
389 const rtabmap_ros::RGBDImageConstPtr& image1Msg,
390 const rtabmap_ros::RGBDImageConstPtr& image2Msg,
391 const rtabmap_ros::RGBDImageConstPtr& image3Msg,
392 const rtabmap_ros::RGBDImageConstPtr& image4Msg,
393 const rtabmap_ros::OdomInfoConstPtr& odomInfoMsg)
397 sensor_msgs::LaserScan scanMsg;
398 sensor_msgs::PointCloud2 scan3dMsg;
399 commonMultiCameraCallback(odomMsg, userDataMsg, imageMsgs, depthMsgs, cameraInfoMsgs, depthCameraInfoMsgs, scanMsg, scan3dMsg, odomInfoMsg, globalDescriptorMsgs, localKeyPoints, localPoints3d, localDescriptors);
403 void CommonDataSubscriber::setupRGBD4Callbacks(
407 bool subscribeUserData,
408 bool subscribeScan2d,
409 bool subscribeScan3d,
410 bool subscribeScanDesc,
411 bool subscribeOdomInfo,
418 for(
int i=0; i<4; ++i)
423 #ifdef RTABMAP_SYNC_USER_DATA 424 if(subscribeOdom && subscribeUserData)
428 if(subscribeScanDesc)
432 if(subscribeOdomInfo)
435 ROS_WARN(
"subscribe_odom_info ignored...");
437 SYNC_DECL7(
CommonDataSubscriber, rgbd4OdomDataScanDesc, approxSync, queueSize,
odomSub_,
userDataSub_, (*
rgbdSubs_[0]), (*
rgbdSubs_[1]), (*
rgbdSubs_[2]), (*
rgbdSubs_[3]),
scanDescSub_);
439 else if(subscribeScan2d)
443 if(subscribeOdomInfo)
446 ROS_WARN(
"subscribe_odom_info ignored...");
448 SYNC_DECL7(
CommonDataSubscriber, rgbd4OdomDataScan2d, approxSync, queueSize,
odomSub_,
userDataSub_, (*
rgbdSubs_[0]), (*
rgbdSubs_[1]), (*
rgbdSubs_[2]), (*
rgbdSubs_[3]),
scanSub_);
450 else if(subscribeScan3d)
454 if(subscribeOdomInfo)
457 ROS_WARN(
"subscribe_odom_info ignored...");
459 SYNC_DECL7(
CommonDataSubscriber, rgbd4OdomDataScan3d, approxSync, queueSize,
odomSub_,
userDataSub_, (*
rgbdSubs_[0]), (*
rgbdSubs_[1]), (*
rgbdSubs_[2]), (*
rgbdSubs_[3]),
scan3dSub_);
461 else if(subscribeOdomInfo)
465 SYNC_DECL7(
CommonDataSubscriber, rgbd4OdomDataInfo, approxSync, queueSize,
odomSub_,
userDataSub_, (*
rgbdSubs_[0]), (*
rgbdSubs_[1]), (*
rgbdSubs_[2]), (*
rgbdSubs_[3]),
odomInfoSub_);
477 if(subscribeScanDesc)
481 if(subscribeOdomInfo)
484 ROS_WARN(
"subscribe_odom_info ignored...");
488 else if(subscribeScan2d)
492 if(subscribeOdomInfo)
495 ROS_WARN(
"subscribe_odom_info ignored...");
499 else if(subscribeScan3d)
503 if(subscribeOdomInfo)
506 ROS_WARN(
"subscribe_odom_info ignored...");
510 else if(subscribeOdomInfo)
521 #ifdef RTABMAP_SYNC_USER_DATA 522 else if(subscribeUserData)
525 if(subscribeScanDesc)
529 if(subscribeOdomInfo)
532 ROS_WARN(
"subscribe_odom_info ignored...");
536 else if(subscribeScan2d)
540 if(subscribeOdomInfo)
543 ROS_WARN(
"subscribe_odom_info ignored...");
547 else if(subscribeScan3d)
551 if(subscribeOdomInfo)
554 ROS_WARN(
"subscribe_odom_info ignored...");
558 else if(subscribeOdomInfo)
572 if(subscribeScanDesc)
576 if(subscribeOdomInfo)
579 ROS_WARN(
"subscribe_odom_info ignored...");
583 else if(subscribeScan2d)
587 if(subscribeOdomInfo)
590 ROS_WARN(
"subscribe_odom_info ignored...");
594 else if(subscribeScan3d)
598 if(subscribeOdomInfo)
601 ROS_WARN(
"subscribe_odom_info ignored...");
605 else if(subscribeOdomInfo)
CommonDataSubscriber(bool gui)
std::string uFormat(const char *fmt,...)
message_filters::Subscriber< rtabmap_ros::UserData > userDataSub_
bool subscribedToOdomInfo_
message_filters::Subscriber< rtabmap_ros::OdomInfo > odomInfoSub_
#define IMAGE_CONVERSION()
#define SYNC_DECL5(CLASS, PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4)
bool subscribedToScanDescriptor_
message_filters::Subscriber< sensor_msgs::LaserScan > scanSub_
message_filters::Subscriber< rtabmap_ros::ScanDescriptor > scanDescSub_
virtual void commonMultiCameraCallback(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 std::vector< sensor_msgs::CameraInfo > &depthCameraInfoMsgs, 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< nav_msgs::Odometry > odomSub_
#define SYNC_DECL6(CLASS, PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5)
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)
#define SYNC_DECL7(CLASS, PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3, SUB4, SUB5, SUB6)
std::vector< message_filters::Subscriber< rtabmap_ros::RGBDImage > * > rgbdSubs_
#define SYNC_DECL4(CLASS, PREFIX, APPROX, QUEUE_SIZE, SUB0, SUB1, SUB2, SUB3)