Unit 04 · lesson

Unit Mission: Command Turtlesim With Evidence

Start Turtlesim without teleop.

Your mission is to understand and command its velocity topic using only ROS 2 inspection tools and the CLI.

Required sequence

  1. Prove the node is alive.
  2. Find the command topic and type.
  3. Inspect the topic endpoints.
  4. Inspect the message interface.
  5. Publish a valid movement command.
  6. Echo or otherwise inspect evidence while the command path is active.

Useful commands include:

ros2 node list
ros2 node info /turtlesim
ros2 topic list -t
ros2 topic info /turtle1/cmd_vel --verbose
ros2 interface show geometry_msgs/msg/Twist
ros2 topic pub --once /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0}, angular: {z: 1.0}}"

Artifact

Build this trace with your observed evidence:

CLI publisher
  -- [message type] -->
/topic
  -- delivered to -->
subscriber node
  -- visible effect -->
Turtlesim

Defense

Answer without guessing:

  • How did you find the topic?
  • How did you know its type?
  • How did you know the message field names?
  • How did you know Turtlesim subscribed?
  • What would you inspect if the message published successfully but nothing moved?

This is the pattern you will reuse throughout ROS 2: inspect the graph, inspect the interface, then act.