Key Terminologies

  • A node is a process that performs computation
  • It's a single executable program
  • Nodes communicate via topics, services, or actions
  • They can be written in almost any supported language
  • Most common language is C++ and Python

Nodes can communicate with each other via Data Distribution Service (DDS). There are also Pre-built ROS 2 Nodes, which we will use for tracking the TF Tree, etc.

1) Messages

  • It is the communication language of strings, ints, floats, arrays between nodes

2) Interfaces

  • It is the blueprint or the format of the message
  • It defines the programming Application Programming Interface (API) for data retrieval/sent via topics or services
  • ROS already provides pre-defined interfaces, but we can also create custom ones

3) Topics

  • These are named communication channels between nodes
  • It uses a Publish-Subscribe Model
  • A node publishes to this particular topic and all the other subscribing nodes recieves from the topic

4) Services

  • These are also named communication channels between nodes
  • It uses a Request-Response Model
  • The client node sends a request to a server node, which then executes a task and then returns a response

5) Callbacks

  • It is a function that ROS will execute when an event occur
  • For example, message received or timer fired
  • This ensures that the ROS architecture is modular

6) Timers

  • This is a built-in mechanism that integrates with ROS executor that runs a specific callback function at a defined interval
  • So example, run this callback function every 10ms

7) Parameters

  • These are named configuration settings stored within a node
  • This allows us to change the values of these parameters without altering the code and can be set via terminal, YAML or launch files

8) Logging

  • This is structured node status output (DEBUG, INFO, WARN, ERROR, FATAL) that replaces raw printf() calls
  • Logs can route to terminal, files, or /rosout for centralised filtering and monitoring

9) ROS 2 Packages

  • This is the basic unit of file management or organisation in ROS
  • it contains code (packages.xml, CMakeLists.txt, setup.py source files) needed to run something
  • colcon build uses packages.xml (which is similar to a requirements.txt) to build the package

10) Coordinate Frames (tf2)

  • Called tf2 that map the robot to the environment
  • It is like the basis of ROS mapping and navigation