forward dynamics

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

forward dynamics

Post by Anne Schmitz » Fri May 28, 2010 7:51 am

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?

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

RE: forward dynamics

Post by Ayman Habib » Tue Jun 01, 2010 9:37 am

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

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

RE: forward dynamics

Post by Anne Schmitz » Wed Jun 02, 2010 9:42 am

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?

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

RE: forward dynamics

Post by Ayman Habib » Wed Jun 02, 2010 1:26 pm

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

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

RE: forward dynamics

Post by Anne Schmitz » Wed Jun 02, 2010 1:48 pm

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

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

RE: forward dynamics

Post by Anne Schmitz » Mon Jun 07, 2010 9:10 am

Just locking the joints helped. Works in the newest stable release.

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

RE: forward dynamics

Post by Ayman Habib » Mon Jun 07, 2010 11:01 am

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

POST REPLY