Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

ROS (Robot Operating System) Overview cheat sheet - grade 11-12

Click image to open full size

ROS, the Robot Operating System, is a software framework that helps robots sense, decide, and act using many smaller programs working together. This cheat sheet covers the core communication tools students need to understand before building or debugging a robot project. It explains how nodes exchange data, how packages organize code, and how launch files start a system.

Students can use it as a quick reference while programming simulations or real robots.

Key Facts

  • A ROS node is one running program, and a robot system usually contains many nodes working at the same time.
  • A topic carries continuous data streams using a publish and subscribe model, such as /camera/image or /cmd_vel.
  • A service uses a request and response model, so it is best for short tasks that need one clear answer.
  • An action is used for longer goals that need feedback, cancellation, or progress updates, such as moving to a target pose.
  • A message type defines the structure of data on a topic, such as geometry_msgs/Twist for linear and angular velocity commands.
  • A ROS package groups related source code, message definitions, launch files, and configuration files into one reusable unit.
  • In ROS 2, the command ros2 topic list shows active topics, and ros2 topic echo /topic_name prints live messages from that topic.
  • Update rate can be estimated with frequency = messages received / time, so 120 messages in 10 seconds equals 12 Hz.

Vocabulary

Node
A node is an individual ROS program that performs one part of a robot system, such as reading a sensor or controlling a motor.
Topic
A topic is a named communication channel that sends ongoing data from publishers to subscribers.
Service
A service is a communication method where one node sends a request and another node returns a response.
Action
An action is a communication method for long-running tasks that can provide feedback and be canceled.
Message
A message is a defined data format used to send information through a topic, service, or action.
Launch File
A launch file starts and configures multiple ROS nodes at once so a robot system can run consistently.

Common Mistakes to Avoid

  • Using a service for continuous sensor data is wrong because services are designed for request and response tasks, not steady data streams.
  • Forgetting to match message types is wrong because a publisher and subscriber on the same topic must use the same message structure.
  • Assuming a topic name is correct without checking it is wrong because even a small spelling or namespace difference creates a separate topic.
  • Starting nodes one by one without a launch file can cause errors because required parameters, remappings, or startup order may be missed.
  • Ignoring units in message fields is wrong because robots may interpret values differently, such as meters versus centimeters or radians versus degrees.

Practice Questions

  1. 1 A lidar node publishes 300 scan messages in 15 seconds. What is the topic frequency in Hz?
  2. 2 A robot velocity command uses geometry_msgs/Twist with linear.x = 0.40 m/s. How far should the robot travel in 5 seconds if it maintains that speed?
  3. 3 Choose the best ROS communication method for each task: streaming camera images, resetting a sensor once, and driving to a goal while reporting progress.
  4. 4 Explain why a robot system is usually designed as many small ROS nodes instead of one large program.