MRPT / mrpt

:zap: The Mobile Robot Programming Toolkit (MRPT)
https://docs.mrpt.org/reference/latest/
BSD 3-Clause "New" or "Revised" License
1.94k stars 628 forks source link

Unable to convert from PCL XYZRGB to CColouredPointsMap #62

Closed yunyu closed 10 years ago

yunyu commented 10 years ago

Here's my code:

    mrpt::utils::PointCloudAdapter<pcl::PointCloud<pcl::PointXYZRGB>> pca(*cloud);
    mrpt::slam::CColouredPointsMap cpm;
    cpm.setFromPCLPointCloudRGB(pca);

Inheritance suggests that this should work (as PointCloudAdapter does inherit from POINTCLOUD), but when compiling on VC++2010, I get this. Is this how I'm supposed to be doing the conversion?

jlblancoc commented 10 years ago

That method, setFromPCLPointCloudRGB(), already works directly with PCL classes, like in:

pcl::PointCloud<pcl::PointXYZRGB> cloud;
mrpt::slam::CColouredPointsMap       pc;
pc.setFromPCLPointCloudRGB(cloud);

Let me know if that fails, then reopen this issue.