Unit 05 · lesson
Discover Services and Their Types
Start Turtlesim in a sourced terminal.
Then list services:
ros2 service list
You will see Turtlesim-specific services such as /clear, /reset, /spawn, and turtle-specific operations, along with parameter infrastructure services.
Show types
The official tutorial uses:
ros2 service list -t
You may see entries such as:
/clear [std_srvs/srv/Empty]
/spawn [turtlesim/srv/Spawn]
Ask about one service
ros2 service type /spawn
Then inspect endpoint counts:
ros2 service info /spawn
Find services by type
The source tutorial also demonstrates:
ros2 service find std_srvs/srv/Empty
This reverses the question. Instead of "what type is this service?" you ask "which services use this type?"
Checkpoint
Create:
| Service | Type | Server count | What the name suggests |
|---|---|---|---|
/clear | |||
/spawn |
Do not call them yet. First know what is available.