Fixed build with pcl 1.11 (#550). Fixed pcl 1.11 warnings (boost->std).

This commit is contained in:
matlabbe
2020-05-27 16:35:33 -04:00
parent ae5ce029d6
commit 511be5f663
10 changed files with 54 additions and 2 deletions

View File

@@ -76,10 +76,17 @@ CameraOpenni::~CameraOpenni()
#endif
}
#ifdef RTABMAP_OPENNI
#if PCL_VERSION_COMPARE(>=, 1, 11, 0)
void CameraOpenni::image_cb (
const std::shared_ptr<openni_wrapper::Image>& rgb,
const std::shared_ptr<openni_wrapper::DepthImage>& depth,
float constant)
#else
void CameraOpenni::image_cb (
const boost::shared_ptr<openni_wrapper::Image>& rgb,
const boost::shared_ptr<openni_wrapper::DepthImage>& depth,
float constant)
#endif
{
UScopeMutex s(dataMutex_);
@@ -123,10 +130,17 @@ bool CameraOpenni::init(const std::string & calibrationFolder, const std::string
interface_ = new pcl::OpenNIGrabber(deviceId_);
}
#if PCL_VERSION_COMPARE(>=, 1, 11, 0)
std::function<void (
const std::shared_ptr<openni_wrapper::Image>&,
const std::shared_ptr<openni_wrapper::DepthImage>&,
float)> f = std::bind (&CameraOpenni::image_cb, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
#else
boost::function<void (
const boost::shared_ptr<openni_wrapper::Image>&,
const boost::shared_ptr<openni_wrapper::DepthImage>&,
float)> f = boost::bind (&CameraOpenni::image_cb, this, _1, _2, _3);
#endif
connection_ = interface_->registerCallback (f);
interface_->start ();