Page 1 of 1

forward dynamics

Posted: Fri May 28, 2010 7:51 am
by ambaus
I'm trying to turn on one muscle with an activation that I make up, and run a forward dynamics simulation. However, the whole body falls under gravity and breaks apart, even when I try to lock the joints. Any suggestions?

RE: forward dynamics

Posted: Tue Jun 01, 2010 9:37 am
by aymanh
Anne,

What forces are you applying to your model (Append/replace actuators option, external loads)? The joint definitions should keep the model from "breaking apart". I'd also check the constraints in the model since these need to be satisfied.

If everything checks out ok, please report a bug and attach the model and all files necessary to reproduce the problem and we'll check it out.

Best,
-Ayman

RE: forward dynamics

Posted: Wed Jun 02, 2010 9:42 am
by ambaus
Hi Ayman,

I am just applying a muscle force. No external loads. The joint constraints are satisfied. I think the model is falling under gravity. However, I don't want this to happen. I'm done another simpler model: pelvis, femur, tibia, no muscles. If I do a forward simulation with no loads applied, it swings like a pendulum under gravity. How can I prescribe the motion for some dof during a forward dynamic simulation but let others be driven by forces?

RE: forward dynamics

Posted: Wed Jun 02, 2010 1:26 pm
by aymanh
Anne,

1. You can turn off gravity (it is specified in the model file).
2. Coordinates can be specified in the model file using the prescribed_function element in their XML representation.

Hope this helps,
-Ayman

RE: forward dynamics

Posted: Wed Jun 02, 2010 1:48 pm
by ambaus
Well, I don't want to turn off gravity. How do I use the prescribed function option? I see it in the .osim file. Do you have an example? I'm not sure if it is a true/false flag, set it to a certain value, prescribe x,y curve, etc?

Thanks,

Anne

RE: forward dynamics

Posted: Mon Jun 07, 2010 9:10 am
by ambaus
Just locking the joints helped. Works in the newest stable release.

RE: forward dynamics

Posted: Mon Jun 07, 2010 11:01 am
by aymanh
Hi Anne,

Locking and Prescribing both work because they create a corresponding SimTK::Constraint to enforce them during simulation. Clamping on the other hand is not enforced at the dynamics level.

-Ayman