Convex hull shape creation with flexible collision library (FCL)

502 views
Skip to first unread message

Ulrich Schwesinger

unread,
Sep 24, 2014, 3:19:06 AM9/24/14
to moveit...@googlegroups.com
Hi everyone,

I am a new user of the flexible collision library (FCL) and could need some help with it. I hope this is a good place to post.

I have to create a convex shape (class Convex in geometric_shapes.h) from a list of 3D points by computing the convex hull of those points. As far as I see, this functionality is not part of the Convex class and I could not find it elsewhere in the library.

Is this functionality really not there? Do I have to fall back on some other library (recommendations welcome)?

Thanks for your help,

-Ulrich

Acorn Pooley

unread,
Sep 24, 2014, 1:14:49 PM9/24/14
to Ulrich Schwesinger, moveit...@googlegroups.com
If you add a mesh object to the world:
    worldPtr->addToObject("my_shape", my_mesh_shape, pose);

FCL will treat it as triangles and not as a convex hull.  You can use the qhull library to convert a convex (or concave) collection of points (or mesh) to a convex hull of those points, and then pass that as a mesh object.  There is an example in
  geometric_shapes/src/bodies.cpp
that uses qhull. 

Collision checking triangles may not be as efficient as collision checking a convex hull, but I don't think FCL supports convex hull as a primitive.

-Acorn

From: moveit...@googlegroups.com [moveit...@googlegroups.com] on behalf of Ulrich Schwesinger [ulrich.sc...@googlemail.com]
Sent: Wednesday, September 24, 2014 12:19 AM
To: moveit...@googlegroups.com
Subject: Convex hull shape creation with flexible collision library (FCL)

Ulrich Schwesinger

unread,
Sep 25, 2014, 12:29:28 PM9/25/14
to moveit...@googlegroups.com, ulrich.sc...@googlemail.com
Hi Acorn,

thanks for your input!
Actually FCL has a convex shape that you can readily use as a collision shape, I just tried that.

Could you help me out how to find geometric_shapes/src/bodies.cpp? In which library/repo is that file, couldn't find it in the fcl repo.

Thanks,

-Ulrich

Ulrich Schwesinger

unread,
Sep 25, 2014, 12:46:59 PM9/25/14
to moveit...@googlegroups.com, ulrich.sc...@googlemail.com
Ah, found it. Nevermind. I hope I can post some code at the end if it works out.
Reply all
Reply to author
Forward
0 new messages