Skip to content
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

[Feature] Adjust default imu stationary thresholds #1105

Open
laurensvalk opened this issue Jun 8, 2023 · 6 comments
Open

[Feature] Adjust default imu stationary thresholds #1105

laurensvalk opened this issue Jun 8, 2023 · 6 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: control Issues involving control system algorithms topic: imu Issues related to IMU/gyro/accelerometer

Comments

@laurensvalk
Copy link
Member

I made some tests with the two Prime Hubs I have available.

I think the accelaration threashold can be completely left out. This is the one that is most sensible to vibrations and shock. Trampling on the ground or tapping the table will trigger it, even if you set relatively high values. I don't think it is neccesary to check this value at all. Theoreticalle the gyro can be calibrated anyway no matter what force values the robot it is experiencing as it is only the rotation that matters.

For the gyro I think a setting of about 5 will be ok. With this setting it is impossible to trigger steady when holding thy robot in the hand or when the robot is driving around on the table. With a setting of 10 it is possible the robot will sometimes go to steady state when doing a very calm straight drive.

Originally posted by @Kermit647 in #1080 (reply in thread)

@laurensvalk laurensvalk added topic: control Issues involving control system algorithms topic: imu Issues related to IMU/gyro/accelerometer bug Something isn't working labels Jun 8, 2023
@laurensvalk
Copy link
Member Author

It would certainly be good to adjust them. I was at a busy event recently and couldn't get the calibration to pass in some conditions.

laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Jul 6, 2023
This makes sure that the defaults work better in noisier conditions.

Fixes pybricks/support#1105
@laurensvalk laurensvalk added documentation Improvements or additions to documentation software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) labels Jul 6, 2023
@laurensvalk
Copy link
Member Author

For the gyro I think a setting of about 5 will be ok.

Done!

I think the accelaration threashold can be completely left out.

I have now set this to 2500 deg/s^2, which should make it less susceptible to vibrations.

It will still register a knock on the table, which is more or less intended when it comes to stationary detection.

What do you think?

@laurensvalk
Copy link
Member Author

laurensvalk commented Sep 19, 2024

@scatwang and @DrTom: This is where we introduced the relaxed thresholds.

I think you have found in #1840 and #1687 that the current defaults are not sensitive enough. So 1.5 deg/s was too strict and 5 deg/s was too lax. I suppose that means we could consider 3 deg/s.

Maybe it was mainly the acceleration threshold that was too sensitive in noisy FLL/WRO environments, so maybe we should leave that at this high 2500 value.

@laurensvalk laurensvalk reopened this Sep 19, 2024
@laurensvalk
Copy link
Member Author

We'll also want to update both in the documentation. pybricks/pybricks-micropython@8809277 was also not documented.

laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Sep 19, 2024
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Sep 19, 2024
@laurensvalk
Copy link
Member Author

The fix is available for testing using these instructions to try the latest version

Please re-open if you experience any further issues or inconsistencies. Thank you!

@laurensvalk
Copy link
Member Author

We'll also want to update both in the documentation. pybricks/pybricks-micropython@8809277 was also not documented.

This was closed by GitHub action but the documentation hasn't been updated yet, so re-opening.

@laurensvalk laurensvalk reopened this Oct 29, 2024
laurensvalk added a commit to pybricks/pybricks-micropython that referenced this issue Oct 29, 2024
Now that it is a bit less sensitive to outliers, we can reduce this value. See pybricks/support#1105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: control Issues involving control system algorithms topic: imu Issues related to IMU/gyro/accelerometer
Projects
None yet
Development

No branches or pull requests

1 participant