The newly integrated OpenSense (IMU placer and IMU inverse kinematics) tool is great. I tried it with our IMU data and was able to get some decent ik results except for one issue: when the subject turns around for 180 degrees and walks along the opposite direction of the OpenSim +X (starting direction/first frame direction), the IMU ik-driven model doesn't seem to compensate the turning and look like it is walking backward.
In the OpenSim wiki example, the (Xsens) IMU ik result seems correct even when the subject walks around and turns. However, I had a hard time getting it right with our data when the subject turns 180 degrees. Could someone provide some help this?
----------------------------------------
---- Below are the detailed description of the problem, and a test dataset (including model.osim, IMU quaternion.sto, IMU placer XML, IMU_ik.mot) -------------------------------------------
Brief question description:
IMU inverse kinematics results look wrong when the subject turns/walks to the opposite direction of the starting direction (OpenSim +X).
Detailed description:
Method:
We used 7 Alubi IMU sensors (local axis direction shown below) and recorded the sensor quaternions from each sensor. The data format, and organizations are not the same as the Xsens sensors/system, so I wrote custom scripts to convert our data into the 'xxx_quaternion.sto' format (single, time synced, quaternions storage (.sto) file) that is compatible with the OpenSim|OpenSense software.
The sensor (blue cubes are Alubi IMU sensors) attachment and its local coordinate system are shown below:
https://www.dropbox.com/s/1dr6g5wb4ctvc ... 1.png?dl=0
My processing steps are:
- I first used the 'IMU placer tool' to place IMU on the subject model. (Align IMU: pelvis_imu, heading correction: +Z; Rotation: (90, 0, 0), as shown above, to match the OpenSim coordinate axis direction).
- Then I used the 'IMU Inverse Kinematics' (Rotation: (90, 0, 0)) tool to run inverse kinematics computation.
https://www.dropbox.com/s/uwwklx0evmp0f ... 2.png?dl=0
As in starting position, the subject|pelvis_imu sensor +Z direction is facing the OpenSim +X direction, when using the IMU placer tool, I did the sensor alignment & heading correction as pelvis_imu, +Z, rotation(90, 0, 0) .
The motion task in the entire trial task was:
- Walk along OpenSim +X direction
- Walk along OpenSim -X direction
- Walk along OpenSim +X direction
- Walk along OpenSim -X direction
- Turn around to face OpenSim +x direction again.
- When the walking direction is the same as the starting position direction, the result seems correct (from OpenSim model 3D animation)
- When the walking direction is the opposite of the starting position direction, the result seems incorrect (as if the subject walks backward).
The IK result looks correct across the entire trial. Even after the subject turns around, all the leg joints still flex/extend in the right direction:
https://www.dropbox.com/s/c8pw9kmpb93xv ... 3.png?dl=0
However, in our case, after the subject turns around 180 deg, the results look like the subject was walking backward. I did some tests and found that when placing the IMU (using the IMU Placer Tool), by simply flipping the Heading correction from pelvis_imu, +Z direction to pelvis_imu, -Z direction, the results (right/wrong) direction also flipped. Now:
- when the subject walks in the opposite of starting direction, the result is correct
- when walking along the starting direction, the result looks wrong (walk backward).
https://www.dropbox.com/s/bihtal6l3diwp ... 4.png?dl=0
https://www.dropbox.com/s/30v19a3qjvvhg ... 5.png?dl=0
For your reference, here is a video clip of the results I got:
https://www.dropbox.com/s/bt74u6rcwijri ... l.mp4?dl=0
Could you please provide some help on this matter? How to make sure the subject turning does not affect the IMU ik result?
FYI, I have attached our model, IMU placing and ik setup file (.xml), a test dataset (.sto), and ik results (.mot) for you to test out:
https://www.dropbox.com/sh/fpsk7gp5jutg ... JS-fa?dl=0
Here is the folder organization structure:
https://www.dropbox.com/s/tnqpemhs5zt20 ... 6.png?dl=0
Any suggestion or comment is appreciated.
---
Fangshi Zhu, Ph.D.
Postdoctoral Research Fellow
NeuroRecovery Research Center
Department of Physical Medicine and Rehabilitation
University of Texas Health Science Center at Houston
1333 Moursund St
Houston, TX 77030
Email: Fangshi.Zhu@uth.tmc.edu | fungshi.zhu@gmail.com