Gazebo Contact Forces Unrealistic
Hi,
I'm using Gazebo 11 with DART 6 to simulate robotic grasping. I use DART instead of ODE because it proved to be much more stable when simulating grasping.
My problem is that the contact forces that I get via the gazeborosbumper plug-in on each link are very unrealistic in multi-contact scenarios. However, I need precise contact forces to do slip prediction in my project.
Have a look at the below screenshots: I am computing the angle between the contact force and the contact normal. The normals are very precise, however the forces go wild: If I have a single contact the angle is about 30-40 degrees, which sounds about right. In the second screenshot, when I have contact on multiple links, you can see that the angle is very large (sometimes up to 110 degrees). I've plotted the contact normal in blue and force in red on the right.
Physically, an angle between force and normal above 90 degrees would mean that the contact separates, but my grasp seems to be nice and stable (i.e. no oscillations visible). I guess "microscopically" the object oscillates in the hand and this is why my forces point in such weird directions. The problem happens less with boxes and spheres.
Any ideas on how to go about this?
Asked by awck on 2021-05-17 16:08:19 UTC
Answers
hello, I don't know if I had the same issue, but I had some issues with DART and the contacts in gazebo: the normal directions were randomly flipping from one timestep to an other. I posted several issues, on Gazebo, Dart, and FCL (collision library used by dart) Github, but it seems that the issue is quite complex:
- gazebo: https://github.com/osrf/gazebo/issues/2672#issue-602951317
- dart: https://github.com/dartsim/dart/issues/1425#issue-523529798
- FCL: https://github.com/flexible-collision-library/fcl/issues/422#issue-526657439
In the end, I switched to the standard ode physics engine. It needed a lot of tuning to have stable grasps, and it was never as stable as with dart, but for my application it was sufficient.
let me know If your issue is not related at all to this, I may delete this answer and post it as a comment instead.
Asked by Clément Rolinat on 2021-06-15 07:36:27 UTC
Comments
Hi Clement, sorry I only just saw this answer. Interesting, were you able to get stable force readings using ODE? I.e. would they roughly point in the direction of the contact normal? My project relies on calculating grasp stability using the tangential forces at each contact, and often they don't make physical sense whatsoever, so this is a big problem for me ...
Asked by awck on 2021-07-23 17:24:31 UTC
Yes, with ODE the normal direction is ok. The main issue is that the contacts are not stable, that is a given contact can appear and disappear between two timesteps, Thus, sometimes there are some timestep with a lot of contacts, and other timesteps with very few contacts left. To fix this, I increased the contact min depth and reduced the contact max vel parameter in sdf. Also you have to make sure that the simulation of your robot alone is very stable.
Asked by Clément Rolinat on 2021-07-26 03:06:56 UTC
A little clarification: I can confirm that the normal direction is correct physically, but I use only the normal info and not the force in my application. From memory, the force vector seemed good relatively to the normal, but I can't be 100% sure.
Asked by Clément Rolinat on 2021-07-26 03:15:15 UTC
Comments