Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findstems RANSAC cylinder fits error #40

Open
qmxp55 opened this issue Aug 4, 2021 · 1 comment
Open

findstems RANSAC cylinder fits error #40

qmxp55 opened this issue Aug 4, 2021 · 1 comment

Comments

@qmxp55
Copy link

qmxp55 commented Aug 4, 2021

When running findstems after successfully running getdtmslice with a custom point cloud data set, I got this error:

RANSAC cylinder fits: libc++abi.dylib: terminating with uncaught exception of type pcl::IOException: : [pcl::PCDWriter::writeBinary] Input point cloud has no data!

Before crashing, findstems generate the <filename>.intermediate.slice.clusters.pcd and <filename>.intermediate.slice.clusters.regions.pcd files, and they look fine, it does find the stems but does not generate the corresponding <filename>..cluster.*.pcd files needed for the next step.

@tpet93
Copy link
Contributor

tpet93 commented Aug 4, 2021

EDIT:
on re-reading it sounds more like it is failing to find any cylinders from the .intermediate.slice.clusters.regions.pcd cloud.
if you are not seeing a ".intermediate.slice.clusters.regions.cylinders.pcd" file. the issue is occurring between line 73 and 94.
one potential reason is the the coord file you are giving has bad coordinates.

try un-commenting line 77 and add further print statements to narrow it down further


This happens when one of the extracted cyl point-clouds has zero points. there are a few rare instances where it can happen.
you could work around it by wrapping the writer.write function inside an if statement.

if (stems[m]->points.size() > 0)
{
  ss.str("");
  ss << id[0] << ".cluster." << m << ".pcd";
  writer.write(ss.str(),*stems[m],true);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants