Unit 03 · lesson
Interrogate a Node With `ros2 node info`
Interrogate a Node With ros2 node info
Listing a node tells you it exists.
ros2 node info tells you how it connects.
With Turtlesim running:
ros2 node info /turtlesim
The Jazzy beginner documentation shows categories such as:
- Subscribers
- Publishers
- Service Servers
- Service Clients
- Action Servers
- Action Clients
Do not memorize the list
Read it as a responsibility map.
For example, if /turtlesim subscribes to /turtle1/cmd_vel, that is evidence that some other node can send velocity commands to it through that topic.
If /turtlesim provides /spawn, that is evidence it can respond to a service request to create another turtle.
Compare two nodes
Run:
ros2 node info /turtlesim
ros2 node info /teleop_turtle
Ask:
- Which node publishes movement commands?
- Which node receives them?
- Which node provides simulation services?
- Which node has an action client?
- Which node has an action server?
You will learn each communication mechanism later. Right now, use the categories to see that nodes expose different interfaces.
Build a node card
Create:
Node:
Started by command:
Publishes:
Subscribes:
Provides services:
Uses services:
Action role:
Fill only what you can support from ros2 node info.
Checkpoint
Why is ros2 node info more useful than restarting a node when your question is simply "what is this node connected to?"