Create collision object from cylinder segmented using pcl::SACSegmentation
Based on this I get the radius, a point on the centerline of the cylinder and a direction vector for the centerline.
Now the location of the collision object is coming correctly but the orientation is not. I am not entirely certain what the dir vector represents? I tried various ways to get it to work but none of them seem to work. Any help greatly appreciated.
Thank you
Asked by Ridhwanluthra on 2018-06-07 10:41:43 UTC
Answers
The parameters you describe are a traditional way to represent cylinders of infinite length and I'm not sure how they could be misinterpreted.
The orientation of a moveit_msgs::CollisionObject
is not just a direction, but a 3D transformation.
So the direction vector of the cylinder specifies the z axis of your cylinder, it does not specify x and y.
You have to choose the missing degree of freedom arbitrarily and apply standard geometric calculus to get the rotation quaternion (/ RPY / 3x3 rotation matrix) of your CollisionObject.
Asked by v4hn on 2018-06-07 12:53:32 UTC
Comments