Page 1 of 1

Prescrided force on a specific point application

Posted: Thu Feb 02, 2023 2:21 am
by noemieglln
Hello,

I work on osim file (opensim 4.4) for my body and I would like to add a prescrided force on my rifght shoulder with a force equal to y=-10N
so you can see my body, and I want to apply a force on a blue contact sphere ( I just add this contact sphere for having the localisation of the point)
So this is my script :
<PrescribedForce name="PrescribedForce">
<appliesForce>true</appliesForce>
<!--Path to a Component that satisfies the Socket 'frame' of type PhysicalFrame (description: The frame onto which this force is applied.).-->
<socket_frame>/bodyset/torso</socket_frame>
<!--Flag indicating whether the quantities (specified in force/torqueFunctions) is in global frame.-->
<forceIsGlobal>false</forceIsGlobal>
<appliesForce>true</appliesForce>
<FunctionSet name="forceFunctions">
<objects>
<Constant>
<value>0</value>
</Constant>
<Constant>
<value>-10</value>
</Constant>
<Constant>
<value>0</value>
</Constant>
</objects>
<groups />
</FunctionSet>
<FunctionSet name="pointFunctions">
<objects>
<Constant>
<value>0</value>
</Constant>
<Constant>
<value>0.39</value>
</Constant>
<Constant>
<value>0.14</value>
</Constant>
</objects>
<groups />
</FunctionSet>
</PrescribedForce>

So when I launch the simulation on opensim, my body disappears so I think there is an error but idk...
Thank you for you help

Re: Prescrided force on a specific point application

Posted: Thu Feb 02, 2023 12:41 pm
by ongcf
If an issue occurs, often a little red error symbol will show up in the bottom right of the GUI window. You can click on that to check on if any error messages are emitted.

I don't know if this will solve the issue, but the series of Constant functions may be an issue. Constant functions are constant for all time, so I'm not sure what will happen if you pass multiple Constant functions to the same component. You may want to consider the PiecewiseConstantFunction instead.

Re: Prescrided force on a specific point application

Posted: Thu Feb 09, 2023 1:47 am
by noemieglln
Ok thank you !

I started again with a code without modification, and my model does not disappear anymore, so on this side it's good.
However, when I apply this force on my right shoulder, I have a simulation that is not at all logical, my model curls up on itself.
In my hopes, I think my model should just incline to the side where the force is applied..
Thank you for yor help