[RL59] Grade 5 - Session 9

Session 9: Team Relay – Collaborative Robot Racing

Session Architect: Muhammad Bilal
Duration: 50-60 minutes


Equipment Required:

  • M3D Robotics kit (2 robots per team) or a team of two students/groups
  • Laptops with Scratch pre-installed
  • Black tape to create line paths for the line-following bots
  • Small objects for hand-off between robots (e.g., small balls, cubes)
  • Obstacle course elements (e.g., small boxes, cones)

Learning Objectives:

  • Reinforce the concept of sensor integration, particularly line-following and distance sensors.
  • Understand how to program robots to collaborate and complete a task together.
  • Practice using conditionals in coding to control robot actions based on sensor input.
  • Foster teamwork by requiring students to work in teams to solve a problem.

Resources:

Scratch Code File:
Grade 5 Session 9 .sb3 (1.5 MB)


1. Introduction to Collaborative Robots (5 minutes)

Activity:
Introduce the concept of collaboration between robots by explaining how real-life robots work together in industries (e.g., in manufacturing lines or delivery services). Relate this to the task for the day: a relay race, where one robot passes an object to another to complete the race.

Instructions:

  • You can start by saying:

“Today, we’re going to see how two robots can work together to complete a challenge. Just like in a relay race, one robot will complete an obstacle course, and then pass the baton—or in our case, a small object—to the second robot, which will finish the race!”

  • Explain that the first robot will use both the line-following sensor and distance sensor to navigate through obstacles.
  • The second robot will wait until the object is passed to it and then finish the race using the line follower.

Teacher’s Role:

  • Encourage students to think of examples where robots in the real world collaborate (e.g., automated cars coordinating to avoid accidents, factory robots working together on assembly lines).
  • Guide the discussion toward teamwork and how two robots need to communicate or sense each other to complete the task together.

2. Programming the First Robot – Obstacle Navigation (15 minutes)

Activity:
Students will work in teams to code the first robot to navigate an premade obstacle course using the distance sensor. The goal is for the robot to detect and avoid obstacles, staying on the path while moving toward the hand-off point in the most efficient way.

Instructions:

  • Start by reviewing how they used the distance sensor to avoid obstacles.

  • Ask students to combines movement blocks along with distance sensor to make the robot move towards the hand-off point while avoiding obstacles.

  • Code Example:

If the distance sensor detects an obstacle, the robot stops and adjusts its direction to avoid the obstacle.

Teacher’s Role:

  • Guide students in adjusting the code if the robot struggles with avoiding obstacles.
  • Remind students that the robot’s goal is to reach the hand-off point without hitting any obstacles.

3. Programming the Second Robot – Line Following (10 minutes)

Activity:
The second robot will wait at the hand-off point until the first robot reaches it. Once the object is passed, the second robot will follow the line to finish the course.

Instructions:

  • Have students code the second robot to wait at the hand-off point. Once the object is handed over, it should start moving and follow the line to finish the race.

  • Code Example:

    • If the robot receives the object (using a sensor or a manual signal from the first robot), it activates the line-following code.
    • The second robot will follow the line until it reaches the finish line.

Sample Code for First Bot:

Sample Code for Second Bot:

Teacher’s Role:

  • Help students ensure that the second robot starts moving at the correct time.
  • Encourage students to test both robots’ coordination to ensure a smooth hand-off and transition between tasks.

4. Testing and Relay Race (15 minutes)

Activity:
Teams will test their robots in the relay-style race, with the first robot navigating the obstacle course and handing off the object to the second robot, which will finish the course.

Instructions:

  • Set up the obstacle course and line path.
  • Each team will run their relay, with the first robot navigating the obstacles and passing the object to the second robot, which will follow the line to the finish

Race Guidelines:

  • You may keep a point system if the robot hits any obstacles before reaching the hand-off point to keep the race competitive.

  • If the robot is facing issues following the line, the students may guide it slightly but that should result in deduction of points to keep the race fair.

  • Encourage students to take note of:

    • How well their robots navigate the course.
    • The accuracy of the hand-off between the two robots.
    • If the robots complete their tasks without errors.

Teacher’s Role:

  • Provide guidance and troubleshoot any issues with the hand-off or the obstacle navigation.
  • Encourage students to collaborate and refine their code as they test their robots in the relay race.

5. Reflection and Discussion (5-10 minutes)

Activity:
Gather students for a reflection on the activity. Ask them to share their experiences working in teams, coding the robots, and overcoming challenges.

Reflection Questions:

  • “What was the hardest part of getting the two robots to work together?”
  • “How did using sensors help your robots navigate the course?”
  • “If you could improve your robots’ collaboration, what would you change?”

Teacher’s Role:

  • Lead the discussion, encouraging students to think about the importance of collaboration—both between robots and between team members.
  • Highlight the successful integration of sensors and how the students used conditionals and logic to achieve their goals.

Learning Outcome:

By the end of the session, students will have successfully programmed two robots to work together to complete a relay-style race. They will have reinforced their understanding of sensor integration, conditional coding, and the importance of teamwork in robotics.