Ops Manager: Project
4. Instruct Your Robot
In the LEARN section you implemented a Bang! Bang! controller. There is a more efficient way to follow the line that gives you a faster straight line speed and allows you to corner at higher speeds without losing the line. The more efficient you can make it, the faster your robot can pick items from stock and the more items your warehouse can pack in a day.
- Amend the code you used in the LEARN section to improve the behavior of your warehouse stock picker.
- Use the line follower’s position_val() function, which can tell you how far you are from the line, to code up a proportional controller, where the magnitude of steering is proportional to the line’s distance from the center.
See the LEARN section for details of this line follower function and a recap of some driving functions that you may find useful in this challenge. Or download the (same) files directly from here if you need to reference them.