Introduction

Site: GoLabs
Course: Robotic Challenges with Python and GoPiGo
Book: Introduction
Printed by: Guest user
Date: Wednesday, 24 April 2024, 5:33 AM

Description

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

Your task is to design a robot program to deliver a selection of mail to the residents of GoPiGo Drive, a small cul-de-sac containing 3 houses.

Learn how to how to use and calibrate the color sensor.

1. Autonomous Courier

The residents who live on GoPiGo Drive in Colorado Springs are waiting for their mail to be delivered.

Colorado Springs got its name* because of the unusual addressing system that they’ve adopted. Instead of numbers, houses on every street are identified by colors (hence Colorado). This enables your courier service to use a fleet of color-aware robots to deliver packages. As one of these robot handlers, you are tasked with delivering a selection of cards to the residents of GoPiGo Drive, a small cul-de-sac containing 3 houses.


*This isn't actually true, but makes for a very fun story! Colorado Springs actually was named for the natural springs that were discovered in the late 1800's. And the real city uses a number-based system like yours.



2. Considerations

    • How can a robot identify color?
    • How can your robot tell which house to deliver the mail to?
    • How can your robot successfully navigate the delivery route?
    • Building on existing code solutions to create new functionality

3. Materials


    1. GoPiGo3, with batteries
    2. A wifi-enabled laptop or computer
    3. A black line follower sensor
    4. A light and color sensor with 2x sensor mounts
    5. Lego and craft materials for color sensor mounting, the postman & card holder
    6. For the experiments & calibration:
      1. a printed straight line template sheet from the line_follower_template file.
      2. a printed color calibration sheet
      3. white paper and colored pencils or markers


    1. For the challenge:
      1. a selection of printed line follower template sheets:
      2. 1x red, 1x green and 1x blue line follower junction template sheets
      3. 3x yellow and 3x fuchsia driveway template sheets
      4. 3x postcard sized white cards and colored markers for the mail
      5. scissors, tape for sticking sheets together






4. Vocabulary

Callback Method/Function: the code for an action being triggered by an event.

Class Attributes : a fancy name for variables and functions that are contained within a class definition.

Class Methods : a fancy name for functions that are contained within a class definition.

Container Class : a collection of data or objects stored in an organized way.

Defensive Programming: an approach to coding that puts in place safeguards to prevent future bugs.

Event-Driven Programming: an approach to programming where an event such as a button being clicked triggers a specific action. All graphical user interfaces (or “GUIs” for short), such as your windows desktop or mobile phone, are controlled this way.

Customer-Facing: a piece of technology that humans interact with directly. A customer-facing product has to be designed in such a way as to be acceptable by the general population. Friendly robots, for example, or easy to use apps, are all customer-facing products.

5. Learn

These exercises will teach you what you need to know in order to succeed in the main project.

Courier Learn 1: The Notebook Explained

Courier Learn 2: Build and Calibrate

Courier Learn 3: Create Your First Class


6. Main Project

This is the main project of this mission. If you choose to do the project, you will spend the majority of your time here.

This lesson will guide you through it: Autonomous Mail Delivery Courier.

This lesson will guide you through testing your solution: Try It Out


7. Extensions

If you want to go a bit further, you can take a look at our project extensions for additional challenges.