IMU Placer Setup File
There are six properties (some are optional) that need to be specified in an IMU Placer setup file:
- The model to which the IMU Placement is to be applied
- The data file containing sensor orientations collected at the model's default pose.
- Rotations from IMU/Sensor coordinate system to OpenSim's coordinate system.
- Heading correction IMU label (optional)
- Heading correction IMU Axis (optional)
- Name of the output model file to be written (optional)
A sample setup file is provided in the example below:
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.
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.
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.