pcl icon indicating copy to clipboard operation
pcl copied to clipboard

Cylinder model segmentation tutorial - expanding explanation

Open arielc-brillianetor opened this issue 2 years ago • 3 comments

Hi, I was going the the Cylinder model segmentation tutorial at: https://pcl.readthedocs.io/projects/tutorials/en/master/cylinder_segmentation.html and I was wondering if maybe I can get an explanation of what the output of the program means. The output is: [pcl::SACSegmentationFromNormals::initSACModel] Using a model of type: SACMODEL_CYLINDER [pcl::SACSegmentationFromNormals::initSACModel] Setting radius limits to 0.000000/0.100000 [pcl::SACSegmentationFromNormals::initSACModel] Setting normal distance weight to 0.100000 [pcl::SACSegmentationFromNormals::initSAC] Using a method of type: SAC_RANSAC with a model threshold of 0.050000 [pcl::SampleConsensusModelCylinder::optimizeModelCoefficients] LM solver finished with exit code 2, having a residual norm of 0.322616. Initial solution: 0.0452105 0.0924601 0.790215 0.20495 -0.721649 -0.661225 0.0422902 Final solution: 0.0452105 0.0924601 0.790215 0.20495 -0.721649 -0.661225 0.0396354 Cylinder coefficients: header: seq: 0 stamp: 0.000000000 frame_id: values[] values[0]: 0.0452105 values[1]: 0.0924601 values[2]: 0.790215 values[3]: 0.20495 values[4]: -0.721649 values[5]: -0.661225 values[6]: 0.0396354

PointCloud representing the cylindrical component: 8625 data points.

What is the meaning of the values[] array? How does it represent a cylinder? Thanks a lot

arielc-brillianetor avatar Sep 14 '22 06:09 arielc-brillianetor

@arielc-brillianetor See the documentation of the cylinder model: https://pointclouds.org/documentation/classpcl_1_1_sample_consensus_model_cylinder.html

mvieth avatar Sep 14 '22 07:09 mvieth

Thank you very much! maybe it's a good idea to add this part to the tutorial: point_on_axis.x : the X coordinate of a point located on the cylinder axis point_on_axis.y : the Y coordinate of a point located on the cylinder axis point_on_axis.z : the Z coordinate of a point located on the cylinder axis axis_direction.x : the X coordinate of the cylinder's axis direction axis_direction.y : the Y coordinate of the cylinder's axis direction axis_direction.z : the Z coordinate of the cylinder's axis direction radius : the cylinder's radius Just to make it a little easier :).

arielc-brillianetor avatar Sep 14 '22 07:09 arielc-brillianetor

@arielc-brillianetor You are very welcome to open a pull request to improve this tutorial :smile: Would also be a possibility to add a link to the cylinder model documentation in the tutorial

mvieth avatar Sep 14 '22 08:09 mvieth

I am closing this issue because your question is answered. But feel free to open a pull request to improve the tutorial!

mvieth avatar Sep 25 '22 07:09 mvieth