Dear Opensim support,
For my thesis project I have to study the angles and the muscle length in Opensim by using Xsens sensors.
I would like to have some clarification about Opensense.
Until now I have written a code in Matlab to obtain the .sto file from the quaternions of the sensor (Xsens already gives a file with the quaternions so I don't use the code "IMU data conversion") and then i have performed the IMU Placer and IMU IK.
Unfortunatly when I compare the angles obtained with IMU IK and the ones that Xsens gives, I have an error of 10 degrees (at least).
Is it possible that this error is due to the fact that I don't specify where the IMU is placed but only in which segment it is attached to?
Should I specify where the IMU is placed o not? Because by using Xsens there is a strict procedure to follow for putting the sensors in the correct position and I don't understand how can Opensim underdstand the specific position of the sensor... or if this information is not relevant for the overall analysis?
Thank you very much
Best regards
Giulia
Xsens-opensense angle error
- Giulia Cernivani
- Posts: 8
- Joined: Tue Oct 04, 2022 10:05 am
Xsens-opensense angle error
- Attachments
-
- difference in the knee angle obtained with IMU IK and angles given by Xsens
- diff_angolo_ginocchio_sinistro.png (74.34 KiB) Viewed 662 times
Tags:
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Xsens-opensense angle error
Hi Giulia,
The placement/position of the sensor is not relevant for the OpenSense calculations since it computes orientations which will be the same for all locations on a rigid body regardless of where you put the sensor on it. OpenSense assumes that you already did the sensor fusion (which factors in other quantities measured by the sensors including gravity) to compute these orientations. However, OpenSense also tries to satisfy the constraints imposed by the joints of the underlying model. If your model doesn't have all the degrees of freedom necessary to match the input orientations exactly then you'll have a difference between measured sensor orientations and orientations after running OpenSense/IK.
Hope this helps,
-Ayman
The placement/position of the sensor is not relevant for the OpenSense calculations since it computes orientations which will be the same for all locations on a rigid body regardless of where you put the sensor on it. OpenSense assumes that you already did the sensor fusion (which factors in other quantities measured by the sensors including gravity) to compute these orientations. However, OpenSense also tries to satisfy the constraints imposed by the joints of the underlying model. If your model doesn't have all the degrees of freedom necessary to match the input orientations exactly then you'll have a difference between measured sensor orientations and orientations after running OpenSense/IK.
Hope this helps,
-Ayman
- Giulia Cernivani
- Posts: 8
- Joined: Tue Oct 04, 2022 10:05 am
Re: Xsens-opensense angle error
Thank you very much for your reply!!!
I have tried to add some DoF to knee by using the model "ModelWithKneeLigaments" found in Opensim.
The IMU Placer was performed correctly but when I tried to use the IMU IK this error occured. How can i solve this problem?
This is what I have written in Notepad by using "ModelWithKneeLigaments"
<Coordinate name="knee_rotation_r">
<motion_type> rotational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.52359877 0.78539815</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_adduction_r">
<motion_type>rotational</motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.26179930 0.26179930</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_tx_r">
<motion_type> translational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.02 0.02</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_ty_r">
<motion_type> translational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.030 0.030</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_tz_r">
<motion_type> translational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.02000000 0.02000000</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
In particular I have seen that the error appears when I try to add the translation in x,y,z
Thank you very much!
Best regards
Giulia
I have tried to add some DoF to knee by using the model "ModelWithKneeLigaments" found in Opensim.
The IMU Placer was performed correctly but when I tried to use the IMU IK this error occured. How can i solve this problem?
This is what I have written in Notepad by using "ModelWithKneeLigaments"
<Coordinate name="knee_rotation_r">
<motion_type> rotational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.52359877 0.78539815</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_adduction_r">
<motion_type>rotational</motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.26179930 0.26179930</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_tx_r">
<motion_type> translational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.02 0.02</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_ty_r">
<motion_type> translational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.030 0.030</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
<Coordinate name="knee_tz_r">
<motion_type> translational </motion_type>
<default_value>0</default_value>
<default_speed_value>0</default_speed_value>
<range>-0.02000000 0.02000000</range>
<clamped> false </clamped>
<locked> false </locked>
<prescribed_function/>
</Coordinate>
In particular I have seen that the error appears when I try to add the translation in x,y,z
Thank you very much!
Best regards
Giulia
- Attachments
-
- error.png (15.92 KiB) Viewed 578 times