How to set the friction for the joint(dof) of the object?

How to set the friction for the joint(dof) of the object?

Here’s a little code snippet of how I do it:

def _refresh_actor_dof_props(self, env_ids):

  for env_id in env_ids:
      dof_props = self.gym.get_actor_dof_properties(self.envs[env_id], 0)

      for i in range(self.num_dof):
          dof_props["friction"][i] = self.joint_friction_coeffs[env_id, 0]
          dof_props["damping"][i] = self.joint_damping_coeffs[env_id, 0]

      self.gym.set_actor_dof_properties(self.envs[env_id], 0, dof_props)

In my case the friction values from the URDF didn’t match the friction model in Isaac Gym so I had to reduce them by a fair bit to get it to work.