Rescuer: Try It Out
Site: | GoLabs |
Course: | Robotic Challenges with Python and GoPiGo |
Book: | Rescuer: Try It Out |
Printed by: | Guest user |
Date: | Wednesday, 4 December 2024, 1:33 AM |
Description
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.
1. Predict
Draw a representation of your maze on a piece of paper.
Knowing how you programmed your robot, predict the route that you think your robot will take through the maze.
Draw this route out on your maze. Let’s now see if your prediction is correct.
Once you're done, you can upload your prediction.
2. Test
- Place your rescuer robot at the entrance to your maze facing into it, with a wall to its left.
- Run your notebook by selecting Cell >> Run All Cells from the top menu.
Does the robot manage to navigate its way to the exit?
Does it follow the route that you predicted?
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.
4. Making Changes
Identify the root causes, make necessary adjustments to your code and re-run it.
Repeat this process until your rescuer robot successfully navigates the maze.
To help you with this, here are some possible reasons why your rescuer robot may be getting stuck/lost:
5. Extension
You have successfully completed the Rescuer mission. All scientists are now at the base camp, safe and healthy, thanks to your robot. They could not have done it without you!
Or if there is any time left, you can try your hands at the extension challenge.