Hello,
I am trying to set the DOF Friction value for a MJCF asset (I’m working with a UR5 arm) and I am finding that the values I set via the following example (say I’ve loaded in a set of envs and UR5’s already and the list of envs is stored in self.envs
and the list of UR5 handles is in self.ur5_handles
):
ur5_dof_props = self.gym.get_actor_dof_properties(self.envs[0], self.ur5_handles[0])
ur5_dof_props['friction'][6:] = 10.0
print('Setting DOF friction to:', ur5_dof_props['friction'])
self.gym.set_actor_dof_properties(self.envs[0], self.ur5_handles[0], ur5_dof_props)
ur5_dof_props = self.gym.get_actor_dof_properties(self.envs[0], self.ur5_handles[0])
print('DOF friction is:', ur5_dof_props['friction'])
Will result in the following output:
Setting DOF friction to: [ 0. 0. 0. 0. 0. 0. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10.
10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10.
10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10.
10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10.
10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10. 10.
10. 10. 10. 10. 10. 10.]
DOF friction is: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
As you can see even if I get the actor dof properties right after I set them, the friction values are completely ignored. Note that I have a ton of DOFs there because I am trying to simulate a rope using a string of rigid body capsules connected by ball joints, and the first 6 DOFs correspond to the UR5 DOFs while the rest correspond to the joints between the tiny capsules. This is using the FLeX backend, and I observe this behavior with both the PCR and the Jacobi solver. I am not using the PhysX backend because I found it to be highly nondeterministic.
I also noticed that trying to set the DOF friction in the viewer has zero effect as well - I enter in some value, e.g. 10 and press enter and the value immediately goes back to zero. I do not observe this behavior when I set the armature, stiffness, damping, velocity, effort, or driveMode options.
I also found that I cannot use a URDF model of the UR5 + a string of capsules since to simulate a ball joint, I need to have 3 continuous joints connected via dummy links with zero mass and zero inertia tensor between the physical links, which I have found to make the FLeX backend unstable and unusable. PhysX does not have a problem with these dummy links, but again PhysX is too nondeterministic.