Rescuer: Try It Out

This is the third challenge within the Robotics with GoPiGo and Python Curriculum.

Your task is to design a robot program that can navigate through the maze-like jungle without trampling over any plants or getting stuck in any dead ends.

Learn how to use the Distance Sensor and practice using the left-hand rule of maze-solving.

3. Troubleshoot

If your robot doesn’t make it to the exit, where does it get stuck or take a turn that you hadn’t expected? Can you work out why it made that decision?

To help you work out why your rescuer robot is getting lost, you can instruct your robot to report all the decisions that it is making in your notebook immediately prior to every instruction to turn left, turn right or drive forward.

To do this, you can use the log() template function that we have written for you to display the left-facing and front-facing data used by the robot to make its decisions and a simple print statement to report the action that is about to be taken.

The following is an example of how you can follow the robot's decision making.