Excessive compile time

Solution:

Using PCL with Eigen

When using PCL with Eigen library, some care has to be taken:

  • Remember to add the EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro to the definition.

  • For Eigen types (as PointCloud<T>), do not use boost::make_shared<...>(...), instead use cloud.makeShared(). However, if you do not want to copy the data over (which is what makeShared or make_shared do), you can simply create the shared pointer before and just pass it around. See this for more information. Example:

   1 pcl::SACSegmentation<pcl::PointXYZ> seg;
   2 ...
   3 pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ> ());
   4 ...
   5 seg.setInputCloud (cloud);

Wiki: pcl/TroubleshootingOld (last edited 2011-07-08 00:10:54 by KenConley)