tabletop-objects: add small fix for PCL >= 1.5.0
authorTim Niemueller <niemueller@kbsg.rwth-aachen.de>
Fri, 23 Nov 2012 14:22:57 +0000 (15:22 +0100)
committerTim Niemueller <niemueller@kbsg.rwth-aachen.de>
Fri, 23 Nov 2012 14:27:14 +0000 (15:27 +0100)
For PCL >= 1.5.1 the dimensionality of the convex hull to be computed
hsa to be explicitly set.

src/plugins/perception/tabletop-objects/tabletop_objects_thread.cpp

index ae0f8d5..db54957 100644 (file)
@@ -521,6 +521,9 @@ TabletopObjectsThread::loop()
 
   // Estimate 3D convex hull -> TABLE BOUNDARIES
   pcl::ConvexHull<PointType> hr;
+#if defined(PCL_VERSION_COMPARE) && PCL_VERSION_COMPARE(>=,1,5,0) 
+  hr.setDimension(2);
+#endif
   //hr.setAlpha(0.1);  // only for ConcaveHull
   hr.setInputCloud(cloud_proj_);
   cloud_hull_.reset(new Cloud());