[Feature] Also reset heading target when resetting odometry. #1617
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
software: pybricks-micropython
Issues with Pybricks MicroPython firmware (or EV3 runtime)
topic: control
Issues involving control system algorithms
topic: motors
Issues involving motors
Is your feature request related to a problem? Please describe.
At the moment, calling
drivebase.reset()
resets the odometry offsets, but doesn't do anything to the controls. So if you are holding, you will keep holding.Based on various discussions like https://github.com/orgs/pybricks/discussions/1616#discussioncomment-9251463, I think the user assumption is that this will also reset any internal controller states.
Describe the solution you'd like
I think it is reasonable to reset the states equivalent to calling
stop()
, so the user does not have to do this themselves, and so they don't forget about it.drivebase.reset()
is usually used when re-aligning the robot with the wall, so having a clean slate here makes sense, so it won't keep trying to maintain any previous targets in case it was holding.I think it may also be reasonable to assume that the user will want to stop when calling
drivebase.reset()
, so maybe physically coasting isn't a bad idea. You could always immediately hold again if you wanted to.When we do that,
reset
really does mean: reset back to the start, as if starting a new mission/program, which is probably what this function is going to be used for anyway.This is a slightly breaking change though, so we'll want to clarify that in the documentation.
The text was updated successfully, but these errors were encountered: