Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

The problem is on Gazebo's side when you are using Gazebo's ODE default physics engine. Here is a quick fix that works for me.

In the sdf file describing your Gazebo simulation environment, you need to set the "physics-->ode-->constraints-->contact_max_correcting_vel" parameter to correspond to the maximum angular speed (rad/s) of any joint you wish to simulate. For instance, for a maximum angular speed of 10000.0 rad/s, a simple working example of an sdf file would be

<?xml version="1.0" ?>
<sdf version="1.5">
    <world name="default">
        <physics name='default_physics' default='0' type='ode'>
        <!-- A global light source -->
        <!-- A ground plane -->

This is a weird workaround, because according to the SDFormat specifications , the "contact_max_correcting_vel" parameter corresponds to the maximum correcting velocities allowed when resolving contacts (and has a default value of 100). This has arguably nothing to do with the maximum angular speed of the joints in a model.

Then in Gazebo's documentation, it is pointed out that

contact_max_correcting_vel This is the same parameter as the max_vel under collision->surface->contact. contact_max_correcting_vel sets max_vel globally.

Again, setting contact_max_correcting_vel should have nothing to do with the maximum angular speed of joints in the model, but I suspect that the global value set for max_vel is also used by ODE's physics engine as the default maximum angular speed for new bodies. For more details, check out the "dWorldSetMaxAngularSpeed" function in ODE's manual.