Ops Manager: Project

5. Small Hints

Here are a couple of hints to get you started.

          • Substitute picker.position() with picker.position_val(). Instead of simply getting left or right, you now get a number telling you how far left, or how far right the robot is from the line.
          • Investigate using picker.steer(0,100) or picker.steer(100,0) instead of picker.right() and picker.left().
          • Can you change the 0in the steer() method to another value to get smoother turns, depending on how far the robot has to correct course?
          • Look at this table that spells out the different situations. What you need to do is come up with appropriate values for S in order to optimize the robot's course.


How you calculate that S value is up to you.

When S is equal to 0, you get the bang! bang! controller behavior that you saw in the Learn section.

When S varies according to the distance away from the line, you are now dealing with what's called a proportional controller.