There are groups of properties that need to be specified in an IMU inverse kinematics setup file that parallel the tool dialog:
- 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.
- The weights to track individual sensors and the time range
- The output specification (output motion, IMU tracking errors).
A sample IMU inverse kinematics setup file is provided in the example below:
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).
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.
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.