'Damping' and 'Stiffness' parameters effect on DRIVE_MODE_EFFORT

Hi,
I noticed that even while in effort driving mode (passing torques to the simulator) the ‘Damping’ and ‘Stiffness’ parameters are still effecting the simulation.
Is that to be expected?
If so, how exactly do they impact the simulation?
I was under the impression that they are properties of a PD controller, and thus should only impact the simulation if one is employed.

Thanks

2 Likes

Damping and friction are characteristics of any joint, independent of the driving mode, an ideal joint has zero damping and friction. But stiffness is more a controllable parameter rather than a characteristic, it’s like a spring component which you can add it to your mechanism.
Effort- Bw-T_friction-k(theta-theta0)=I*w_dot
it’s like a PD controller but around theta0 (if stiffness is not zero).

1 Like

I did another test to make sure that what I mentioned is correct, I set the Dof properties as
props[“driveMode”].fill(gymapi.DOF_MODE_EFFORT)
props[“stiffness”].fill(1.0)
props[“damping”].fill(0.0)
props[“friction”].fill(0.0)

And then applied a 10NM effort input like this:
if(frame_count<100):
efforts = np.full(num_dofs, 10.0).astype(np.float32)
gym.apply_actor_dof_efforts(envs[0], handles[0], efforts)

if(frame_count>=100):
    efforts = np.full(num_dofs, 0.0).astype(np.float32)
    gym.apply_actor_dof_efforts(envs[0], handles[0], efforts)

after putting the effort to 0, the joint moved back to its original position as if it’s pulling back by a spring with similar behavior. so in effort mode the stiffness is like spring attached to the joint. I haven’t tested other modes yet though based on the documents, they work like PID parameters.