OpenSim IMU placer | inverse kinematics tool question (heading correction and sensor to opensim rotation)

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Fangshi Zhu
Posts: 4
Joined: Mon May 10, 2021 9:00 am

OpenSim IMU placer | inverse kinematics tool question (heading correction and sensor to opensim rotation)

Post by Fangshi Zhu » Thu Oct 07, 2021 12:26 pm

Has anyone tried the newly integrated IMU-based inverse kinematics calculation function? I am very excited about this new function and am trying to apply this method to our research project that uses a different kind of IMU sensors to track human walking and turning.

I have some questions about IMU sensor registration and calibration step in the 'OpenSense - Kinematics with IMU Data' example (https://simtk-confluence.stanford.edu:8 ... -stepthree) in the OpenSim website and hope someone here could help me out.

In the example, the author uses 7 Xsens IMU sensors (pelvis_imu, left/right thigh, left/right shank, left/right foot) to track a person's walking and turning. In processing, the author did the following:
First, place and calibrate the IMU sensors on the opened model

Code: Select all

<IMUPlacer>
	...
	<base_imu_label> pelvis_imu </base_imu_label>
        <base_heading_axis> z </base_heading>
        <sensor_to_opensim_rotations> -1.5707963267  0  0 </sensor_to_opensim_rotations>
        ...
</IMUPlacer>
Then, perform the IMU sensor tracking as following:

Code: Select all

<IMUInverseKinematicsTool>
	<time_range> 7.25  15 </ time_range>
        <sensor_to_opensim_rotations> -1.5707963267  0  0 </sensor_to_opensim_rotations>
        ...
</IMUInverseKinematicsTool>
In the IMU placer/calibration process, I am really confused about how to properly set up the base IMU heading correction (<base_heading_axis>) and the following sensor rotation correction (<sensor_to_opensim_rotations>). The tutorial did not explain it in detail, and it is very hard for me to guess. The example says the IMU word frame is (Z up, Y to the left, X to forward, and I suppose it is when the sensor is flatly placed on a level surface). So, when the pelvis IMU sensor is vertically attached to the back of the subject's pelvis (as shown in the example), the sensor orientation should be (Z backward, Y to the left, X up). In this case, shouldn't the heading correction axis be -Z (that face subject's forward)?

And I have no clue how the sensor-to-OpenSim-rotation should be performed. Should we a). place the base IMU sensor on the subject, and then rotate its current world frame to OpenSim world frame and compute the rotations angles, or b). we place the sensor flat on the ground/a level surface and then rotate? It seems like the example took the method b). In this case, the base IMU sensor world frame (when placed flat on a level surface) is (Z up, Y to the left, X forward) and the OpenSim world frame is (Z to the right, Y up, X forward). In this case, we need to rotation the IMU sensor world frame by +90 degrees (positive means following right-hand rule direction) around its +X axis to align with the OpenSim world frame. However, the example rotation setting is: (-90 deg/-1.57 radian, 0, 0). I am confused about why the rotation angle sign is negative?

In our experiment, we had a similar 7 IMU sensor setup (pelvis_imu, left/right thigh, left/right shank, left/right foot) to track human walking and turning. The experiment task is:
  • Stand for ~3 seconds
  • Walk forward, turn 180 degrees, walk straight, turn 180 degrees, walk, turn 180 degrees, etc.
  • Walk back to the starting point, stop and stand for ~3 seconds
The sensor we used is the Alubi IMU sensor, which allows the user to reset/offset each sensor's world frame orientation using their customized software at the beginning of the experiment before the recording. We did two recordings under two different initial IMU world frame orientation setups (shown below in the picture):

https://www.dropbox.com/s/gmv3cef18o25m ... p.png?dl=0

Could someone please help me out on how I should set up the OpenSim IMU placer/calibration in those two scenarios?
  • <base_imu_label> ?
  • <base_heading_axis> ?
  • <sensor_to_opensim_rotations> ?

Tags:

User avatar
Junwei Sun
Posts: 12
Joined: Mon Mar 14, 2022 11:05 am

Re: OpenSim IMU placer | inverse kinematics tool question (heading correction and sensor to opensim rotation)

Post by Junwei Sun » Wed Apr 06, 2022 12:51 pm

Thanks for the great example. I noticed that the IMU-Test-Fangshi-Filter-02-Gyro-Acc-Kalman_IMU.sto file already contains the IMU readings. Is it necessary for the IMU placer to work?

If I want to get the IMU readings from a certain motion, i.e. the IMUDataReporter tool, how should I use the IMU placer?

User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Re: OpenSim IMU placer | inverse kinematics tool question (heading correction and sensor to opensim rotation)

Post by Radhakrishnan Vignesh » Fri May 27, 2022 2:20 am

Hi,

May I ask where did you read that the sensors were kept on the ground prior to calculating sensor_to_opensim rotations?

Thanks

User avatar
mostafa moazen
Posts: 2
Joined: Tue Apr 05, 2022 5:43 am

Re: OpenSim IMU placer | inverse kinematics tool question (heading correction and sensor to opensim rotation)

Post by mostafa moazen » Wed Jun 01, 2022 5:12 pm

Did you find the answer to this question? If you know the answer, please share :?:

POST REPLY