ROS 2 for Beginners: Install Jazzy and Start Turtlesim Without a Robot

You can complete a useful first ROS 2 exercise without robot hardware: run turtlesim, drive it from a separate keyboard node, watch its pose, then call a service to clear its drawing. Keep the simulator, keyboard control and inspection commands in separate terminals so you can see which part of the system you are using.

Choose a supported environment before installing

ROS 2 is a software framework for programs that exchange robot data and commands. A node is a running ROS program; a topic carries a stream of typed messages; a service handles a particular request and response. Turtlesim is a small two-dimensional teaching simulator. It lets you see these relationships without claiming to simulate a real robot’s contacts or dynamics.

This walkthrough uses Ubuntu 24.04 with Bash and ROS 2 Jazzy. The official release list gives Jazzy support through May 2029 and now also lists Lyrical, supported through May 2031. Jazzy is the chosen supported version for this exercise, rather than a claim that it is the newest release. On another operating system or distribution, use its matching installation instructions before continuing; do not substitute an Ubuntu version in an apt command.

For Ubuntu 24.04, follow the official Jazzy binary-install instructions to set the locale and configure the ROS apt repository. After completing those prerequisites, install the desktop package and turtlesim, then load the environment:

sudo apt update
sudo apt install ros-jazzy-desktop ros-jazzy-turtlesim
source /opt/ros/jazzy/setup.bash
printenv ROS_DISTRO

Check that the last command identifies jazzy. The desktop package includes GUI tools and tutorial examples; a minimal ROS-Base installation is a different starting point. You need a working desktop/display session to see the turtlesim window. If apt cannot locate the packages, return to the repository and platform prerequisites rather than continuing with the node commands.

Use the same environment in every terminal for this exercise. Opening three terminals with different ROS distributions or domain settings is a different setup from the one described here. Start with the defaults on one computer, then inspect your own process output if discovery does not work.

Give each terminal a job

Begin with Jazzy installed and its environment loaded in each new terminal. Use the official environment setup instructions for your operating system, then check the turtlesim package prerequisites. Opening another terminal does not by itself guarantee that the ROS environment has been loaded there.

Check that the package exposes the two executables you need:

ros2 pkg executables turtlesim

Look for turtlesim_node and turtle_teleop_key. If the package or ros2 command is unavailable, resolve installation or environment setup before continuing. Do not diagnose a missing package as a simulator communication problem.

Window Its job Leave it doing this
Terminal A Run the simulator node Keep the process running
Terminal B Turn keyboard input into control messages Give this terminal keyboard focus when driving
Terminal C Inspect nodes, topics and services Run one inspection command at a time
Turtlesim window Display the simulated turtle and drawing Watch the effect of your commands

This arrangement gives you a simple recovery point: you can stop an inspection in C without accidentally shutting down the simulator in A.

Start the simulator, then the controller

In Terminal A:

ros2 run turtlesim turtlesim_node

In Terminal B, after loading the same ROS environment:

ros2 run turtlesim turtle_teleop_key

Select Terminal B and use its arrow keys while watching the turtlesim window. A keypress produces a short movement; keeping the picture window active instead of the keyboard terminal is a common reason for seeing no response.

In Terminal C, check the running nodes:

ros2 node list

The Jazzy node tutorial uses /turtlesim and /teleop_turtle for this default setup. Treat those names as a way to orient yourself in this example. A different launch file or remapping can produce different names, so inspect your session rather than copying an expected transcript into your notes.

Watch the command and the reported pose separately

The Jazzy topics tutorial traces how nodes publish and subscribe. In Terminal C, inspect the command topic:

ros2 topic echo /turtle1/cmd_vel

Return keyboard focus to Terminal B and press an arrow key. Watch C for the published command. A quiet command topic while nobody is pressing a key is a different condition from a broken simulator.

Stop that echo with Ctrl+C in C, then inspect the turtle’s pose:

ros2 topic echo /turtle1/pose

Drive again from B and observe which pose values change. You are now watching two sides of the exercise: the requested motion and the simulator’s reported state. Neither terminal needs to contain the other node’s implementation for the exchange to be visible.

Keep a short record of your own observations:

Action Evidence to record
Start A only Simulator appears and its node is listed
Start B and press a key Turtle moves; a control message can be observed
Inspect pose while moving Reported pose changes with the motion
Stop only the echo in C A and B remain available

These entries are completion criteria for your session, not measured results supplied by this article.

Call a service and look for its effect

A service is useful for a specific request and response. The Jazzy services tutorial shows how to inspect a service type before calling it.

After drawing a line, stop the pose echo in C and run:

ros2 service type /clear
ros2 service call /clear std_srvs/srv/Empty

The documented /clear type is std_srvs/srv/Empty; its request needs no data fields. Look for the drawing to clear. Do not confuse clearing the trail with commanding a new robot pose. You have made a one-off request, whereas the earlier topic inspection watched messages flowing over time.

There is no need to add another turtle, change pen colors or write a publisher program to finish this first exercise. Those can be later extensions once you can explain the commands you just used.

When an observation is missing, return to the responsible terminal

Symptom Check first
ros2 cannot be found in C but works in A Whether C loaded the same ROS environment
Turtlesim is visible but arrow keys do nothing Keyboard focus and whether B is still running
An inspection command occupies C indefinitely Whether it is a streaming echo; use Ctrl+C in C before the next command
A required node is absent The startup output in the terminal responsible for that node
The service call cannot find /clear Whether A is still running and the terminals see the same ROS setup

This table narrows the first local-session mistakes. It is not a diagnosis of every DDS, network or display-driver problem. If your installation cannot open the simulator window, complete the platform setup before interpreting this exercise as a communication test.

Finish by stopping your processes in their own terminals. Write down which node received the keyboard command, which topic carried the reported pose, and what the clear service changed. That concrete explanation is a more useful first project result than a screenshot of an idle turtle. The broader robotics learning roadmap can then help you choose the next project.

Choose the next step from what you just observed

Once you can explain which node publishes a command and which reports the pose, work through the official beginner CLI and client-library tutorials to create a workspace and a small publisher/subscriber package. That is a smaller next step than connecting a physical arm.

For a sensor stream that appears in discovery but delivers no samples, continue with ROS 2 QoS. When callbacks compete for time, use the executor and callback-group guide. For a physical controller connection, the ros2_control hardware-interface guide explains the next interface boundary. The first turtlesim exercise does not verify any of those hardware or timing properties.

Sources and scope

This documentation-based walkthrough follows the ROS 2 Jazzy instructions checked October 14, 2026. The commands and expected observations were not execution-tested for this guide.