-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Head IMU returns the roll and yaw value with opposite sign #901
Comments
@davidegorbani can you report the following information:
Thanks! Furthermore, I think there are two possible source of error:
To disambiguate what is the source of the error, we can try to plot the reading of the accelerometer, multiplied by
|
fyi @Nicogene @pattacini |
Thanks for reporting this @davidegorbani To get to know it, you may peruse the brand-new instructions (thanks to @davidetome): |
The version of the rfe firmware is the 1.3.0 while the version of YARP is the 3.7. |
I did the test that you suggested and those are plots that I got: The first one is the plot of the acceleration vector multiplied by |
So it seems that the frame position in the URDF is correct, while it is the roll pitch yaw value returned by the IMU that is wrong. |
I would like to add that before updating the firmware version of the |
As a starting point, I checked the accelerometer measurements by placing an (The MPU9250 IMU is not used) The readings on the 3 axes are coherent (-9.6 on axes pointing down) As suggested by @Nicogene There is the possibility to select the convention Android or Windows (default) but it affects only the pitch as documented in the And Windows is default as stated in this FW comment but in YARP we have another and so it's remapped |
Today I got aligned with/ @Nicogene and we have reconstruted history. Starting from these issues :
there were problems w/ the signs in the Euler and acc on the strain (the RFE was not used) It was fixed, setting the right placement and the manual remapping was removed : So now we have to proceed by fixing the actual Euler conversion for the RFE and by setting the one for the STRAIN2/STRAIN2C putting an ifdef in the FW. To do that we need to understand which is the right Euler conversion on the SRAIN2/C and the putting them in the FW. |
Today I made some tests to compare the STRAIN2 and RFE. I removed the transform for the FT sensor/STRAIN2 alignment and compared the behaviour of the IMU on the two boards with respect to the Datasheet The behaviour is identical and correct in both (@Nicogene we can test together as double check) 22.09.2023_17.14.36_REC.mp4Moving the axes as described above the readings increase So I modified the FW in order to fix the Euler conversion in the RFE : @davidegorbani , It may be worth if you can test the mod and give feedback 👍🏻 So please, find attached binary to flash on the RFE before testing : |
Now the robot is broken, but I will test it as soon as it is fixed; thank you! |
Ciao @davidegorbani ! Did you have the chance to test it? |
Hello, |
Thank you for the update! 👍🏻 |
Hello @davidetome, the robot is now fixed but today we have to do experiments so I will not be able to test the new firmware; I will test it next week. |
Hi @davidetome, this morning I tested the new firmware and here are the plots of the test that I did: From the comparison between the roll, pitch and yaw angles estimated using the head IMU and the FK we can see that they are the same, apart from a jump on the roll and yaw that I think is due to the conversion from rotation matrix to Euler angles; in fact, from the plot of the test proposed here; the values of the acceleration along the x, y and z components are constant. |
That's great @davidegorbani! |
Thank you @davidegorbani for your feedback! We deduced that readings increase with the following :
This is coherent with the fix I made in the FW for the PR will be merged and new binaries produced when we get positive feedback from this issue |
Bug description
I was doing some tests with the robot iCubGenova09 (iRonCub-Mk3) and I was testing the IMU in the head on the robot; I noticed a weird behaviour of the IMU so investigated further and I found out that the roll and yaw angles that the IMU returns have an opposite sign with respect to the actual one. In order to prove it, as suggested by @traversaro, I calculated the orientation computed by the IMU with respect to the initial frame of the IMU and compared it with the orientation obtained using the forward kinematics.${^{A}}R_{IMU_0}$ , that is the rotation matrix between the IMU frame at the initial time and the IMU fixed frame, and I used this to compute the rotation matrix between the frame of the IMU at each time instant and the IMU frame at the initial time as:
$${^{IMU_0}}R_{IMU} = ({^{A}}R_{IMU_0})^{T} * {^{A}}R_{IMU}$$ $^{IMU_0} R _{IMU} ^{FK}$ as:
Since the IMU returns the relative orientation between the IMU frame and a fixed frame
A
, first I computed the rotation matrixThen I used the forward kinematics to compute the same rotation matrix
where${^{B}}R_{IMU}$ is the rotation matrix between the IMU frame and the ${^{B}}R_{IMU_0}$ is the rotation matrix between the IMU frame and the
root_link
and theroot_link
at the initial time.This is the plot comparing the roll, pitch and yaw obtained using the head IMU and the forward kinematics and, as it possible to notice, the roll and yaw have different signs.
Calculating the rotation matrix${^{A}}R_{IMU}$ changing the sign of the roll and yaw, the orientations are very similar.
CC @HosameldinMohamed @gabrielenava
Steps to reproduce
In order to reproduce the bug it is possible to use the following dataset that I collected rotating the neck joint of the robot and check the plot generated by the MATLAB script in https://gist.github.com/davidegorbani/8eb592db29d2c046d36682cc6cd889b9.
The dataset and the urdf model are:
dataset.zip
Expected behavior
No response
Example repository
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: