DriveBase track target #1853
Replies: 1 comment 1 reply
-
If you want to drive straight based on the gyro, you could use If you want to continuously change the target like when following a colored ball or line, you could do something like the following: correction = target - drivebase.angle()
gain = 1 # Choose a suitable feedback
drivebase.drive(speed, correction * gain) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need an equivalent of the Motor class’ track_target but for DriveBase’s straight method. Before I start writing it, is there functionality I may have missed that makes this easier?
Beta Was this translation helpful? Give feedback.
All reactions