Discrepancy between MATLAB and Isaac gym simulation

Hi,
I did a simple test using a pendulum in both Matlab SimScape environment and Isaac gym, in both environments I set all the friction, damping and stiffness parameters to 0, to have an ideal joint, with such a joint the pendulum should oscillate forever and it never stops.

props[“driveMode”].fill(gymapi.DOF_MODE_NONE)
props[“stiffness”].fill(0.0)
props[“damping”].fill(0.000)
props[“friction”].fill(0.00)
props[“armature”].fill(0.0 )
props[“lower”].fill(-400)
props[“upper”].fill(400)
(I set the upper and lower limits to very high amounts to remove any possible effect)

Matlab correctly simulates it and pendulum oscillates with no loss as expected, but in Isaac gym despite setting all the friction, damping and stiffness and other related parameters, the pendulum slows down as if there is a friction/damping in the joint, check this graph showing results of both simulation:

Then in Matlab I adjusted the Damping parameter to see what amount of damping would create such a motion, with a damping equal to 0.00065 NM/(rad/s) I got a similar motion!

So my question is what’s the source of such discrepancy? Obviously Matlab simulation is correct!
Is it because of a bug?
I would appreciate if Isaac gym team could provide some information.
Thanks

Just found it! :)
There are two other parameters which should be set to zero!
asset_options.angular_damping=0
asset_options.linear_damping=0

The asset_options.angular_damping is 0.5 by default! which might be a bug, by setting it to 0 you get the same results as Matlab.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.