diff --git a/README.md b/README.md index f0f4729..520cacd 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ otherwise you might get errors during compilation. After installing everything, you can start CMake. There you have to set the `PCL_DIR` to your PCL installation (e.g. C:/Program Files/PCL 1.9.1/cmake) and the `royale_DIR` to the share folder of your Royale binary installation (e.g. D:/Program Files/royale/4.23.0.1062/share) and click **Generate**. +**Attention**: With Royale 5.3 we switched to C++17, but there is no PCL version available that +supports this. So, if you want to use PCL with Royale, you have to use a version <5.3! +If you only need a pointcloud functionality, check out our Open3D example. + ## Quick Start Below you see which key toggles which filter: - n: [show normals](#show-normals) diff --git a/samplePCL.cpp b/samplePCL.cpp index 12ba624..f412506 100644 --- a/samplePCL.cpp +++ b/samplePCL.cpp @@ -199,19 +199,19 @@ class RoyaleListener : public IDepthDataListener for (size_t i = 0u; i < cloud->points.size(); ++i) { - cloud->points[i].x = data->points[i].x; - cloud->points[i].y = data->points[i].y; - cloud->points[i].z = data->points[i].z; + cloud->points[i].x = data->getX(i); + cloud->points[i].y = data->getY(i); + cloud->points[i].z = data->getZ(i); - cloudDuplicate->points[i].x = data->points[i].x; - cloudDuplicate->points[i].y = data->points[i].y; - cloudDuplicate->points[i].z = data->points[i].z; + cloudDuplicate->points[i].x = data->getX(i); + cloudDuplicate->points[i].y = data->getY(i); + cloudDuplicate->points[i].z = data->getZ(i); - cloudIntensity->points[i].x = data->points[i].x; - cloudIntensity->points[i].y = data->points[i].y; - cloudIntensity->points[i].z = data->points[i].z; + cloudIntensity->points[i].x = data->getX(i); + cloudIntensity->points[i].y = data->getY(i); + cloudIntensity->points[i].z = data->getZ(i); - const RgbColor col = getColor(data->points[i].z); + const RgbColor col = getColor(data->getZ(i)); cloud->points[i].r = col.r; cloud->points[i].g = col.g; @@ -222,9 +222,9 @@ class RoyaleListener : public IDepthDataListener cloudDuplicate->points[i].b = col.b; // calculate intensity from color - cloudIntensity->points[i].intensity = data->points[i].grayValue / 2000.0f; + cloudIntensity->points[i].intensity = data->getGrayValue(i) / 2000.0f; - if (data->points[i].depthConfidence > 0) + if (data->getDepthConfidence(i) > 0) { cloud->points[i].a = 255; cloudDuplicate->points[i].a = 255; @@ -670,7 +670,7 @@ int main(int argc, char *argv[]) } } - if (!growRegion & !bilateral & !detectPlanes) + if (!growRegion && !bilateral && !detectPlanes) { viewer.removeAllPointClouds();