Page 1 of 1

Problems with inverse dynamics

Posted: Tue Jun 05, 2012 9:52 am
by rvanzandwijk
I developed a model for cycling, where I have muscles between the foot and the pedal to get a closed loop. My model includes 3D motion in the knee.

So far, I have no problems with scaling and IK. But for some reason, the ID is not running and Opensim doesn't explain what the problem is. I get the next error messages:

Tool execution failed. Check messages window for details. (if I click ok there, i get: )
Tool execution failed or stopped by user. Output files were not written.

In the message window it is saying:

Low-pass filtering coordinates data with a cutoff frequency of 6...

Object.RegisterType: ControlLinear .
Object.RegisterType: replacing registered object of type ControlLinear
with a new default object of the same type.
Object.RegisterType: CoordinateActuator .
Object.RegisterType: replacing registered object of type CoordinateActuator
with a new default object of the same type.
Object.RegisterType: PointActuator .
Object.RegisterType: replacing registered object of type PointActuator
with a new default object of the same type.
Object.RegisterType: TorqueActuator .
Object.RegisterType: replacing registered object of type TorqueActuator
with a new default object of the same type.
Object.RegisterType: Thelen2003Muscle .
Object.RegisterType: replacing registered object of type Thelen2003Muscle
with a new default object of the same type.
Object.RegisterType: Schutte1993Muscle .
Object.RegisterType: replacing registered object of type Schutte1993Muscle
with a new default object of the same type.
Object.RegisterType: CMC_Joint .
Object.RegisterType: replacing registered object of type CMC_Joint
with a new default object of the same type.
Storage: file=C:\Users\Renate\Dropbox\Cycling model\Gait2392_Simbody-used\PS35JK\PS35JK_forces_torques_ground.mot (nr=361 nc=16)
Finished createSystem for Bodies...
Calling createSystem for Joint ground_pelvis ...
Calling createSystem for Joint hip_r ...
Calling createSystem for Joint knee_r ...
Calling createSystem for Joint ankle_r ...
Calling createSystem for Joint subtalar_r ...
Calling createSystem for Joint mtp_r ...
Calling createSystem for Joint hip_l ...
Calling createSystem for Joint knee_l ...
Calling createSystem for Joint ankle_l ...
Calling createSystem for Joint subtalar_l ...
Calling createSystem for Joint mtp_l ...
Calling createSystem for Joint back ...
Calling createSystem for Joint ground_crank ...
Calling createSystem for Joint foot_pedal_l ...
Calling createSystem for Joint foot_pedal_r ...
Finished createSystem for Joints...
Finished createSystem for Constraints...
Finished createSystem for Contact Geometry...
Finished adding constraints for coordinates..
Finished createSystem for forces..
Finished createSystem for controllers..
Finished createSystem for Bodies...
Calling createSystem for Joint ground_pelvis ...
Calling createSystem for Joint hip_r ...
Calling createSystem for Joint knee_r ...
Calling createSystem for Joint ankle_r ...
Calling createSystem for Joint subtalar_r ...
Calling createSystem for Joint mtp_r ...
Calling createSystem for Joint hip_l ...
Calling createSystem for Joint knee_l ...
Calling createSystem for Joint ankle_l ...
Calling createSystem for Joint subtalar_l ...
Calling createSystem for Joint mtp_l ...
Calling createSystem for Joint back ...
Calling createSystem for Joint ground_crank ...
Calling createSystem for Joint foot_pedal_l ...
Calling createSystem for Joint foot_pedal_r ...
Finished createSystem for Joints...
Finished createSystem for Constraints...
Finished createSystem for Contact Geometry...
Finished adding constraints for coordinates..
Finished createSystem for forces..
Finished createSystem for controllers..
Storage: file=C:\Users\Renate\Dropbox\Cycling model\Gait2392_Simbody-used\PS35JK\IK051412.mot (nr=361 nc=135)
applyFrameToModel time: 0.43268799999999996 ms.
Render time: 14.131271 ms.
applyFrameToModel time: 0.304498 ms.
Render time: 13.935715 ms.
applyFrameToModel time: 1.118291 ms.
Render time: 13.123076999999999 ms.
Render time: 4.780742 ms.


I checked if the time frames are the same for IK and the force files and they both go to 3 seconds in 361 frames. I included the forces, torques and locations in my force files. The torques I set at zero and the location too, since I want it in the middle of my pedal.

Does anyone had a problem like this before? Or has any idea what the problem might be?

Thanks,
Renate

Re: Problems with inverse dynamics

Posted: Tue Jun 05, 2012 12:20 pm
by aymanh
Hi Renate,

Having extra muscles in your model should have no effect on ID as ID ignores muscles by default. As such adding muscles will not create the loop you may think. Instead you'd need to add a constraint to close a loop. The user guide and doxygen should have some documentation but please let us know if you can't find what you need on the new support site at http://www.stanford.edu/group/opensim/s ... index.html

Other potential issues:
- Do you have mass properties for all the bodies you're applying forces to?
- Do you have any other forces or actuators in your model?
- Can you run ID for a short time window well within the available data to make sure this's not an end-effect issue?
- Last thing I'd try is to take out the pedal forces completely and see if that runs, if so I'd start adding pedal forces back one at a time.

Hope this helps and please let us know if you have any questions,
-Ayman

Re: Problems with inverse dynamics

Posted: Mon Jun 25, 2012 9:47 am
by rvanzandwijk
Thank you Ayman,

It turned out that the pedals indeed had no weight. Inverse dynamics is now running. I will have a look into the constraints. Thank you for the suggestion.

Renate