Hi all,
I have customized a two-link structure imported to the OpenSim, I need to define a torque between 2 links at the revolute joint of the manipulator as a function of the joint angle and speed. Does anyone know how to define that?
Thank you!
How to add a torque as a function of the joint angle and angular speed
- Jon Stingel
- Posts: 17
- Joined: Fri Jan 19, 2018 5:54 pm
Re: How to add a torque as a function of the joint angle and angular speed
Hi Kuang,
Based on your description it sounds like an ExpressionBasedCoordinateForce could be what you are looking for. It allows you to specify the coordinate that the force should be associated with, and then provide an expression that includes the joint angle (q) and velocity (qdot).
For a made up example of how this looks in an .osim file:
Hope this helps!
Jon
Based on your description it sounds like an ExpressionBasedCoordinateForce could be what you are looking for. It allows you to specify the coordinate that the force should be associated with, and then provide an expression that includes the joint angle (q) and velocity (qdot).
For a made up example of how this looks in an .osim file:
Code: Select all
<ExpressionBasedCoordinateForce name="Name_Your_Force">
<!--Coordinate (name) to apply force to.-->
<coordinate>Your_Coordinate</coordinate>
<!--Expression of the force magnitude as a function of the coordinate value (q)and its time derivative (qdot). Note, expression cannot have any whitespaceseparating characters-->
<expression>(-0.4*qdot)+(5*q)</expression>
</ExpressionBasedCoordinateForce>
Jon