Hello,
How do I add a prescribed torque to a model?
I know the function of time I want.
I know the bodies to apply the force to.
I see the xml code for <PrescribedForce>,
I see a place for <FunctionSet name="torqueFunctions">,
but how do I enter the time-torque pairs?
I found the Doxygen documentation, but I do not know how to proceed.
I should be able to do this without programming in c++.
I have dug through tutorials and the forum and I cant find anything.
Thanks,
John
How to add prescribed force
- Nithin Kurup
- Posts: 149
- Joined: Sat Jan 18, 2014 5:13 am
Re: How to add prescribed force
Hi John,
You could perhaps try this, not sure though. I know that you need to make a prescribed function using linearpiecewise function or simmspline etc. But not sure if the <prescribed>true </prescribed> tag need here.
Hope it gives some idea,
Nithin
You could perhaps try this, not sure though. I know that you need to make a prescribed function using linearpiecewise function or simmspline etc. But not sure if the <prescribed>true </prescribed> tag need here.
Code: Select all
<ForceSet>
<PrescribedForce name="armForce">
<isDisabled> false </isDisabled>
<body> arm </body>
<pointIsGlobal> false </pointIsGlobal>
<forceIsGlobal> true </forceIsGlobal>
//<FunctionSet name="forceFunctions"> // not sure exactly
<SimmSpline>
<x> 0 1 </x> // time
<y> 0 1 </y> // force value
</SimmSpline>
</FunctionSet>
<prescribed>true </prescribed>
</ForceSet>
Nithin
Re: How to add prescribed force
Hi John,
Looking at the PrescribedForce class (https://simtk.org/api_docs/opensim/api_ ... Force.html), it looks like you are the setTorqueFunction. I haven't played with it myself, but it looks like this is what you will need.
Cheers,
-james
Looking at the PrescribedForce class (https://simtk.org/api_docs/opensim/api_ ... Force.html), it looks like you are the setTorqueFunction. I haven't played with it myself, but it looks like this is what you will need.
Cheers,
-james