Lesson 1 of 12

Meet the Nodes

Every robot has many jobs: seeing, thinking, moving and talking. Today you'll find out how ROS 2 shares these jobs among small helpers called nodes.

  1. 1Read the story
  2. 2Build the team
  3. 3Robot doctor
  4. 4Earn your badge

Hi! I'm Chiku, a delivery robot. Help me get my team ready, and we'll deliver a lunchbox together!

A robot is like a cricket team

Think about a cricket team. The bowler bowls. The batter hits the ball. The wicketkeeper catches. The fielders run and stop the ball.

Each player has one main job. Nobody asks the bowler to bowl, bat and keep wickets all at the same time! The team wins because every player does their own job, and they all work together.

Robots that use ROS 2 work in the same way.

Team sheet

  • Batterhits the ball
  • Bowlerbowls the ball
  • Wicketkeepercatches the ball
  • Fielderstops the ball

So, what is ROS 2?

ROS 2 stands for Robot Operating System 2. It has "Operating System" in its name, but it isn't like Windows or Android.

ROS 2 is a free toolbox of programs. It helps all the parts of a robot work together and talk to each other. Robots in factories, farms, warehouses, hospitals and science labs use it.

A toolbox, not a robot

Engineers use ROS 2 to build robots, the way you use building blocks to build a house.

Free for everyone

Anyone can download and use it, including schools and students.

Made by many people

Engineers from around the world build it together and share it.

What is a node?

A node is a small program that does one job for the robot.

A cricket team has players. A ROS 2 robot has nodes. Chiku the delivery robot has four of them:

Camera node

Takes pictures so Chiku can see what is in front.

Brain node

Looks at the pictures and decides where to go. Engineers often call this a planner.

Motor node

Spins the wheels to move Chiku forward, back, left and right.

Speaker node

Makes Chiku beep and talk to people.

Why not make one giant program?

Easy to fix

If one node has a problem, engineers fix only that node. The others don't need to change.

Easy to reuse

A good camera node can be used again in many different robots.

Great for teamwork

Different people can build different nodes at the same time.

Mission: Build Chiku's team

Each yellow card is a job. Tap a card, then tap the node that should do that job. On a computer, you can also drag a card into a node.

Pick a yellow job card to begin.

Delivery time!

When every job has the right node, start the delivery and watch the team carry a lunchbox to Chiku's friend.

  1. Messages from Chiku's nodes will show up here during the delivery.

Mission: Robot doctor

Something is wrong with Chiku! Read what is happening, then choose the node that needs fixing. Get it right on your first try to win a star.

Problem 1 of 5

Earn your badge

Node Explorer

Finish the Robot doctor mission to unlock this badge.

For curious minds: what engineers type

On a computer with ROS 2 installed, engineers can ask, "Which nodes are running right now?" They type this command in a window called the terminal:

$ ros2 node list
/camera
/brain
/motors
/speaker

If Chiku were a real ROS 2 robot, this is what they would see: one line for each node. The slash ( / ) at the start is simply how ROS 2 writes node names.

Remember

  • ROS 2 is a free toolbox that helps the parts of a robot work together.
  • A node is a small program that does one job.
  • Many nodes working together make a robot smart.
Teacher's corner: goals and a classroom activity

Learning goals

By the end of this lesson, students can:

  • say in one sentence what ROS 2 is,
  • explain that a node is a small program that does one job,
  • give one reason why a robot is split into many nodes.

Classroom activity: Be the nodes (15 minutes, no computer needed)

You need four paper chits labelled Camera, Brain, Motors and Speaker, and a tiffin box or book to deliver.

  1. Choose four students and give each one a chit. Choose a "friend" in one corner of the room. The tiffin box starts in the opposite corner.
  2. Explain the rules. Camera may only describe what is ahead ("A bench is two steps in front"). Brain stands with their back to the path and gives instructions using only what Camera says ("Turn left, walk two steps"). Motors carries the tiffin and moves only when Brain gives an instruction. Speaker announces the delivery ("Beep beep! Delivered!").
  3. Run the delivery. Keep the path clear and ask Motors to walk slowly.
  4. Run it again, but this time Camera stays silent. Watch what happens.
  5. Discuss the questions below.

Discussion questions

  • What happened when Camera stayed silent? Which game problem was this like?
  • A cleaning robot needs a node that Chiku doesn't have. What could it be?
  • Why is it useful that each node has only one job?

Looking ahead: Brain needed Camera's information to make decisions. In Lesson 2, students learn how real ROS 2 nodes send information to each other using topics.

Next lesson: Topics

How nodes send messages to each other, like a radio channel for robots.