Home | Tutorials | Wiki | Issues
Ask Your Question

How does ODE determine contact points in Gazebo?

asked 2016-06-22 14:33:27 -0500

Mav14 gravatar image

I was looking at the contact points for the Atlas in the DRCsim package. Each foot has 4 contact points at each vertex of the rectangle. I'd like to know how these points are determined. I've tried looking at the ODE code, but C++ isn't my strong suit so I had some difficulty figuring out what was going on. What I understand is that ODE compares the geometries one by one however it's not possible to compare all points so it only compare a select few points. What I'm trying to understand is what basis are those particular points selected? Why does the Atlas have the 4 contacts set up the way they are, and not some additional points on the heel? Can I add them myself?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-04 09:14:06 -0500

mrslvgg gravatar image

updated 2016-07-04 15:25:26 -0500

According to the manual ODE approximates the contact between two bodies using a set of contact points. Given two geoms o1 and o2 that potentially intersect, the method dCollide generate these contact points and store them in an array then used to create contact joints. Depending on geoms type a different collision function is called. Usually the number of contact points as well as their order is determined within this latter function. For example in the case of box-plane collision dCollideBoxPlane method is called. It computes up to 4 collision points on the box and orders them based on their collision depth.

I suppose Atlas feet are approximately considered as boxes (check the feet collision meshes), that's why you get only 4 contact points. In ODE there is the possibility to create custom collision functions as callbacks, but I don't know how much effort is needed to change gazebo simulation code.

What you can easily do, instead, to get more collision points is to replace the collision meshes of Atlas feet with a more refined mesh made up by triangles (is easy to create one and export it in an STL file using Blender for instance).

Be careful since each extra contact point added to the simulation will slow it down, so sometimes we are forced to ignore contact points in the interests of speed.

Hope this can help.

edit flag offensive delete link more


Thanks for that answer. The Atlas feet are indeed approximated as boxes however the STL file is already made up of triangles I don't know how I would refine it further and whether that refinement would stop gazebo from approximating it as a box.

Mav14 gravatar imageMav14 ( 2016-07-05 10:12:32 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2016-06-22 14:33:27 -0500

Seen: 409 times

Last updated: Jul 04 '16