39 #include <sensor_msgs/Image.h> 47 #include <rtabmap_ros/RGBDImages.h> 96 bool approxSync =
false;
97 bool subscribeRGBD =
false;
98 double approxSyncMaxInterval = 0.0;
100 pnh.
param(
"approx_sync", approxSync, approxSync);
101 pnh.
param(
"approx_sync_max_interval", approxSyncMaxInterval, approxSyncMaxInterval);
102 pnh.
param(
"queue_size", queueSize_, queueSize_);
103 pnh.
param(
"subscribe_rgbd", subscribeRGBD, subscribeRGBD);
104 pnh.
param(
"rgbd_cameras", rgbdCameras, rgbdCameras);
105 pnh.
param(
"keep_color", keepColor_, keepColor_);
107 NODELET_INFO(
"StereoOdometry: approx_sync = %s", approxSync?
"true":
"false");
109 NODELET_INFO(
"StereoOdometry: approx_sync_max_interval = %f", approxSyncMaxInterval);
110 NODELET_INFO(
"StereoOdometry: queue_size = %d", queueSize_);
111 NODELET_INFO(
"StereoOdometry: subscribe_rgbd = %s", subscribeRGBD?
"true":
"false");
112 NODELET_INFO(
"StereoOdometry: keep_color = %s", keepColor_?
"true":
"false");
114 std::string subscribedTopicsMsg;
119 rgbd_image1_sub_.subscribe(nh,
"rgbd_image0", 1);
120 rgbd_image2_sub_.subscribe(nh,
"rgbd_image1", 1);
123 rgbd_image3_sub_.subscribe(nh,
"rgbd_image2", 1);
127 rgbd_image4_sub_.subscribe(nh,
"rgbd_image3", 1);
138 if(approxSyncMaxInterval > 0.0)
139 approxSync2_->setMaxIntervalDuration(
ros::Duration(approxSyncMaxInterval));
140 approxSync2_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD2,
this, boost::placeholders::_1, boost::placeholders::_2));
148 exactSync2_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD2,
this, boost::placeholders::_1, boost::placeholders::_2));
150 subscribedTopicsMsg =
uFormat(
"\n%s subscribed to (%s sync%s):\n %s \\\n %s",
152 approxSync?
"approx":
"exact",
153 approxSync&&approxSyncMaxInterval!=0.0?
uFormat(
", max interval=%fs", approxSyncMaxInterval).c_str():
"",
154 rgbd_image1_sub_.getTopic().c_str(),
155 rgbd_image2_sub_.getTopic().c_str());
157 else if(rgbdCameras == 3)
166 if(approxSyncMaxInterval > 0.0)
167 approxSync3_->setMaxIntervalDuration(
ros::Duration(approxSyncMaxInterval));
168 approxSync3_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD3,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3));
177 exactSync3_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD3,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3));
179 subscribedTopicsMsg =
uFormat(
"\n%s subscribed to (%s sync%s):\n %s \\\n %s \\\n %s",
181 approxSync?
"approx":
"exact",
182 approxSync&&approxSyncMaxInterval!=0.0?
uFormat(
", max interval=%fs", approxSyncMaxInterval).c_str():
"",
183 rgbd_image1_sub_.getTopic().c_str(),
184 rgbd_image2_sub_.getTopic().c_str(),
185 rgbd_image3_sub_.getTopic().c_str());
187 else if(rgbdCameras == 4)
197 if(approxSyncMaxInterval > 0.0)
198 approxSync4_->setMaxIntervalDuration(
ros::Duration(approxSyncMaxInterval));
199 approxSync4_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD4,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4));
209 exactSync4_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD4,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4));
211 subscribedTopicsMsg =
uFormat(
"\n%s subscribed to (%s sync%s):\n %s \\\n %s \\\n %s \\\n %s",
213 approxSync?
"approx":
"exact",
214 approxSync&&approxSyncMaxInterval!=0.0?
uFormat(
", max interval=%fs", approxSyncMaxInterval).c_str():
"",
215 rgbd_image1_sub_.getTopic().c_str(),
216 rgbd_image2_sub_.getTopic().c_str(),
217 rgbd_image3_sub_.getTopic().c_str(),
218 rgbd_image4_sub_.getTopic().c_str());
222 ROS_FATAL(
"%s doesn't support more than 4 cameras (rgbd_cameras=%d) with internal synchronization interface, set rgbd_cameras=0 and use rgbd_images input topic instead for more cameras.",
getName().c_str(), rgbdCameras);
226 else if(rgbdCameras == 0)
228 rgbdxSub_ = nh.
subscribe(
"rgbd_images", 1, &StereoOdometry::callbackRGBDX,
this);
230 subscribedTopicsMsg =
231 uFormat(
"\n%s subscribed to:\n %s",
233 rgbdxSub_.getTopic().c_str());
237 rgbdSub_ = nh.
subscribe(
"rgbd_image", 1, &StereoOdometry::callbackRGBD,
this);
239 subscribedTopicsMsg =
240 uFormat(
"\n%s subscribed to:\n %s",
242 rgbdSub_.getTopic().c_str());
256 imageRectLeft_.subscribe(left_it, left_nh.
resolveName(
"image_rect"), 1, hintsLeft);
257 imageRectRight_.subscribe(right_it, right_nh.
resolveName(
"image_rect"), 1, hintsRight);
258 cameraInfoLeft_.subscribe(left_nh,
"camera_info", 1);
259 cameraInfoRight_.subscribe(right_nh,
"camera_info", 1);
264 if(approxSyncMaxInterval>0.0)
265 approxSync_->setMaxIntervalDuration(
ros::Duration(approxSyncMaxInterval));
275 subscribedTopicsMsg =
uFormat(
"\n%s subscribed to (%s sync%s):\n %s \\\n %s \\\n %s \\\n %s",
277 approxSync?
"approx":
"exact",
278 approxSync&&approxSyncMaxInterval!=0.0?
uFormat(
", max interval=%fs", approxSyncMaxInterval).c_str():
"",
279 imageRectLeft_.getTopic().c_str(),
280 imageRectRight_.getTopic().c_str(),
281 cameraInfoLeft_.getTopic().c_str(),
282 cameraInfoRight_.getTopic().c_str());
285 this->startWarningThread(subscribedTopicsMsg, approxSync);
291 ParametersMap::iterator iter = parameters.find(Parameters::kRegStrategy());
292 if(iter != parameters.end() && iter->second.compare(
"0") != 0)
294 ROS_WARN(
"Stereo odometry works only with \"Reg/Strategy\"=0. Ignoring value %s.", iter->second.c_str());
300 const std::vector<cv_bridge::CvImageConstPtr> & leftImages,
301 const std::vector<cv_bridge::CvImageConstPtr> & rightImages,
302 const std::vector<sensor_msgs::CameraInfo>& leftCameraInfos,
303 const std::vector<sensor_msgs::CameraInfo>& rightCameraInfos)
305 UASSERT(leftImages.size() > 0 &&
306 leftImages.size() == rightImages.size() &&
307 leftImages.size() == leftCameraInfos.size() &&
308 rightImages.size() == rightCameraInfos.size());
310 int leftWidth = leftImages[0]->image.cols;
311 int leftHeight = leftImages[0]->image.rows;
312 int rightWidth = rightImages[0]->image.cols;
313 int rightHeight = rightImages[0]->image.rows;
316 leftWidth == rightWidth && leftHeight == rightHeight,
317 uFormat(
"left=%dx%d right=%dx%d", leftWidth, leftHeight, rightWidth, rightHeight).c_str());
319 int cameraCount = leftImages.size();
322 std::vector<rtabmap::StereoCameraModel> cameraModels;
323 for(
unsigned int i=0; i<leftImages.size(); ++i)
340 NODELET_ERROR(
"Input type must be image=mono8,mono16,rgb8,bgr8,rgba8,bgra8 (mono8 recommended), received types are %s (left) and %s (right)",
341 leftImages[i]->encoding.c_str(), rightImages[i]->encoding.c_str());
345 ros::Time stamp = leftImages[i]->header.stamp>rightImages[i]->header.stamp?leftImages[i]->header.stamp:rightImages[i]->header.stamp;
351 else if(stamp > higherStamp)
357 if(localTransform.
isNull())
364 double stampDiff = fabs(leftImages[i]->
header.stamp.toSec() - leftImages[i-1]->header.stamp.toSec());
365 if(stampDiff > 1.0/60.0)
367 static bool warningShown =
false;
370 NODELET_WARN(
"The time difference between cameras %d and %d is " 371 "high (diff=%fs, cam%d=%fs, cam%d=%fs). You may want " 372 "to set approx_sync_max_interval to reject bad synchronizations or use " 373 "approx_sync=false if streams have all the exact same timestamp. This " 374 "message is only printed once.",
377 i-1, leftImages[i-1]->
header.stamp.toSec(),
378 i, leftImages[i]->header.stamp.toSec());
385 if(!leftImages[i]->image.empty() && !rightImages[i]->image.empty())
387 bool alreadyRectified =
true;
388 Parameters::parse(parameters(), Parameters::kRtabmapImagesAlreadyRectified(), alreadyRectified);
390 if(!alreadyRectified)
392 if(rightCameraInfos[i].
header.frame_id.empty() || leftCameraInfos[i].header.frame_id.empty())
394 if(rightCameraInfos[i].
P[3] == 0.0 && leftCameraInfos[i].
P[3] == 0)
396 NODELET_ERROR(
"Parameter %s is false but the frame_id in one of the camera_info " 397 "topic is empty, so TF between the cameras cannot be computed!",
398 Parameters::kRtabmapImagesAlreadyRectified().c_str());
403 static bool warned =
false;
406 NODELET_WARN(
"Parameter %s is false but the frame_id in one of the " 407 "camera_info topic is empty, so TF between the cameras cannot be " 408 "computed! However, the baseline can be computed from the calibration, " 409 "we will use this one instead of TF. This message is only printed once...",
410 Parameters::kRtabmapImagesAlreadyRectified().c_str());
418 rightCameraInfos[i].
header.frame_id,
419 leftCameraInfos[i].header.frame_id,
420 leftCameraInfos[i].header.stamp,
422 this->waitForTransformDuration());
423 if(stereoTransform.
isNull())
425 NODELET_ERROR(
"Parameter %s is false but we cannot get TF between the two cameras! (between frames %s and %s)",
426 Parameters::kRtabmapImagesAlreadyRectified().c_str(),
427 rightCameraInfos[i].
header.frame_id.c_str(),
428 leftCameraInfos[i].header.frame_id.c_str());
433 NODELET_ERROR(
"Parameter %s is false but we cannot get a valid TF between the two cameras! " 434 "Identity transform returned between left and right cameras. Verify that if TF between " 435 "the cameras is valid: \"rosrun tf tf_echo %s %s\".",
436 Parameters::kRtabmapImagesAlreadyRectified().c_str(),
437 rightCameraInfos[i].
header.frame_id.c_str(),
438 leftCameraInfos[i].header.frame_id.c_str());
448 !rightCameraInfos[i].header.frame_id.empty() &&
449 !leftCameraInfos[i].header.frame_id.empty())
452 leftCameraInfos[i].
header.frame_id,
453 rightCameraInfos[i].header.frame_id,
454 leftCameraInfos[i].header.stamp,
456 this->waitForTransformDuration());
458 if(!stereoTransform.
isNull() && stereoTransform.
x()>0)
460 static bool warned =
false;
463 ROS_WARN(
"Right camera info doesn't have Tx set but we are assuming that stereo images are already rectified (see %s parameter). While not " 464 "recommended, we used TF to get the baseline (%s->%s = %fm) for convenience (e.g., D400 ir stereo issue). It is preferred to feed " 465 "a valid right camera info if stereo images are already rectified. This message is only printed once...",
466 rtabmap::Parameters::kRtabmapImagesAlreadyRectified().c_str(),
467 rightCameraInfos[i].
header.frame_id.c_str(), leftCameraInfos[i].header.frame_id.c_str(), stereoTransform.
x());
481 if(alreadyRectified && stereoModel.
baseline() <= 0)
483 NODELET_ERROR(
"The stereo baseline (%f) should be positive (baseline=-Tx/fx). We assume a horizontal left/right stereo " 484 "setup where the Tx (or P(0,3)) is negative in the right camera info msg.", stereoModel.
baseline());
490 static bool shown =
false;
493 NODELET_WARN(
"Detected baseline (%f m) is quite large! Is your " 494 "right camera_info P(0,3) correctly set? Note that " 495 "baseline=-P(0,3)/P(0,0). This warning is printed only once.",
525 left = cv::Mat(leftHeight, leftWidth*cameraCount, ptrLeft->image.type());
529 right = cv::Mat(rightHeight, rightWidth*cameraCount, ptrRight->image.type());
532 if(ptrLeft->image.type() == left.type())
534 ptrLeft->image.copyTo(cv::Mat(left, cv::Rect(i*leftWidth, 0, leftWidth, leftHeight)));
538 NODELET_ERROR(
"Some left images are not the same type! %d vs %d", ptrLeft->image.type(), left.type());
542 if(ptrRight->image.type() == right.type())
544 ptrRight->image.copyTo(cv::Mat(right, cv::Rect(i*rightWidth, 0, rightWidth, rightHeight)));
548 NODELET_ERROR(
"Some right images are not the same type! %d vs %d", ptrRight->image.type(), right.type());
552 cameraModels.push_back(stereoModel);
570 header.stamp = higherStamp;
571 header.frame_id = leftImages.size()==1?leftImages[0]->header.frame_id:
"";
572 this->processData(data, header);
576 const sensor_msgs::ImageConstPtr& imageLeft,
577 const sensor_msgs::ImageConstPtr& imageRight,
578 const sensor_msgs::CameraInfoConstPtr& cameraInfoLeft,
579 const sensor_msgs::CameraInfoConstPtr& cameraInfoRight)
582 if(!this->isPaused())
584 std::vector<cv_bridge::CvImageConstPtr> leftMsgs(1);
585 std::vector<cv_bridge::CvImageConstPtr> rightMsgs(1);
586 std::vector<sensor_msgs::CameraInfo> leftInfoMsgs;
587 std::vector<sensor_msgs::CameraInfo> rightInfoMsgs;
590 leftInfoMsgs.push_back(*cameraInfoLeft);
591 rightInfoMsgs.push_back(*cameraInfoRight);
593 double stampDiff = fabs(imageLeft->header.stamp.toSec() - imageRight->header.stamp.toSec());
594 if(stampDiff > 0.010)
596 NODELET_WARN(
"The time difference between left and right frames is " 597 "high (diff=%fs, left=%fs, right=%fs). If your left and right cameras are hardware " 598 "synchronized, use approx_sync:=false. Otherwise, you may want " 599 "to set approx_sync_max_interval lower than 0.01s to reject spurious bad synchronizations.",
601 imageLeft->header.stamp.toSec(),
602 imageRight->header.stamp.toSec());
605 this->commonCallback(leftMsgs, rightMsgs, leftInfoMsgs, rightInfoMsgs);
610 const rtabmap_ros::RGBDImageConstPtr& image)
613 if(!this->isPaused())
615 std::vector<cv_bridge::CvImageConstPtr> leftMsgs(1);
616 std::vector<cv_bridge::CvImageConstPtr> rightMsgs(1);
617 std::vector<sensor_msgs::CameraInfo> leftInfoMsgs;
618 std::vector<sensor_msgs::CameraInfo> rightInfoMsgs;
620 leftInfoMsgs.push_back(image->rgb_camera_info);
621 rightInfoMsgs.push_back(image->depth_camera_info);
623 this->commonCallback(leftMsgs, rightMsgs, leftInfoMsgs, rightInfoMsgs);
628 const rtabmap_ros::RGBDImagesConstPtr& images)
631 if(!this->isPaused())
633 if(images->rgbd_images.empty())
635 NODELET_ERROR(
"Input topic \"%s\" doesn't contain any image(s)!", rgbdxSub_.getTopic().c_str());
638 std::vector<cv_bridge::CvImageConstPtr> leftMsgs(images->rgbd_images.size());
639 std::vector<cv_bridge::CvImageConstPtr> rightMsgs(images->rgbd_images.size());
640 std::vector<sensor_msgs::CameraInfo> leftInfoMsgs;
641 std::vector<sensor_msgs::CameraInfo> rightInfoMsgs;
642 for(
size_t i=0; i<images->rgbd_images.size(); ++i)
645 leftInfoMsgs.push_back(images->rgbd_images[i].rgb_camera_info);
646 rightInfoMsgs.push_back(images->rgbd_images[i].depth_camera_info);
649 this->commonCallback(leftMsgs, rightMsgs, leftInfoMsgs, rightInfoMsgs);
654 const rtabmap_ros::RGBDImageConstPtr& image,
655 const rtabmap_ros::RGBDImageConstPtr& image2)
658 if(!this->isPaused())
660 std::vector<cv_bridge::CvImageConstPtr> leftMsgs(2);
661 std::vector<cv_bridge::CvImageConstPtr> rightMsgs(2);
662 std::vector<sensor_msgs::CameraInfo> leftInfoMsgs;
663 std::vector<sensor_msgs::CameraInfo> rightInfoMsgs;
666 leftInfoMsgs.push_back(image->rgb_camera_info);
667 leftInfoMsgs.push_back(image2->rgb_camera_info);
668 rightInfoMsgs.push_back(image->depth_camera_info);
669 rightInfoMsgs.push_back(image2->depth_camera_info);
671 this->commonCallback(leftMsgs, rightMsgs, leftInfoMsgs, rightInfoMsgs);
676 const rtabmap_ros::RGBDImageConstPtr& image,
677 const rtabmap_ros::RGBDImageConstPtr& image2,
678 const rtabmap_ros::RGBDImageConstPtr& image3)
681 if(!this->isPaused())
683 std::vector<cv_bridge::CvImageConstPtr> leftMsgs(3);
684 std::vector<cv_bridge::CvImageConstPtr> rightMsgs(3);
685 std::vector<sensor_msgs::CameraInfo> leftInfoMsgs;
686 std::vector<sensor_msgs::CameraInfo> rightInfoMsgs;
690 leftInfoMsgs.push_back(image->rgb_camera_info);
691 leftInfoMsgs.push_back(image2->rgb_camera_info);
692 leftInfoMsgs.push_back(image3->rgb_camera_info);
693 rightInfoMsgs.push_back(image->depth_camera_info);
694 rightInfoMsgs.push_back(image2->depth_camera_info);
695 rightInfoMsgs.push_back(image3->depth_camera_info);
697 this->commonCallback(leftMsgs, rightMsgs, leftInfoMsgs, rightInfoMsgs);
702 const rtabmap_ros::RGBDImageConstPtr& image,
703 const rtabmap_ros::RGBDImageConstPtr& image2,
704 const rtabmap_ros::RGBDImageConstPtr& image3,
705 const rtabmap_ros::RGBDImageConstPtr& image4)
708 if(!this->isPaused())
710 std::vector<cv_bridge::CvImageConstPtr> leftMsgs(4);
711 std::vector<cv_bridge::CvImageConstPtr> rightMsgs(4);
712 std::vector<sensor_msgs::CameraInfo> leftInfoMsgs;
713 std::vector<sensor_msgs::CameraInfo> rightInfoMsgs;
718 leftInfoMsgs.push_back(image->rgb_camera_info);
719 leftInfoMsgs.push_back(image2->rgb_camera_info);
720 leftInfoMsgs.push_back(image3->rgb_camera_info);
721 leftInfoMsgs.push_back(image4->rgb_camera_info);
722 rightInfoMsgs.push_back(image->depth_camera_info);
723 rightInfoMsgs.push_back(image2->depth_camera_info);
724 rightInfoMsgs.push_back(image3->depth_camera_info);
725 rightInfoMsgs.push_back(image4->depth_camera_info);
727 this->commonCallback(leftMsgs, rightMsgs, leftInfoMsgs, rightInfoMsgs);
754 approxSync2_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD2,
this, boost::placeholders::_1, boost::placeholders::_2));
763 exactSync2_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD2,
this, boost::placeholders::_1, boost::placeholders::_2));
773 approxSync3_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD3,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3));
783 exactSync3_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD3,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3));
794 approxSync4_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD4,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4));
805 exactSync4_->
registerCallback(boost::bind(&StereoOdometry::callbackRGBD4,
this, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4));
CvImageConstPtr toCvShare(const sensor_msgs::ImageConstPtr &source, const std::string &encoding=std::string())
message_filters::Synchronizer< MyApproxSync2Policy > * approxSync2_
static bool parse(const ParametersMap ¶meters, const std::string &key, bool &value)
const cv::Size & imageSize() const
std::string uFormat(const char *fmt,...)
void callback(const sensor_msgs::ImageConstPtr &imageLeft, const sensor_msgs::ImageConstPtr &imageRight, const sensor_msgs::CameraInfoConstPtr &cameraInfoLeft, const sensor_msgs::CameraInfoConstPtr &cameraInfoRight)
#define NODELET_ERROR(...)
message_filters::Subscriber< rtabmap_ros::RGBDImage > rgbd_image4_sub_
#define NODELET_WARN(...)
virtual void flushCallbacks()
image_transport::SubscriberFilter imageRectLeft_
message_filters::Subscriber< rtabmap_ros::RGBDImage > rgbd_image2_sub_
message_filters::Synchronizer< MyExactSync3Policy > * exactSync3_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
message_filters::sync_policies::ExactTime< rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage > MyExactSync4Policy
std::pair< std::string, std::string > ParametersPair
ROSCONSOLE_CONSOLE_IMPL_DECL std::string getName(void *handle)
const std::string TYPE_8UC1
virtual ~StereoOdometry()
rtabmap::Transform getTransform(const std::string &fromFrameId, const std::string &toFrameId, const ros::Time &stamp, tf::TransformListener &listener, double waitForTransform)
message_filters::Subscriber< rtabmap_ros::RGBDImage > rgbd_image5_sub_
void callbackRGBD3(const rtabmap_ros::RGBDImageConstPtr &image, const rtabmap_ros::RGBDImageConstPtr &image2, const rtabmap_ros::RGBDImageConstPtr &image3)
message_filters::sync_policies::ExactTime< rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage > MyExactSync3Policy
message_filters::Subscriber< sensor_msgs::CameraInfo > cameraInfoLeft_
#define UASSERT(condition)
message_filters::sync_policies::ExactTime< rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage > MyExactSync2Policy
image_transport::SubscriberFilter imageRectRight_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
message_filters::Subscriber< rtabmap_ros::RGBDImage > rgbd_image3_sub_
Connection registerCallback(C &callback)
message_filters::sync_policies::ExactTime< sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::CameraInfo, sensor_msgs::CameraInfo > MyExactSyncPolicy
#define UASSERT_MSG(condition, msg_str)
CvImagePtr cvtColor(const CvImageConstPtr &source, const std::string &encoding)
message_filters::sync_policies::ApproximateTime< rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage > MyApproxSync4Policy
message_filters::sync_policies::ApproximateTime< rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage > MyApproxSync2Policy
std::string resolveName(const std::string &name, bool remap=true) const
void callbackRGBD2(const rtabmap_ros::RGBDImageConstPtr &image, const rtabmap_ros::RGBDImageConstPtr &image2)
QMap< QString, QVariant > ParametersMap
message_filters::Synchronizer< MyExactSyncPolicy > * exactSync_
message_filters::Subscriber< sensor_msgs::CameraInfo > cameraInfoRight_
message_filters::sync_policies::ApproximateTime< rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage, rtabmap_ros::RGBDImage > MyApproxSync3Policy
message_filters::Synchronizer< MyExactSync2Policy > * exactSync2_
void commonCallback(const std::vector< cv_bridge::CvImageConstPtr > &leftImages, const std::vector< cv_bridge::CvImageConstPtr > &rightImages, const std::vector< sensor_msgs::CameraInfo > &leftCameraInfos, const std::vector< sensor_msgs::CameraInfo > &rightCameraInfos)
virtual void updateParameters(ParametersMap ¶meters)
void callback(rtabmap_ros::CameraConfig &config, uint32_t level)
message_filters::Synchronizer< MyExactSync4Policy > * exactSync4_
#define NODELET_INFO(...)
const Transform & localTransform() const
message_filters::Subscriber< rtabmap_ros::RGBDImage > rgbd_image1_sub_
message_filters::Synchronizer< MyApproxSync4Policy > * approxSync4_
void callbackRGBD4(const rtabmap_ros::RGBDImageConstPtr &image, const rtabmap_ros::RGBDImageConstPtr &image2, const rtabmap_ros::RGBDImageConstPtr &image3, const rtabmap_ros::RGBDImageConstPtr &image4)
message_filters::Synchronizer< MyApproxSync3Policy > * approxSync3_
void toCvShare(const rtabmap_ros::RGBDImageConstPtr &image, cv_bridge::CvImageConstPtr &rgb, cv_bridge::CvImageConstPtr &depth)
rtabmap::StereoCameraModel stereoCameraModelFromROS(const sensor_msgs::CameraInfo &leftCamInfo, const sensor_msgs::CameraInfo &rightCamInfo, const rtabmap::Transform &localTransform=rtabmap::Transform::getIdentity(), const rtabmap::Transform &stereoTransform=rtabmap::Transform())
double timestampFromROS(const ros::Time &stamp)
void callbackRGBD(const rtabmap_ros::RGBDImageConstPtr &image)
virtual void onOdomInit()
PLUGINLIB_EXPORT_CLASS(apriltag_ros::ContinuousDetector, nodelet::Nodelet)
message_filters::sync_policies::ApproximateTime< sensor_msgs::Image, sensor_msgs::Image, sensor_msgs::CameraInfo, sensor_msgs::CameraInfo > MyApproxSyncPolicy
message_filters::Synchronizer< MyApproxSyncPolicy > * approxSync_
void uInsert(std::map< K, V > &map, const std::pair< K, V > &pair)
void callbackRGBDX(const rtabmap_ros::RGBDImagesConstPtr &images)
const CameraModel & left() const
ros::Subscriber rgbdxSub_