mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
Fixed build with pcl 1.11 (#550). Fixed pcl 1.11 warnings (boost->std).
This commit is contained in:
@@ -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 ();
|
||||
|
||||
Reference in New Issue
Block a user