Add MESH into planning scene collision object FAILED [closed]

asked 2012-03-10 14:55:10 -0500

Paul Yang gravatar image

updated 2012-03-10 18:34:20 -0500

Hi all,

I've been trying to add meshes into collision object, but always get error: "Unable to compute convex hull"

trimesh_object.type = arm_navigation_msgs::Shape::MESH;
for (int i = 0; i < 3; i++) {
    geometry_msgs::Point p;
    p.x = i;
    p.y = i+1;
    p.z = i+2;
    trimesh_object.vertices.push_back(p);
}

// then add {0, 1, 2} into trimesh_object.triangles
// ...

collision_object.shapes.push_back(trimesh_object);

geometry_msgs::Pose pose;
collision_object.poses.push_back(pose);

...

planning_scene_req.planning_scene_diff.collision_objects.push_back(collision_object);
get_planning_scene_client.call(planning_scene_req, planning_scene_res) ...

I've followed the instructions on Tutorials/PlanningScene/AddingVirtualObjectsToThePlanningScene

All I'm trying to do is just to add a simple triangle into the scene, but so far no luck. The above code just adds {0,1,2},{1,2,3},{2,3,4} into it. I also tried {0,0,1},{0,1,0},{1,0,0}. Nothing works.

I don't get why there's "unable to compute convex hull" error. Thanks in advance.

Best, Paul

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2014-12-07 00:52:12.547555

Comments

Maybe a triangle is a degenerate corner case for convex hull computation, as the convex hull would have zero volume? Have you tried for example with a tetrahedron?

Stefan Kohlbrecher gravatar imageStefan Kohlbrecher ( 2012-03-10 21:15:46 -0500 )edit