Page 1 of 1

Forward Dynamics for ModelWithSampleSimulations

Posted: Sun Sep 02, 2018 4:46 am
by flgw
I'm trying to get started with OpenSim and the data provided here https://simtk.org/projects/full_body
Unfortunately, the forward dynamics go crazy pretty quickly so reducing the interval as suggested in the documentation is not helping.

Here are my settings, CMC results are taken from the provided results in the dataset and the grf settings are also taken from the CMC folder:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="30516">
	<ForwardTool name="subject_scale_walk">
		<!--Name of the .osim file used to construct a model.-->
		<model_file>C:\OpenSim b435c8fa-2018-07-06\..\..\RRA\walk\subject_walk_rra2.osim</model_file>
		<!--Replace the model's force set with sets specified in <force_set_files>? If false, the force set is appended to.-->
		<replace_force_set>false</replace_force_set>
		<!--List of xml files used to construct a force set for the model.-->
		<force_set_files />
		<!--Directory used for writing results.-->
		<results_directory>.</results_directory>
		<!--Output precision.  It is 8 by default.-->
		<output_precision>8</output_precision>
		<!--Initial time for the simulation.-->
		<initial_time>0.47999999999999998</initial_time>
		<!--Final time for the simulation.-->
		<final_time>0.78900000000000003</final_time>
		<!--Flag indicating whether or not to compute equilibrium values for states other than the coordinates or speeds.  For example, equilibrium muscle fiber lengths or muscle forces.-->
		<solve_for_equilibrium_for_auxiliary_states>true</solve_for_equilibrium_for_auxiliary_states>
		<!--Maximum number of integrator steps.-->
		<maximum_number_of_integrator_steps>20000</maximum_number_of_integrator_steps>
		<!--Maximum integration step size.-->
		<maximum_integrator_step_size>1</maximum_integrator_step_size>
		<!--Minimum integration step size.-->
		<minimum_integrator_step_size>1e-08</minimum_integrator_step_size>
		<!--Integrator error tolerance. When the error is greater, the integrator step size is decreased.-->
		<integrator_error_tolerance>1.0000000000000001e-05</integrator_error_tolerance>
		<!--Set of analyses to be run during the investigation.-->
		<AnalysisSet name="Analyses">
			<objects />
			<groups />
		</AnalysisSet>
		<!--Controller objects in the model.-->
		<ControllerSet name="Controllers">
			<objects>
				<ControlSetController>
					<!--A Storage (.sto) or an XML control nodes file containing the controls for this controlSet.-->
					<controls_file>../../CMC/walk/results/cmc_controls.sto</controls_file>
				</ControlSetController>
			</objects>
			<groups />
		</ControllerSet>
		<!--XML file (.xml) containing the forces applied to the model as ExternalLoads.-->
		<external_loads_file>grf.xml</external_loads_file>
		<!--Storage file (.sto) containing the initial states for the forward simulation. This file often contains multiple rows of data, each row being a time-stamped array of states. The first column contains the time.  The rest of the columns contain the states in the order appropriate for the model. In a storage file, unlike a motion file (.mot), non-uniform time spacing is allowed.  If the user-specified initial time for a simulation does not correspond exactly to one of the time stamps in this file, interpolation is NOT used because it is usually necessary to being a simulation from an exact set of states.  Instead, the closest earlier set of states is used. Having a states file that contains the entire trajectory of a simulations allows for corrective springs for perturbation analysis to be added.-->
		<states_file>../../CMC/walk/results/cmc_states.sto</states_file>
		<!--Flag (true or false) indicating whether or not the integrator should use a particular time stepping.  If true, the time stepping is extracted from the initial states file.  In this situation, therefore, the initial states file must contain all the time steps in a simulation and be written out to high precision (usually 20 decimal places).  Setting this flag to true can be useful when reproducing a previous forward simulation with as little drift as possible.  If this flag is false, the integrator is left to determine its own time stepping.-->
		<use_specified_dt>false</use_specified_dt>
	</ForwardTool>
</OpenSimDocument>