-
Notifications
You must be signed in to change notification settings - Fork 18
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
Wrong data from gyroscopes and accelerometers #129
Comments
@isorrentino I am not wrong this data was collected on the ergoCubSN000 before leaving from London and updating to the last firmware, so we are not sure which version of the firmware was running on the STRAIN2, right? |
Actually, I logged the data the weekend before the robot left. So I would say the version is the same as it is now. |
By discussing with @isorrentino and @GiulioRomualdi, it is not 100% certain the version of firmware of STRAIN2 used in ergocub, but the most probable version is strain 2.1.0 from robotology/icub-firmware-build#77 . For some reason, it seems that the logic to rotate the gyroscope and acceleration in the FT frame implemented in:
Is not working anymore. |
Another relevant piece of information is: But how did the robot manage to walk in London? |
Something that I noticed (and I do not know if it is related) is that robotology/icub-firmware#313 added a new board called |
The walking mainly uses the xsens imu in the pelvis, I guess the issue is w.r.t. to an IMU mounted on an FT sensor. @isorrentino can you share the name of the IMU that is missbehaving? Thanks! |
Found, it is the |
I checked the ones mounted on the |
On the 18th of May I flashed the firmware of the 2foc as written in robotology/robots-configuration#522 I used this tag: https://github.com/robotology/icub-firmware-build/releases/tag/v1.34.1 @isorrentino collected the data on 20 may 2023 so the firmware version was already updated |
Probably this is the point; good catch👍🏻 |
i don't think that the |
The conversion is implemented to realign the IMU frame to the FT frame so the driver shouldn't be involved in that operation, I think, as it should be rather responsible only for dealing with the IMU itself. |
The robot will be back soon and we might double-check the strain2 fw version. Before that, we might check if the forces/accelerations/gyro are expressed in the same reference system w/ an FT on the bench. For doing it, using https://github.com/icub-tech-iit/ft-sensors-simulink could ease the test |
Also, we could already patch the FW by dealing with the macro |
added check for Tomorrow I'll test other stuff |
In the meanwhile I checked on the robot the fw version of strain2 boards And it is the latest one ( |
Just for the sake of clarity, in robotology/icub-firmware#286 we moved the conversion inside the driver, which is fine for the time being. |
Today I checked the axis map using the Simulink model, here are the results : F/T sensor w/ the latest FW in develThe mapping is :
F/T sensor w/ the latest FW in devel without the remappingRemoving the macro : #if defined(STM32HAL_BOARD_STRAIN2)
// In strain2 we have the P6 configuration reported in bno055 datasheet
embot::hw::bno055::write(pImpl->config.sensor, embot::hw::bno055::Register::AXIS_MAP_CONFIG, 0x21, 5*embot::core::time1millisec);
embot::hw::bno055::write(pImpl->config.sensor, embot::hw::bno055::Register::AXIS_MAP_SIGN, 0x07, 5*embot::core::time1millisec);
#endif Yhe mapping is again :
F/T sensor w/ the FW included in the v1.26.0 releaseUsing the FW released on 31/8/22 when the remapping was implemented The mapping is :
The code inside the macro ℹ️ The difference between the 2 FW is the STM32HAL lib used and some mods in the driver. We've to deeply inspect these differences |
After a brief alignment w/ @marcoaccame and @davidetome we decided to check if we request runtime of changing the reference frame the measure changes or it is ignored in order to narrow-down the problem to eventually the startup configuration |
Thoi morning I tested sending the CAN message to set orientation P5 : And the orientation of the axis changes (in this case Z axis) |
built w/ robotology/icub-firmware@549c5de and robotology/icub-firmware-shared@b549dee main changes: - The measurement of the IMU on strain2 and strain2c is now correct, the configuration in order to be expressed in the same ref frame of FT was overwrote by mistake(see icub-tech-iit/ergocub-software#129)
We should have found the bug, we already committed the fix, we should test it first:
It incorporates also this cc @marcoaccame @pattacini @davidetome @isorrentino @traversaro |
Great, thanks a lot! |
Do you have an idea of what caused the regression and which versions of the firmware are affected? |
This PR: Added the possibility of configuring the IMU reference frame via CAN, and it came after So the versions:
are affected by this bug. It was due to the fact that if not specified in the imu config message, the placement |
Thanks, this is now clear! |
Orientation is now ok 👍🏻 |
Hi all, thanks for dealing with this. I was wondering: what is the plan to update the FT sensors on the ergoCubSN000? If already done, thanks also for that |
Hi @DanielePucci, I am in contact w/ @AntonioConsilvio for updating the FT of the robot since it is in Rome, worst case we will update it when it will be back |
Thanks for the feedback @Nicogene, looks a nice plan |
By checking data from the robot I discovered that the gyroscope and accelerometer measurements do not match the values computed from forward kinematics. In particular, all the axes have the sign inverted and the
x
andy
axes are switched.Here is the script I used for these plots and a dataset.
check_imu_frame.zip
The figures compare the measurements from the sensors (in blue) and the forward kinematics (in red).
While the plot on the left side shows the measurements from the sensors as they are, the one on the right shows the axes switched as:
Gyroscope right foot front
Accelerometer right rear front
I did not check the other sensors.
cc @GiulioRomualdi @traversaro @Nicogene @pattacini
The text was updated successfully, but these errors were encountered: