<div class="player-unavailable"><h1 class="message">An error occurred.</h1><div class="submessage"><a
When we were trying to improve the 3pi’s maze performance, our first step was to improve its line-
following ability by better tuning the PID constants as we slowly increased the robot’s maximum speed,
and our second step was to improve the turns to be faster and smoother. Very quickly, however, we
noticed that further speed improvement was being limited by the intersections. If the robot was moving
too quickly when it hit them, it would invariably screw up somewhere. Going slowly enough to survive
the intersections led to unnecessarily slow driving on long straight segments, however.
Our solution was to time the length of every segment the robot encountered during the learning phase.
The code would reset the timer at an intersection and then stop it when the 3pi hit the following
intersection. As the program stored an array of visited intersections, it also stored the segment times
in a parallel array, producing something like:
{ L, S, S, R, L, ... }
{ 3, 3, 6, 5, 8, ... }
The top array gives the action performed at each visited intersection (L = turned left, S = went straight,
R = turned right), and the bottom array gives the amount of time spent driving along the segment that
Pololu 3pi Robot User’s Guide
© 2001–2019 Pololu Corporation
8. Example Project #2: Maze Solving
Page 52 of 85
Содержание 0J5840
Страница 24: ...Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 5 How Your 3pi Works Page 24 of 85...
Страница 67: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 67 of 85...
Страница 77: ...Source code Pololu 3pi Robot User s Guide 2001 2019 Pololu Corporation 10 Expansion Information Page 77 of 85...