ros/ros_tutorials
Code used in tutorials found on ROS wiki
What it solves
Ros_tutorials solves the problem of teaching ROS 2's basic communication and execution concepts without needing real hardware. By providing a simple, visual simulator (turtlesim) and the interface definitions it uses, beginners can practice with nodes, topics, services, actions, parameters, and launch files using a friendly turtle in a window.
How it works
The repository has two packages:
turtlesim: a lightweight Qt-based simulator that draws one or more turtles. You can drive them around, spawn new ones, change pen colors, and more via ROS 2 topics, services, and actions. It builds executables like
turtlesim_node(the simulator window),turtle_teleop_key(keyboard control),draw_square(moves a turtle in a square), andmimic(makes one turtle imitate another, demonstrating topic remapping). There's also a launch file to start two simulator instances in separate namespaces.turtlesim_msgs: the interface package that defines the messages, services, and action used by the simulator. It contains message definitions for
ColorandPose, services forKill,SetPen,Spawn,TeleportAbsolute,TeleportRelative, and one action calledRotateAbsolute.
These packages are used throughout the official ROS 2 beginner tutorials, which link to the README.
Who it's for
This is for anyone learning ROS 2—especially beginners—who want a hands-on, visual way to understand core concepts. It's also useful for educators or developers creating ROS 2 teaching material.
Highlights
- Simple Qt-based turtle simulator for visual learning
- Demonstrates topics, services, actions, parameters, and launch files
- Includes ready-made executables for keyboard teleop, drawing a square, and mimicking motion
- Interface package with well-defined messages, services, and action
- Used in the official ROS 2 documentation and beginner tutorials
Related
- Project
- Project
- Project
- Project