Ported PCL 1.11 deprecated changes to PCL 1.10 (#550)

This commit is contained in:
matlabbe
2020-05-27 17:45:16 -04:00
parent 8842d0c0e3
commit bf39c5295b
4 changed files with 9 additions and 9 deletions

View File

@@ -69,7 +69,7 @@ public:
const Transform & localTransform = Transform::getIdentity()); const Transform & localTransform = Transform::getIdentity());
virtual ~CameraOpenni(); virtual ~CameraOpenni();
#ifdef RTABMAP_OPENNI #ifdef RTABMAP_OPENNI
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
void image_cb ( void image_cb (
const std::shared_ptr<openni_wrapper::Image>& rgb, const std::shared_ptr<openni_wrapper::Image>& rgb,
const std::shared_ptr<openni_wrapper::DepthImage>& depth, const std::shared_ptr<openni_wrapper::DepthImage>& depth,

View File

@@ -76,7 +76,7 @@ CameraOpenni::~CameraOpenni()
#endif #endif
} }
#ifdef RTABMAP_OPENNI #ifdef RTABMAP_OPENNI
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
void CameraOpenni::image_cb ( void CameraOpenni::image_cb (
const std::shared_ptr<openni_wrapper::Image>& rgb, const std::shared_ptr<openni_wrapper::Image>& rgb,
const std::shared_ptr<openni_wrapper::DepthImage>& depth, const std::shared_ptr<openni_wrapper::DepthImage>& depth,
@@ -130,7 +130,7 @@ bool CameraOpenni::init(const std::string & calibrationFolder, const std::string
interface_ = new pcl::OpenNIGrabber(deviceId_); interface_ = new pcl::OpenNIGrabber(deviceId_);
} }
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
std::function<void ( std::function<void (
const std::shared_ptr<openni_wrapper::Image>&, const std::shared_ptr<openni_wrapper::Image>&,
const std::shared_ptr<openni_wrapper::DepthImage>&, const std::shared_ptr<openni_wrapper::DepthImage>&,

View File

@@ -1271,7 +1271,7 @@ LaserScan laserScanFromPointCloud(const pcl::PCLPointCloud2 & cloud, bool filter
} }
//determine the output type //determine the output type
int fieldStates[8] = {0}; // x,y,z,normal_x,normal_y,normal_z,rgb,intensity int fieldStates[8] = {0}; // x,y,z,normal_x,normal_y,normal_z,rgb,intensity
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
std::uint32_t fieldOffsets[8] = {0}; std::uint32_t fieldOffsets[8] = {0};
#else #else
pcl::uint32_t fieldOffsets[8] = {0}; pcl::uint32_t fieldOffsets[8] = {0};
@@ -1440,7 +1440,7 @@ LaserScan laserScanFromPointCloud(const pcl::PCLPointCloud2 & cloud, bool filter
} }
else // XYZRGB else // XYZRGB
{ {
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
std::uint8_t b=*(msg_data + fieldOffsets[6]); std::uint8_t b=*(msg_data + fieldOffsets[6]);
std::uint8_t g=*(msg_data + fieldOffsets[6]+1); std::uint8_t g=*(msg_data + fieldOffsets[6]+1);
std::uint8_t r=*(msg_data + fieldOffsets[6]+2); std::uint8_t r=*(msg_data + fieldOffsets[6]+2);
@@ -1491,7 +1491,7 @@ LaserScan laserScanFromPointCloud(const pcl::PCLPointCloud2 & cloud, bool filter
} }
else // XYZRGBNormal else // XYZRGBNormal
{ {
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
std::uint8_t b=*(msg_data + fieldOffsets[6]); std::uint8_t b=*(msg_data + fieldOffsets[6]);
std::uint8_t g=*(msg_data + fieldOffsets[6]+1); std::uint8_t g=*(msg_data + fieldOffsets[6]+1);
std::uint8_t r=*(msg_data + fieldOffsets[6]+2); std::uint8_t r=*(msg_data + fieldOffsets[6]+2);

View File

@@ -1007,7 +1007,7 @@ pcl::TextureMesh::Ptr concatenateTextureMeshes(const std::list<pcl::TextureMesh:
// append point cloud // append point cloud
int polygonStep = output->cloud.height * output->cloud.width; int polygonStep = output->cloud.height * output->cloud.width;
pcl::PCLPointCloud2 tmp; pcl::PCLPointCloud2 tmp;
#if PCL_VERSION_COMPARE(>=, 1, 11, 0) #if PCL_VERSION_COMPARE(>=, 1, 10, 0)
pcl::concatenate(output->cloud, iter->get()->cloud, tmp); pcl::concatenate(output->cloud, iter->get()->cloud, tmp);
#else #else
pcl::concatenatePointCloud(output->cloud, iter->get()->cloud, tmp); pcl::concatenatePointCloud(output->cloud, iter->get()->cloud, tmp);
@@ -3206,14 +3206,14 @@ pcl::PointCloud<pcl::PointXYZRGBNormal>::Ptr mls(
mls.setComputeNormals (true); mls.setComputeNormals (true);
if(polygonialOrder > 0) if(polygonialOrder > 0)
{ {
#if PCL_VERSION_COMPARE(<, 1, 11, 0) #if PCL_VERSION_COMPARE(<, 1, 10, 0)
mls.setPolynomialFit (true); mls.setPolynomialFit (true);
#endif #endif
mls.setPolynomialOrder(polygonialOrder); mls.setPolynomialOrder(polygonialOrder);
} }
else else
{ {
#if PCL_VERSION_COMPARE(<, 1, 11, 0) #if PCL_VERSION_COMPARE(<, 1, 10, 0)
mls.setPolynomialFit (false); mls.setPolynomialFit (false);
#else #else
mls.setPolynomialOrder(1); mls.setPolynomialOrder(1);