Skip to content
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

Optionally use convex hull of mesh shapes #68

Closed
osrf-migration opened this issue Aug 1, 2014 · 3 comments
Closed

Optionally use convex hull of mesh shapes #68

osrf-migration opened this issue Aug 1, 2014 · 3 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

osrf-migration commented Aug 1, 2014

Original report (archived issue) by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


There are computational advantages to collision detection using convex meshes. It would be useful for users who carefully construct their own convex meshes to be able to declare that they are convex. Then the collision engine can make smarter choices.

@erwincoumans @hsu

See also issue about gazebo-bullet concave mesh support for commentary on the challenges of real-time decomposition of concave meshes to convex. Using a flag will be computationally faster.

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 11, 2020
@scpeters
Copy link
Member

If we don't want to impact runtime performance, we could add the flag and put the responsibility on users to use it correctly. We could supply an offline verification program to check that meshes declared as convex actually are

@iche033
Copy link
Contributor

iche033 commented Jan 19, 2024

I like the idea of using a flag to explicitly indicate that we want to decompose / or simplify the mesh.

One idea is to use a new attribute, simplify (open to suggestion), in <mesh>:

<collision name="my_collision">
  <geometry>
    <mesh simplify="convex">
      <uri>path_to_complex_mesh</uri>
    </mesh>
  </geometry>
</collision>

Ways to simplify a mesh:

  • convex_hull - decomposes the mesh to one or multiple simple convex meshes. This can be done by the physics engine if available (e.g. bullet's btConvexHullShape) or use other libraries for decomposition, e.g. https://github.com/kmammou/v-hacd
  • bounding_box - Most simple option - just use the object's bounding box as the collision.
  • simple_shapes - decomposes to a set of simple shapes (instead of simple convex meshes)

@scpeters
Copy link
Member

a //mesh/@optimization attribute has been added in #1382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

3 participants