ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Create collision object from cylinder segmented using pcl::SACSegmentation

asked 2018-06-07 10:41:43 -0500

Ridhwanluthra gravatar image

updated 2018-06-07 10:43:02 -0500

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-07 12:53:32 -0500

v4hn gravatar image

updated 2018-06-07 12:53:52 -0500

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.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-06-07 10:41:43 -0500

Seen: 193 times

Last updated: Jun 07 '18