Fix bug in SampleModelConsensusCylinder::projectPoints()#3975
Fix bug in SampleModelConsensusCylinder::projectPoints()#3975fl0ydj wants to merge 7 commits intoPointCloudLibrary:masterfrom
SampleModelConsensusCylinder::projectPoints()#3975Conversation
|
Please add a test-case to ensure no regression |
SampleModelConsensusCylinder::projectPoints()
|
Ok, I have implemented your proposed cheanges. Testcase (from the cylinder model segmentation)Use the pointcloud provided in the cylinder model segmentation.I hope thats ok :) If you need anything more, I'll be happy to help. |
I was looking more for a test in the The test doesn't need that many moving pieces. @SergioRAgostinho could you help to whittle down the pieces needed to test this? |
|
Oh ok sorry ._. I am pretty new to all of this! I will try coding something as well. |
|
No issues, we can walk you through the process of adding the test. Can you verify that this resolves the issue in all cases? If so, we can try to see if replacing |
|
Mmh, so I am not quite sure, when you actually would use |
|
|
||
| #endif // PCL_SAMPLE_CONSENSUS_IMPL_SAC_MODEL_CYLINDER_H_ | ||
|
|
||
| #endif // PCL_SAMPLE_CONSENSUS_IMPL_SAC_MODEL_CYLINDER_H_ No newline at end of file |
There was a problem hiding this comment.
Needs a newline as the last character of the text file
|
3d based code compiles. If it works, we can start with the tests. 😄 |
|
Excuse my late reply. Yeah it works :) |
|
The test can be pretty simple. In your example, the relevant lines are: pcl::ProjectInliers<PointT> proj;
proj.setModelType(pcl::SACMODEL_CYLINDER);
proj.setInputCloud(cloud_cylinder);
proj.setModelCoefficients(coefficients_cylinder);
proj.filter(*cloud_cylinder);
std::cerr << "PointCloud representing the cylindrical component: " << cloud_cylinder->points.size () << " data points." << std::endl;What you need to do:
Details on the testing framework GTest are here. You can also use other test files as an example by throwing away code you don't need |
|
Marking this as stale due to 30 days of inactivity. Commenting or adding a new commit to the pull request will revert this. |
As proposed by @kunaltyagi in #3876 .
I am unsure about the math behind it but this change does it for me.
However, if
copy_data_fieldsis false, this change does not help.