ROS 2 Lyrical Luth · Lesson 04 of 8

Services, parameters and actions

Use each communication pattern for the kind of work it fits.

Estimated time · 45–75 min

Guided lesson

Work through these steps

  1. 1.

    Source the ROS 2 Lyrical environment in a fresh terminal.

  2. 2.

    Run the services, parameters and actions inspection commands before creating code.

  3. 3.

    Build only the affected package, then source the workspace overlay.

  4. 4.

    Inspect the ROS graph and verify the result from a second terminal.

Example

Try it yourself

ros2 interface show example_interfaces/srv/AddTwoInts
ros2 param list
ros2 action list -t

Practical exercise

Apply the lesson

Create a minimal ROS 2 workspace demonstration for services, parameters and actions, then prove it works with the ROS 2 CLI.

Before you continue

  • ROS_DISTRO reports lyrical
  • The workspace builds without errors
  • The expected node, topic, service, or action is visible in the graph