Lesson Modules
Teaching Tips:
Setup: Turn on NAO and ensure Choregraphe is connected to the robot. Open the Video Monitor under “View” → “Video Monitor” to show students what NAO sees through its camera. Project this feed so the class can watch.
Hook Question: Ask: “Can a robot learn? How could it learn something new that it wasn’t programmed to do?” Accept all responses—this helps you gauge prior understanding and curiosity.
Demo: Hold up a simple object (e.g., a red ball) and show NAO’s live video feed. Ask: “How could we teach NAO to recognize this object?” Some students might say “program it to look for red” (rule-based idea), others “show it lots of examples” (learning-based). This sets up the concept of supervised learning.
Safety: Place NAO securely and avoid obstructing its view. If it’s sitting, ensure it won’t tip when turning its head. If tracking movement later, clear the area around NAO.
Teacher Background: This activity introduces supervised learning, where a model learns from labeled examples. You’ll first show the object (training data) and label it, then test if NAO can recognize it on its own.
Today you’ll explore how robots can learn—just like people! Watch your teacher hold up an object in front of NAO. Notice what happens on the screen when NAO “looks” at it through its camera feed. Does NAO recognize what it’s seeing? How could it possibly learn that?
Think about it this way: When you were little, you learned what a “dog” was by seeing dogs and being told, “That’s a dog.” Can a robot learn in the same way?
We’ll find out by training NAO to recognize a new object—like a ball or a picture—using examples, just like we learned from examples ourselves.
Teaching Tips:
Discussion: Use relatable analogies for each type of learning:
- Supervised = Learning with a teacher (like graded homework).
- Unsupervised = Discovering groups by yourself (like sorting LEGO pieces by color).
- Reinforcement = Learning through feedback (like training a dog).
Visual Support: Use diagrams or draw three columns labeled “Supervised,” “Unsupervised,” and “Reinforcement.” Add examples to each as students contribute.
Clarify AI vs ML: Explain that machine learning is one tool used in AI. AI is the broader goal—making machines act intelligently—while ML is how we often achieve that by letting machines learn from data.
Differentiation: For advanced students, briefly introduce the concept of “models” and “training data.” For beginners, stick to simple analogies—“learning from examples.”
Misconception Alert: Some students think ML means a robot can learn anything instantly. Emphasize that robots only learn what they are shown, and they can make mistakes if the examples are limited or biased.
Machine Learning (ML) is a way for computers and robots to learn from data, not just follow rules. Instead of telling NAO exactly what to do, we show it examples—and it figures out patterns from those examples.
There are three main kinds of machine learning:
- Supervised Learning: The robot learns from labeled examples. For example, we show NAO many pictures of balls and tell it, “This is a ball.” Later, NAO can recognize new balls it hasn’t seen before.
- Unsupervised Learning: The robot finds patterns on its own without labels. It might group similar images together (like all round objects vs. square ones) even if it doesn’t know their names.
- Reinforcement Learning: The robot learns by trial and error—like training a pet with rewards. It gets “points” for good actions and “penalties” for bad ones, learning over time what works best.
Machine learning is part of AI, but not all AI uses learning. What makes ML special is that the robot can improve from experience!
Teaching Tips:
Preparation: Ensure Choregraphe is version 2.8.x and matches NAO’s firmware. Test the Video Monitor feed before class. Choose a brightly colored, distinct object.
Support for Beginners: Demonstrate the full process once, then guide students step-by-step. If working in groups, assign roles: Robot Operator, Object Holder, Recorder, Coder (if applicable).
Troubleshooting:
- If NAO doesn’t detect the object, ensure the Vision Recognition box is active and the vision database is sent.
- Check lighting—avoid glare or dim conditions.
- Make sure the object fills enough of the camera view and is not blurry.
- If NAO mislabels or triggers randomly, retrain or clear the database and repeat.
Extension Options:
- Train NAO on multiple objects and make it respond differently (e.g., “I see a cube!”).
- Use Python code to handle recognition events for advanced learners.
- Demonstrate the Deep Learning app (preinstalled on some NAOs) to show multi-object recognition.
- Discuss model bias—what happens if NAO only learns one view of the object?
Safety: Warn students not to touch NAO’s head or joints during the demo. Keep fingers clear while it moves or tracks.
Now it’s your turn to help NAO learn! You’ll train NAO to recognize a simple object, like a ball, using its camera and Choregraphe software.
- Connect NAO: Make sure your computer is connected to the same Wi-Fi network as NAO. Open Choregraphe and connect to the robot (you’ll see a green indicator).
- Open the Video Monitor: In Choregraphe, go to “View → Video Monitor.” This shows what NAO sees through its camera.
- Capture the object: Hold the object about 30–50 cm in front of NAO’s camera. Click “Learn.” Hold it steady during the 4-second countdown.
- Outline the object: When the image freezes, draw around the object using your mouse. Label it with a name, like “ball.”
- Send to NAO: Click “Send current vision recognition database to NAO.” This saves what NAO learned.
- Create a behavior: Add a Vision Recognition box and connect it to a Say box that says “I see a ball!”
- Run it! Hold the ball in front of NAO. When it recognizes it, NAO should announce what it sees.
Congratulations—you just trained a robot using supervised learning!
Teaching Tips:
Expected Answers:
- Students should identify this as supervised learning—we gave NAO labeled examples.
- Recognition errors often come from poor lighting or limited training data—just like biased models in real AI.
- Examples of ML in real life: facial recognition, spam filters, self-driving cars, Netflix recommendations, AI art tools.
Extension Discussion: Ask deeper reflection questions:
- “If NAO learned from only one picture, how could we make it smarter?” (More training data!)
- “Can AI make mistakes? What should humans do when it does?”
- “How might machine learning affect future jobs or technology?”
Assessment: Use the student reflections as formative assessment. Optionally, distribute the short multiple-choice quiz from the PDF as a summative check.
Wrap-Up Message: Congratulate students on completing their first robot training session! Emphasize that they didn’t just program a behavior—they helped a robot learn from data, just like real AI engineers do.
Let’s reflect on what you learned today about how robots learn from data.
- What is one new thing you learned about machine learning? Where have you seen machine learning used in real life?
- What type of machine learning did we use when training NAO on the object?
- Why do you think NAO sometimes misrecognizes the object?
- Where have you seen machine learning used in real life?
Be ready to share your answers and discuss what “learning” really means for a robot!