Hi
I'm trying to figure out what the step_interval (found in Analyses - PointKinematics, BodyKinematics etc.) is in terms of time. How is it defined?
E.g. When I run a 1 sec simulation with step_interval=1 I'll get 1859 steps/samples. How is this number declared please?
Thanks
George
step_interval info in PointKinematics, BodyKinematics etc
- George Mastorakis
- Posts: 31
- Joined: Tue Mar 15, 2016 1:27 pm
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: step_interval info in PointKinematics, BodyKinematics etc
Here's the description for the step_interval property (in the GUI, select "XML Browser" from the "Help" menu and display the XML for the PointKinematics class, for example):
For example, setting step_interval to 10 will run the Analysis every tenth integration time step.
Code: Select all
<!--Specifies how often to store results during a simulation. More specifically, the interval (a positive integer) specifies how many successful integration steps should be taken before results are recorded again.-->
- George Mastorakis
- Posts: 31
- Joined: Tue Mar 15, 2016 1:27 pm
Re: step_interval info in PointKinematics, BodyKinematics etc
Hi Tom
Thanks for this. Is there a way to fixate the number of steps per second of the simulation please?
E.g. 1000steps/sec for A simulation, or 2000steps/sec for B simulation
George
Thanks for this. Is there a way to fixate the number of steps per second of the simulation please?
E.g. 1000steps/sec for A simulation, or 2000steps/sec for B simulation
George
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: step_interval info in PointKinematics, BodyKinematics etc
I'm assuming you're using the Forward Tool. If you check the "Use time steps from states file" box in the "Integrator Settings" pane, the rows in the output files will align with the "time" column in the "initial states" file. There is a description of this feature in the Confluence documentation (at the bottom of the "How to Use the Forward Dynamics Tool" page: http://simtk-confluence.stanford.edu:80 ... amics+Tool) and in the code (https://github.com/opensim-org/opensim- ... l.cpp#L179). When specifying the desired time points in the "initial states" file, don't forget to update the "nRows" line in the header.Is there a way to fixate the number of steps per second of the simulation please?
- George Mastorakis
- Posts: 31
- Joined: Tue Mar 15, 2016 1:27 pm
Re: step_interval info in PointKinematics, BodyKinematics etc
Apologies but it doesn't seem to work. There is no visible correlation between the Integrator Settings values and the nRows found in the resulting .sto files. Is there anything missing please?
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: step_interval info in PointKinematics, BodyKinematics etc
If that feature isn't doing the job, I suggest simply interpolating the results in a post-processing script.
- George Mastorakis
- Posts: 31
- Joined: Tue Mar 15, 2016 1:27 pm
Re: step_interval info in PointKinematics, BodyKinematics etc
This is also an option. Thanks for pointing it out.
- Thomas Uchida
- Posts: 1792
- Joined: Wed May 16, 2012 11:40 am
Re: step_interval info in PointKinematics, BodyKinematics etc
I tested in OpenSim 3.3 using the arm26 model and didn't encounter an issue. I've attached a .zip containing the model file, the initial states file I created (the "time" column lists the time points that will appear in the output), and the Forward Tool setup file.
- Attachments
-
- forum7683.zip
- (7.8 KiB) Downloaded 43 times