Try It Out

Site: GoLabs
Course: Robotic Challenges with Python and GoPiGo
Book: Try It Out
Printed by: Guest user
Date: Saturday, 7 December 2024, 4:45 AM

Description

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

Put your program to the test as part of the Main Project of Orienteering.

1. Try It Out

Now it’s time to try out your code.

RUN

      1. Place your robot orienteer at the first waypoint, facing the 2nd waypoint.
      2. Go to the Jupyter menu, click on Run and select Run All Cells to run your code.

OBSERVE

Watch your robot orienteer attempt to navigate its way to the destination.

Does it make it to the end of the course via all the waypoints without driving into any of the landmarks? Do you see any areas for improvement?


2. Troubleshoot

Does your robot orienteer have problems navigating to the destination?

Let’s have a closer look at this to figure out why this might be.

      1. Remove the landmarks leaving just the waypoints in place, place your robot orienteer back at the first waypoint and re-run your navigation code. 

Does it now visit all the waypoints?

YES:

The locations of your landmarks may have got in the way of the robot orienteer’s journeys between the waypoints. 

Replace your landmarks, adjusting their positions to allow enough space for the straight line journeys between all the waypoints. 

Re-run the navigation task. Does it now visit all the waypoints?

NO:

At which waypoint does it go wrong?

Check and amend your Distance and Angle of Rotation measurements and the navigation code that directs your robot orienteer to that waypoint.

Re-run the navigation task. Does it now visit all the waypoints?

ITERATE

Now that your robot orienteer can navigate your map, re-run the navigation task a number of times, noting where it finally stops each time. 

Does it always end up at exactly the same spot? If not, why do you think this might be?


3. Congratulations!

Woohoo! You've solved the orienteering challenge!

If you want to investigate more, you can attempt one or both of the project extensions.