How to enable DOF force sensors?

The documentation says the DOF force sensors must be enabled to get joint forces:

If the enable_dof_force_sensors flag was not set to True in the asset options, the returned values will be 0.

Indeed I get only zero values for the forces, but I do not see this as a flag on AssetOptions to enable it. It has only these:

['angular_damping', 'armature', 'collapse_fixed_joints', 'default_dof_drive_mode', 'density', 'disable_gravity','fix_base_link', 'flip_visual_attachments', 'linear_damping', 'max_angular_velocity','max_linear_velocity', 'min_particle_mass', 'replace_cylinder_with_capsule','slices_per_cylinder', 'tendon_limit_stiffness', 'thickness', 'use_obj', 'use_physx_armature']

How do I go about reading out force data from the joint sensors?

It looks like we have some documentation issues to fix here.

Instead of setting an AssetOption flag, you should be calling the enable_actor_dof_force_sensors function.

See the python/rlgpu/tasks/ file for an example of DOF sensor usage - look for use_dof_force_sensors in that file.

That shows the use of the tensor APIs for this: acquire_dof_force_tensor / refresh_dof_force_tensor

The non-tensor API should also work, though we don’t have an example of that.

Take care,