Torque Actuator

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Anne Schmitz
Posts: 76
Joined: Thu May 31, 2007 7:44 am

Torque Actuator

Post by Anne Schmitz » Wed Mar 31, 2010 5:48 pm

How can I apply a torque actuator (say T = k*coordinate) without writing a plugin? The C++ code is really complicated and the plugin examples are difficult to follow. Any help would be appreciated. There was another post on this that said OpenSim 2.0 might have this capability.

User avatar
Ayman Habib
Posts: 2235
Joined: Fri Apr 01, 2005 12:24 pm

RE: Torque Actuator

Post by Ayman Habib » Wed Mar 31, 2010 9:36 pm

Anne,

According to the Doxygen documentation, there's a SpringGeneralizedForce class that you can use. You may add an object of this type to a model programmatically in a plugin/main or add it to an XML file that contains Forces/ForceSet. The Doxygen documentation is at
https://simtk.org/api_docs/opensim/api_docs20b/

Good Luck,
-Ayman

User avatar
Ayman Habib
Posts: 2235
Joined: Fri Apr 01, 2005 12:24 pm

RE: Torque Actuator

Post by Ayman Habib » Wed Mar 31, 2010 9:45 pm

Anne,

Wanted to mention that depending on what you want, you may also want to consider an OpenSim::TorqueActuator. In that case, however, you'll have to provide a "control" signal to it since it's an Actuator (rather than a Force).

Documentation is in the sane place and we use this in the input files for some of our examples I believe.

-Ayman

User avatar
Anne Schmitz
Posts: 76
Joined: Thu May 31, 2007 7:44 am

RE: Torque Actuator

Post by Anne Schmitz » Wed Mar 31, 2010 9:55 pm

Torque Actuator is in the examples as a default but it doesn't show how to call it. I think I need the generalized spring force, but I'm not sure how to put it in the .xml or .osim. Any examples I can look at on how to 'call' it in my model file?

User avatar
Anne Schmitz
Posts: 76
Joined: Thu May 31, 2007 7:44 am

RE: Torque Actuator

Post by Anne Schmitz » Thu Apr 01, 2010 9:22 am

I think I figured out how to add SpringGeneralizedForce. However, I'm not sure how to find in the documentation how this actuator computes the forces to apply. Since it's a spring, is it F = stiffness*(coord-restlength)?

User avatar
Anne Schmitz
Posts: 76
Joined: Thu May 31, 2007 7:44 am

RE: Torque Actuator

Post by Anne Schmitz » Thu Apr 01, 2010 9:55 am

I added it to my .osim file at the end as an 'actuator'. However, it doesn't show up in the GUI in the forces tab. How do I know I have added this torsional spring?

POST REPLY