forward dynamics
- Anne Schmitz
- Posts: 76
- Joined: Thu May 31, 2007 7:44 am
forward dynamics
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?
- Ayman Habib
- Posts: 2244
- Joined: Fri Apr 01, 2005 12:24 pm
RE: forward dynamics
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
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
- Anne Schmitz
- Posts: 76
- Joined: Thu May 31, 2007 7:44 am
RE: forward dynamics
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?
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?
- Ayman Habib
- Posts: 2244
- Joined: Fri Apr 01, 2005 12:24 pm
RE: forward dynamics
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
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
- Anne Schmitz
- Posts: 76
- Joined: Thu May 31, 2007 7:44 am
RE: forward dynamics
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
Thanks,
Anne
- Anne Schmitz
- Posts: 76
- Joined: Thu May 31, 2007 7:44 am
RE: forward dynamics
Just locking the joints helped. Works in the newest stable release.
- Ayman Habib
- Posts: 2244
- Joined: Fri Apr 01, 2005 12:24 pm
RE: forward dynamics
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
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