DART Sphere behaves like a Cube
Dear Gazebo Community,
when I spawn a sphere into an empty world using the ODE engine the sphere just stays where it is (as expected). When I spawn exactly the same sphere into a world simulated with the DART 6 engine, then the sphere first "wobbles" a little and ends up in a slightly different position (and orientation!) than where I spawned it. When I push the sphere around in the DART world (by applying forces in Gazebo 11) then the sphere doesn't roll, but rather behaves like a cube and lands on "one side", while it should execute a smooth rolling motion. Anyone have a clue what this is?
Asked by awck on 2020-12-21 07:39:55 UTC
Answers
This is caused by the fact that DART, by default, uses the FCL collision library with a configuration that changes simple shapes like sphere into a mesh. In your case, the resulting mesh doesn't have enough resolution to correctly behave as a sphere. You can change the DART's collision detector to bullet and you should get better behavior in your example. You'd that by setting the dart_collision_detector
parameter (http://sdformat.org/spec?ver=1.7&elem=physics#dart_collision_detector)
<?xml version="1.0" ?>
<sdf version="1.7">
<world name="default">
<physics type="dart">
<dart>
<collision_detector>bullet</collision_detector>
</dart>
</physics>
...
</world>
</sdf>
Asked by azeey on 2020-12-21 13:43:46 UTC
Comments
Hi azeey, thanks for your quick reply! Indeed, when I change the collision detector to bullet the sphere actually rolls - so it works much smoother now. However, with the bullet collision detector the sphere slowly starts rolling away from its launch position even though I am not applying any forces/torques. Can I increase the mesh resolution? I tried increasing the friction coefficients, inertia and mass values, but the problem persists and the sphere slowly rolls off upon launch. Thanks! :-)
Asked by awck on 2020-12-23 06:54:20 UTC
Comments