Applying a force/torque to a revolute joint

If I want to apply a force on a joint, I currently add a drive to the joint. Unfortunately, it is necessary to specify a target velocity which is not what I want. I want to control the force/torque that is applied. The formula for the force is

stiffness * (position - target_position) + damping * (velocity - target_velocity)

What do I do if I just want a constant force to be applied, velocity-independent?

Additionaly, what actual difference does it make whether I set the drive type to force (default) or acceleration? With constant mass, both should be proportional, right?

Yes it is currently not possible to set the joint force directly in USD/the UI. However, you could:

  1. Given that you are using an articulation, use the tensor API to directly set joint force/torque (effort): Core [omni.isaac.core] — isaac_sim 2023.1.0-rc.36 documentation
  2. not straightforward, but you could indirectly set the force through the maximal force attribute of the drive. Set the maximal force to the magnitude of the force you want to apply. Set a large velocity/position gain, and set the target pos/vel so the drive immediately latches into the max force.

For simple mechanisms, you are correct, the acceleration and force drives are proportional. For more complex mechanisms, the acceleration drive (for articulations) will take into account the articulation structure (i.e. inertia from parts further down the articulation tree) when applying a force to the joint to achieve an acceleration based on position and velocity error.

For general application of forces / torques in rigid bodies, you also have apply_force_at_pos method from omni.physx (full API docs embedded in Kit apps) which is also exposed through apply_body_force and apply_body_torque in Isaac SIM’s Dynamic Control API

Thanks both of you,

this makes sense.
Bruno

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