Replies: 2 comments
-
|
the solution is found, you just need to add drive_base.brake() after await drive_base.straight(-80) |
Beta Was this translation helpful? Give feedback.
-
|
If you are using the gyro with the drivebase, is better to replace with drive_base.reset(angle=0)This will both stop the robot and reset the heading to the given value. This message: means you shouldn't reset the gyro while it is being used for driving. You need to stop driving first. Using We now give this warning because doing this is almost always not what the user actually intends to do. As an analogy, this is like instantly changing the compass angle of a plane on autopilot mid-air. You really want to land first before doing that 😄 Before when you did this in version 3.5, the robot would suddenly start tracking the angle you just changed. In your code this did not happen because you do something else with the motors immediately after, but it was catching other people by surprise. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Before that, I had firmware 3.5 and everything was fine, today I installed 3.6 and an error appeared: OSError: Can't reset heading while gyro in use. Stop driving first.
here is the part when related to this:
start of turn_left():
async def turn_left():
Beta Was this translation helpful? Give feedback.
All reactions