OpenSim Scapulothoracic Model Unexpected Output
Posted: Wed Jun 24, 2020 8:03 am
I am working with the OpenSim/OpenSense in Python scripting/wrapping with the scapulothoracic model and IMU kinematics (orientations), but unfortunately the output after load, calibration is not really in line with the motion I captured with the Xsens IMU sensors. I go through the following steps to get to the output (simply loading the model and motion data into the OpenSim GUI version 4.1. to visually verify the measured motion):
1. Conversion of the Xsens data to OpenSense friendly format (no errors), but I have adapted the myIMUmappings.xml file (derived from the OpenSim IMU example) and I have named the sensors in de model segment_imu (only the humerus and radius do have another kind of offset frame in the model which I am not able to choose).
2. I load the original scapulothoracic model (uncalibrated, only adapted default pose), the scapulothoracic plugin and the <_orientations.sto> file. I convert the local coordination system of the IMU to the OpenSense world coordination system according to the XYZ Euler order and select the base IMU (which is the thorax_imu) and the heading direction (originally z-axis of the coordination system of the Xsens sensor in line with the position I choose to place the sensor on the thorax; z-axis is pointing in forward direction).
Do I have to choose the axis which I pointing in forward direction according to the Xsens sensor local coordination system or the axis after conversion of the local coordination system to the OpenSense world coordination system, which doesnt make sense because the axes of both coordinations system are in line after conversion?
I am performing the aforementioned steps by running the OpenSense_CalibrateModel.py Python script from the OpenSim IMU example.
3. Subsequently, I am running the OpenSense_OrientationTracking.py where I am loading the calibrated scapulothoracic model with the .osim extension (output of the previous Python script) and again the scapulothoracic plugin and the _orientations.sto file. I have to convert the local coordination system of the IMU to the OpenSense world coordination system according to the XYZ Euler order again and after running the Python script the ik_orientations.mot will be provided as output.
4. Finally, I am loading the calibrated scapulothoracic model with the .osim extension and the ik_orientations.mot, but unfortunately the motion does not look like the measured motion in the slightest.
What could be the issue here? The pose is more or less equal to the default pose of the OpenSim Model, I have converted the coordination system of the IMU in order to get the system in line with the OpenSim world, so I do not quite understand what the reason(s) is/are for the messed up output.
Hopefully someone can help me further and push me in the right direction! It is much appreciated!
1. Conversion of the Xsens data to OpenSense friendly format (no errors), but I have adapted the myIMUmappings.xml file (derived from the OpenSim IMU example) and I have named the sensors in de model segment_imu (only the humerus and radius do have another kind of offset frame in the model which I am not able to choose).
2. I load the original scapulothoracic model (uncalibrated, only adapted default pose), the scapulothoracic plugin and the <_orientations.sto> file. I convert the local coordination system of the IMU to the OpenSense world coordination system according to the XYZ Euler order and select the base IMU (which is the thorax_imu) and the heading direction (originally z-axis of the coordination system of the Xsens sensor in line with the position I choose to place the sensor on the thorax; z-axis is pointing in forward direction).
Do I have to choose the axis which I pointing in forward direction according to the Xsens sensor local coordination system or the axis after conversion of the local coordination system to the OpenSense world coordination system, which doesnt make sense because the axes of both coordinations system are in line after conversion?
I am performing the aforementioned steps by running the OpenSense_CalibrateModel.py Python script from the OpenSim IMU example.
3. Subsequently, I am running the OpenSense_OrientationTracking.py where I am loading the calibrated scapulothoracic model with the .osim extension (output of the previous Python script) and again the scapulothoracic plugin and the _orientations.sto file. I have to convert the local coordination system of the IMU to the OpenSense world coordination system according to the XYZ Euler order again and after running the Python script the ik_orientations.mot will be provided as output.
4. Finally, I am loading the calibrated scapulothoracic model with the .osim extension and the ik_orientations.mot, but unfortunately the motion does not look like the measured motion in the slightest.
What could be the issue here? The pose is more or less equal to the default pose of the OpenSim Model, I have converted the coordination system of the IMU in order to get the system in line with the OpenSim world, so I do not quite understand what the reason(s) is/are for the messed up output.
Hopefully someone can help me further and push me in the right direction! It is much appreciated!