How to add an external rotational force on the ankle joint?

Hey, can someone share the script to add an external torque on a given joint? I need to apply an external rotational force on the ankle joint to aid the movement.
Thank you.

Regards,
Suyash

Hi @Suyash

Adding an external torque will not prohibit movement in the joint, it will simply add as an aid or load to overcome dependent on the direction of the torque and the movement.

If you want to "lock" as joint in a certain position you can define what is called a "driver" in anybody terms. You then drive the joint to a fixed position (or any other motion of your choosing). All driver classes have a internal AnyReacForce that you can switch on or off. Switching it on will mean that whatever forces are required by the joint to hold the posture is provided by the reaction force and not the body/muscles. Switching it off will mean that the muscles will have to provide the force to keep said posture.

Here is one of our tutorials on drivers and their use: Lesson1: Simple drivers — AnyBody Tutorials v7.4.0

Here is also a code snippet of applying a passive spring torque to the ankle flexion if you want to try it out:

AnyFloat k = 150; // Spring stiffness

AnyForce ThoraxExtTorque = {
  AnyKinMeasure &AnkleFlexion = Main.HumanModel.BodyModel.Interface.Right.AnklePlantarFlexion;
    F = -{AnkleFlexion.Pos[0] * .k};       
  };    
};

Best regards,
Bjørn

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