Unit 03 · lesson
Start Turtlesim and Prove the Package Exists
Turtlesim is a lightweight simulator designed to make beginner ROS 2 concepts visible.
Before running it, inspect the package.
A package executable becomes a node in the running ROS graph
Package, executable, process, and node are related but not interchangeable concepts.
- PACKAGEgroups installable ROS 2 codeprovides
- EXECUTABLEros2 run selects one installed entry pointstarts
- PROCESSthe operating system runs the programcreates
- NODEthe program participates in ROS 2 communicationappears in
- GRAPHnodes and communication become inspectable
Source your environment
source /opt/ros/jazzy/setup.bash
Ask ROS 2 what Turtlesim can run
The official tutorial uses:
ros2 pkg executables turtlesim
You should see executables including:
turtlesim draw_square
turtlesim mimic
turtlesim turtle_teleop_key
turtlesim turtlesim_node
The left column is the package. The right column names executables ROS 2 can run from that package.
Failure mode: the package is missing
If ros2 pkg executables turtlesim returns no Turtlesim executables, do not diagnose the simulator window or teleop yet. The evidence says the package is not available in the sourced environment. First verify that the Jazzy environment is sourced and that the package is installed.
The official Ubuntu path installs it with:
sudo apt update
sudo apt install ros-jazzy-turtlesim
A Jazzy Desktop installation commonly already provides it, so inspect first.
Start the simulator
ros2 run turtlesim turtlesim_node
A simulator window should open and terminal log messages should identify the Turtlesim node.
Start teleoperation
Open a second sourced terminal:
ros2 run turtlesim turtle_teleop_key
Keep that terminal focused and use the arrow keys.
What just happened?
You did not start "ROS" twice.
You asked ROS 2 to run two executables from the same package. Those executables created nodes that participate in the running graph.
Checkpoint
Complete:
Package:
Executable 1:
Executable 2:
Visible effect:
Terminal evidence: