Category : point-cloud-library

EDIT: Updated code I’m using PCL library to generate a mesh from point clouds. This is the code, based on the Greedy Triangulation tutorial in the PCL docs: #include <pcl/point_types.h> #include <pcl/common/io.h> #include <pcl/io/ply_io.h> #include <pcl/search/kdtree.h> #include <pcl/features/normal_3d.h> #include <pcl/surface/gp3.h> #include <pcl/io/obj_io.h> #include <vector> int main() { pcl::PointCloud<pcl::PointXYZ>::Ptr cloud (new pcl::PointCloud<pcl::PointXYZ>); pcl::PCLPointCloud2 cloud1; pcl::PCLPointCloud2 cloud2; ..

Read more

System: cuda 11.3, gcc 7.5, boost 1.65.1, pcl 1.8.0 When I compile code that uses PCL library, it shows the following error /usr/include/pcl-1.8/pcl/io/file_io.h(264): error: namespace "boost" has no member "numeric_cast" /usr/include/pcl-1.8/pcl/io/file_io.h(264): error: type name is not allowed /usr/include/pcl-1.8/pcl/io/file_io.h(280): error: namespace "boost" has no member "numeric_cast" /usr/include/pcl-1.8/pcl/io/file_io.h(280): error: type name is not allowed /usr/include/pcl-1.8/pcl/io/file_io.h(346): error: namespace ..

Read more

int main(int argc, char** argv) { pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>); pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud_filtered(new pcl::PointCloud<pcl::PointXYZRGB>); if (pcl::io::loadPCDFile<pcl::PointXYZRGB>("zweitePC.pcd", *cloud) == -1) //* load the file { PCL_ERROR("Couldn’t read file test_pcd.pcd n"); return (-1); } std::cout << "Loaded " << cloud->width * cloud->height << " data points from test_pcd.pcd with the following fields: " << std::endl; pcl::VoxelGrid<pcl::PointXYZRGB> downsample; downsample.setInputCloud(cloud); downsample.setLeafSize(0.01f, ..

Read more

void filterPC(const pcl::PointCloud<pcl::PointXYZRGB>::Ptr& cloud) { pcl::VoxelGrid<pcl::PointXYZRGB> downsample; downsample.setInputCloud(cloud); downsample.setLeafSize(0.01f, 0.01f, 0.01f); downsample.setFilterFieldName("z"); downsample.setFilterLimits(0, 1.4); downsample.filter(*cloud); } When executing this code I get the error mentioned in the title and I have no clue how to fix this. This came after upgrading from pcl 1.8.1 to pcl 1.12, before the upgrade everything was fine. I am ..

Read more