Simulating Motion

Provides a real-time, dynamic simulation of arm movement.
POST REPLY
User avatar
Patrick Williamson
Posts: 2
Joined: Tue Jan 26, 2016 5:24 pm

Simulating Motion

Post by Patrick Williamson » Thu Feb 04, 2016 7:01 am

When trying to simulate a motion to extract information on muscle activation, OpenSim tries to simulate, but we get the following error:

'Integrating from 0 to 1000
ForwardTool::run() caught exception
SimTK Exception thrown at AbstractIntegratorRep.cpp:428:
Integrator step failed at time 0 apparently because:
SimTK Exception thrown at AbstractIntegratorRep.cpp:547:
Error detected by Simbody method AbstractIntegrator::takeOneStep(): Unable to advance time past 0.
(Required condition 't1 > t0' was not met.)'

I was wondering if there was something else that needs to be input for simulation to run correctly because our t1 is in fact greater than t0.

User avatar
Ton van den Bogert
Posts: 165
Joined: Thu Apr 27, 2006 11:37 am

Re: Simulating Motion

Post by Ton van den Bogert » Thu Feb 04, 2016 7:38 am

Patrick,

This model is not suitable for dynamic simulation in Opensim. You can use Opensim to do kinematic simulations only on this model.

The problem (which causes your error message) is that there are extremely small masses in the model, which require extremely small time steps and Opensim's differential equation solver fails.

For this model, we provide a MEX functon and Matlab code to do dynamic simulations. We usually use this model with a fixed step integrator (as explained in the paper), and the Matlab code for that can be found in das3step.m and also in the "simulate" test in das3test.m.

If real-time simulation is not important, you can get a more reliable simulation with the "ode15i" solver in Matlab. I have no example code for that, and I do not know how fast that will run, but if you are interested in pursuing this, I can help where needed.

If you do simulation in Matlab, you can still export the results and examine them in Opensim, and view the motions. The "simulate" test in das3test.m shows you how to do that.

Ton van den Bogert

User avatar
Patrick Williamson
Posts: 2
Joined: Tue Jan 26, 2016 5:24 pm

Re: Simulating Motion

Post by Patrick Williamson » Fri Feb 05, 2016 12:18 pm

Thanks for the help Ton.

I am assuming the 'das3test.m' file you referenced is the 'das3sim.m' file found in the das3-v1.0.zip folder, is this correct?

Further, when running das3sim it is our understanding that the input for this is the equilibrium.mat file. Inside this file is a variable 'x' that has 298 doubles. We are not sure what this vector represents, but we are under the impression that we can leverage this variable with our motion data to create a motion file output.

POST REPLY