Open YoushaaMurhij opened 3 years ago
@YoushaaMurhij Seems you fixed it? without any comment?
No, I could not fixed it! I thought no one faced this error before. I think it is related to the used version of ROS and Python
Found your PCL version: 1.10, currently I have verified PCL 1.7, PCL 1.9 only, maybe you can have a try.
Never mind to keep it open until fixed.
I am also getting this error using pcl 1.10. What I did is, I just did a bit of code unrolling for pcl::copyPointCloud<PointN, PointI>()
because the problem is with that call.
So the for-loop:
for (; iter != clusters_indices.end(); ++iter) {}
Becomes:
for (const pcl::PointIndices & indices : clusters_indices) {
PointICloudPtr cluster(new PointICloud);
pcl::PointCloud<pcl::PointNormal> cloud_in = *don_cloud_filtered;
pcl::PointCloud<pcl::PointXYZI> cloud_out = *cluster;
// Allocate enough space and copy the basics
cloud_out.points.resize (indices.indices.size ());
cloud_out.header = cloud_in.header;
cloud_out.width = std::uint32_t (indices.indices.size ());
cloud_out.height = 1;
cloud_out.is_dense = cloud_in.is_dense;
cloud_out.sensor_orientation_ = cloud_in.sensor_orientation_;
cloud_out.sensor_origin_ = cloud_in.sensor_origin_;
// Iterate over each point
for (std::size_t i = 0; i < indices.indices.size (); ++i) {
pcl::copyPoint (cloud_in.points[indices.indices[i]], cloud_out.points[i]);
}
cloud_clusters.push_back(cluster);
}
copyPointCloud
Can you talk more about how did you solve this issue? Thanks