IMU IK Settings Files and XML Tag Definitions

There are groups of properties that need to be specified in an IMU inverse kinematics setup file that parallel the tool dialog:

  1. The model to which the IK solver is to be applied, the sensor orientations to solve for, and the transformation from IMU world to OpenSim.
  2. The weights to track individual sensors and the time range
  3. The output specification (output motion, IMU tracking errors).

A sample IMU inverse kinematics setup file is provided in the example below: 

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="40000">
	<IMUInverseKinematicsTool>
		<!--Name of the directory where results are written. Be default this is the directory in which the setup file is be  executed.-->
		<results_directory></results_directory>
		<!--The time range for the study.-->
		<time_range>10.5 17</time_range>
		<!--Name of the resulting inverse kinematics motion (.mot) file.-->
		<output_motion_file>walking_motion.sto</output_motion_file>
		<!--Flag (true or false) indicating whether or not to report errors from the inverse kinematics solution. Default is true.-->
		<report_errors>false</report_errors>
		<!--Space fixed Euler angles (XYZ order) from IMU Space to OpenSim. Default to (0, 0, 0).-->
		<sensor_to_opensim_rotations>-1.5707963267948966 0 0</sensor_to_opensim_rotations>
		<!--Name/path to a .sto file of sensor frame orientations as quaternions.-->
		<orientations_file>walking_orientations.sto</orientations_file>
	</IMUInverseKinematicsTool>
</OpenSimDocument>


Model Specification

This corresponds to the xml tag <model_file> and specifies the .osim file for a model that had IMUs placed on it (using the IMU Placer Tool).

Orientations File

This corresponds to the xml tag <orientations_file> and specifies the path to the sto file containing the time histories of IMU orientations specified as quaternions. The labels in the sto file must correspond to the names of the sensors/IMUs placed on the model.

Transformations from IMU system to OpenSim can be specified here similar to how it is done for IMU Placer.


Results Directory

Typically users only specify output motion file for kinematics, however if more results are needed (e.g. tracking errors) then the users can explicitly specify a folder to contain all results including the output motion and error files. This directory specification would be included under the tag <results_directory>, if not specified and output motion is specified then the folder chosen for output motion is assumed to be the results directory.

Sensor Weights and Tracking Error Reporting

A set of orientation weights identified by orientation name with weight being a positive scalar can be included under the tag <OrientationWeightSet>. If not provided, all IMU orientations are tracked with weight 1.0. Users also have the option to request that tracking errors be reported by turning on the flag <report_errors> to true. The file containing tracking errors is written to the results directory.


<OrientationWeightSet name="orientation_weights">
   <objects />
</OrientationWeightSet>






OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.