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
Force plane coefficient to direct origin in plane concatinator #2658
Force plane coefficient to direct origin in plane concatinator #2658
Conversation
pcl::ModelCoefficients::Ptr fixed_refined_coefficients(new pcl::ModelCoefficients); | ||
forceToDirectOrigin(refined_coefficients, fixed_refined_coefficients); | ||
return fixed_refined_coefficients; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it enough to change the orientation of fixed_refined_coefficients without changing the orientation of the original_coefficients?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it depends on the nodelet design.
One thing I noticed is that the RANSAC estimation has a different direction of the coefficients depending on the angle of the plane, so I only do it if the plane is refined by RANSAC.
If the output should be aligned to point close to the origin for any input, then the original_coefficients should also change direction, but in that case, I think we need to make sure that the order of the points in the polygon is also reversed.
On the other hand, I don't think there is any need to change the original_coefficients if the input is assumed to have the same orientation of the coefficients as the orientation of the vertical vector derived from the order of the polygon points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your explanation.
Could you add the explanation for the direction of coefficients in the following document?
https://github.com/jsk-ros-pkg/jsk_recognition/blob/master/doc/jsk_pcl_ros_utils/nodes/plane_concatenator.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixed a problem in
PlaneConcatinator
that caused the coefficients to flip depending on the angle between the point cloud frame and the plane.Before the improvement, the Z axis is inverted depending on the angle between the point cloud frame and the plane, as shown in the following pictures.
Since the normal vector of the plane in the pictures is calculated from the polygon without using coefficients, the orientation of the coefficients is determined by the centroid_pose_array of the
ClusterPointIndicesDecomposer
.The improved version will look like the following
The nodelet pipeline used to check this behavior is shown below.