IMU Placer Setup File

There are six properties (some are optional) that need to be specified in an IMU Placer setup file:

  1. The model to which the IMU Placement is to be applied
  2. The data file containing sensor orientations collected at the model's default pose.
  3. Rotations from IMU/Sensor coordinate system to OpenSim's coordinate system.
  4. Heading correction IMU label (optional)
  5. Heading correction IMU Axis (optional)
  6. Name of the output model file to be written (optional)

A sample setup file is provided in the example below: 

Sample setup file
<?xml version="1.0" encoding="UTF-8" ?>
<OpenSimDocument Version="40000">
	<IMUPlacer>
		<!--The label of the base IMU in the orientation_file_for_calibration used to account for the heading difference between the sensor data and the forward direction of the model. Leave blank if no heading correction is desired.-->
		<base_imu_label>torso_imu</base_imu_label>
		<!--The axis of the base IMU that corresponds to its heading direction. Options are 'x', '-x', 'y', '-y', 'z' or '-z'. Leave blank if no heading correction is desired.-->
		<base_heading_axis>z</base_heading_axis>
		<!--Space fixed Euler angles (XYZ order) from IMU Space to OpenSim. Default (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 to be used for calibration.-->
		<orientation_file_for_calibration>placement_orientations.sto</orientation_file_for_calibration>
	</IMUPlacer>
</OpenSimDocument>

Model

The <model_file> property specifies the file name of an OpenSim (.osim) model that will be used to place IMUs on the model to match the experimental data . Typically this will have a default pose that matches that used for collecting data. If using the GUI, the current model in the application is used, and the xml entry can be left blank.

Orientation File and Transformation

The <orientation_file_for_calibration> tag indicates the required specification of an .sto file that contains quaternions representing the orientations of the IMUs. The names of these IMUs are mapped to model segments based strictly on naming (e.g. pelvis_imu is placed on the pelvis segment of the model). The names can be created/edited during the data conversion step performed by the provided readers (Xsens or APDM) or can be done post-hoc using any text editor.

The <sensor_to_opensim_rotations> tag represents Space fixed Euler angles (in XYZ order) from IMU Space to OpenSim. The angles are specified in radians in the file though displayed in degrees in the application GUI.

Heading Correction

As described earlier, the placement step can be improved by telling OpenSense which IMU/Axis combination correspond to the forward heading direction. The name of the IMU sensor and the corresponding axis are specified by the xml tags <base_imu_label> and <base_heading_axis> respectively. The options for the latter are x,y,z,-x,-y,-z. If base_imu_label is left blank then no heading correction is applied.


Output Model

If using the application GUI this can be left blank as the resulting model with IMUs placed is automatically loaded in the application, however for scripting or pipeline users the name of an output model file name can be specified.