Skip to content

Concepts

LOQ-Ubuntu edited this page Jan 24, 2026 · 1 revision

Concepts

Core ROS2 building blocks (short and practical)

  • Nodes: independent processes that perform computation. Example: a sensor node reads hardware and publishes messages.
  • Topics: asynchronous pub/sub channels for streaming data (e.g. sensor readings). Use ros2 topic list and ros2 topic echo /topic to inspect.
  • Services: synchronous request/response APIs for configuration or queries.
  • Actions: long-running requests with feedback (useful for goals that take time, e.g., move-to-position).
  • Parameters: runtime configuration values attached to nodes.
  • Messages: typed data schema used on topics and services.
  • Packages & workspaces: how code is organized and built (ament, colcon for building).

Quick commands (example)

# list topics
ros2 topic list

# echo a topic
ros2 topic echo /chatter

# run example Python demo nodes
ros2 run demo_nodes_py talker
ros2 run demo_nodes_py listener

# create a simple Python package
ros2 pkg create --build-type ament_python my_pkg

# build your workspace
colcon build
source install/setup.bash

Short WSL notes

  • For Windows users: run ROS2 inside WSL2 (Ubuntu) and use WSLg for GUI apps.
  • Common pitfall: opening a Windows terminal and typing ROS commands without starting WSL. If you're on Windows, remember to open a WSL shell (e.g., Ubuntu) before running ros2.

Next: setup links and short Linux/WSL command explanations: Setup.

Clone this wiki locally