-
-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)Issues with Pybricks MicroPython firmware (or EV3 runtime)topic: controlIssues involving control system algorithmsIssues involving control system algorithmstopic: imuIssues related to IMU/gyro/accelerometerIssues related to IMU/gyro/accelerometer
Description
Describe the bug / To reproduce
round(hub.imu.heading()) is supposed to be equal to robot.angle() when the gyro is used, but was not the case.
For example, 720.3 should round to 720, not 722.
This was linearly increasing for bigger rotations, adding to the apparent drift when there wasn't any.
Expected behavior
Round properly. And then later switch to floats in #1844.
We need to fix the rounding either way because this value is still used by the internal controllers, causing things like turn(360) be off to up to a degree.
Additional context
This issue has already been debugged, but opening this issue serves as a documentation of the issue and its fix. Fix incoming shortly.
Metadata
Metadata
Assignees
Labels
software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)Issues with Pybricks MicroPython firmware (or EV3 runtime)topic: controlIssues involving control system algorithmsIssues involving control system algorithmstopic: imuIssues related to IMU/gyro/accelerometerIssues related to IMU/gyro/accelerometer
