A comprehensive, beginner-friendly guide to learning ROS 2 Humble from scratch.
Perfect for students, hobbyists, and robotics enthusiasts taking their first steps into the ROS 2 ecosystem.
ROS 2 (Robot Operating System 2) is an open-source framework for building robot software. Despite its name, it is not an operating system — it is a middleware and toolset that provides:
- 📡 Communication infrastructure — Nodes, Topics, Services, and Actions
- 🔧 Build system —
colconbuild tool and package management - 🧰 Developer tools — CLI utilities, visualization tools (
rviz2,rqt) - 📦 Ecosystem — Thousands of packages for navigation, perception, manipulation, and more
ROS 2 Humble Hawksbill is the 8th ROS 2 release (May 2022) and is an LTS (Long-Term Support) version supported until May 2027. It is the recommended version for production systems and learners.
Before starting, ensure you have:
| Requirement | Details |
|---|---|
| Operating System | Ubuntu 22.04 LTS (Jammy Jellyfish) |
| Disk Space | At least 10 GB free |
| RAM | 4 GB minimum (8 GB recommended) |
| Internet | Required for installation |
| Linux Basics | Comfortable using the terminal |
| Python | Basic Python knowledge (variables, functions, classes) |
💡 Don't have Ubuntu? You can use:
- WSL 2 (Windows Subsystem for Linux) on Windows 10/11
- A Virtual Machine (VirtualBox or VMware)
- A dual-boot setup
| # | Topic | Description | File |
|---|---|---|---|
| 01 | 🔧 Installation | Installing ROS 2 Humble on Ubuntu 22.04 | docs/01_installation.md |
| 02 | 🏗️ Environment Setup & Workspace | Sourcing ROS 2, creating & building workspaces | docs/02_workspace_setup.md |
| 03 | 🔵 ROS 2 Nodes | What are nodes, how to create and run them | docs/03_nodes.md |
| 04 | 📡 Topics | ROS 2 topics, message types, and communication | docs/04_topics.md |
| 05 | 📤 Publishers & Subscribers | Writing Python publisher and subscriber nodes | docs/05_pub_sub.md |
| 06 | 🐢 Turtlesim | Running and controlling the Turtlesim simulator | docs/06_turtlesim.md |
| 07 | 🕸️ rqt_graph | Visualizing node communication with rqt_graph | docs/07_rqt_graph.md |
| 08 | ⌨️ CLI Commands | Essential ROS 2 command-line reference | docs/08_cli_commands.md |
| 09 | 🔍 Troubleshooting | Common errors and how to fix them | docs/09_troubleshooting.md |
Step 1 — Install ROS 2 Humble (see full guide):
# Add ROS 2 apt repository
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt install ros-humble-desktop -yStep 2 — Source ROS 2:
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrcStep 3 — Verify Installation:
ros2 run demo_nodes_cpp talkerROS2-Humble-Learning/
│
├── 📄 README.md ← You are here
│
├── 📁 docs/ ← All documentation files
│ ├── 01_installation.md ← ROS 2 Humble installation guide
│ ├── 02_workspace_setup.md ← Workspace creation & setup
│ ├── 03_nodes.md ← ROS 2 Nodes explained
│ ├── 04_topics.md ← Topics and message types
│ ├── 05_pub_sub.md ← Publisher & Subscriber examples
│ ├── 06_turtlesim.md ← Turtlesim tutorial
│ ├── 07_rqt_graph.md ← rqt_graph visualization
│ ├── 08_cli_commands.md ← CLI command reference
│ ├── 09_troubleshooting.md ← Troubleshooting guide
│ └── 📁 images/ ← Diagrams and screenshots
│ ├── ros2_architecture.png
│ ├── pub_sub_diagram.png
│ ├── workspace_structure.png
│ ├── turtlesim_demo.png
│ └── rqt_graph_demo.png
│
├── 📁 examples/ ← Runnable code examples
│ ├── 📁 python_examples/ ← Python node examples
│ │ ├── simple_publisher.py
│ │ ├── simple_subscriber.py
│ │ ├── minimal_node.py
│ │ └── turtle_controller.py
│ ├── 📁 launch_files/ ← ROS 2 launch files
│ │ └── talker_listener.launch.py
│ └── 📁 workspace_example/ ← Complete package example
│ └── src/
│ └── my_beginner_pkg/
│
└── 📄 .gitignore ← Git ignore file
| Example | Language | Description |
|---|---|---|
| simple_publisher.py | Python | Publishes string messages to /chatter |
| simple_subscriber.py | Python | Subscribes to /chatter and prints messages |
| minimal_node.py | Python | Minimal ROS 2 node template |
| turtle_controller.py | Python | Controls turtlesim via cmd_vel topic |
| talker_listener.launch.py | Python | Launch file to start publisher + subscriber |
📌 Recommended order for beginners:
─────────────────────────────────────────────────────
1️⃣ Installation (01_installation.md)
↓
2️⃣ Workspace Setup (02_workspace_setup.md)
↓
3️⃣ Nodes (03_nodes.md)
↓
4️⃣ Topics (04_topics.md)
↓
5️⃣ Publishers & Subscribers (05_pub_sub.md)
↓
6️⃣ Turtlesim (06_turtlesim.md)
↓
7️⃣ rqt_graph (07_rqt_graph.md)
↓
8️⃣ CLI Commands Reference (08_cli_commands.md)
─────────────────────────────────────────────────────
| Resource | Link |
|---|---|
| 📚 ROS 2 Humble Documentation | docs.ros.org/en/humble |
| 🔧 Installation Guide | Installation — ROS 2 Humble |
| 🎓 Official Tutorials | Tutorials — ROS 2 Humble |
| 📦 ROS Index (packages) | index.ros.org |
| 💬 ROS Answers Forum | answers.ros.org |
| 🐙 ROS 2 GitHub | github.com/ros2 |
| 📺 The Construct (Video Tutorials) | theconstructsim.com |
Found an error? Want to add content? Contributions are welcome!
- Fork the repository
- Create your feature branch:
git checkout -b feature/add-new-topic - Commit your changes:
git commit -m 'Add explanation for ROS 2 Services' - Push to the branch:
git push origin feature/add-new-topic - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
Made with ❤️ for the robotics learning community
⭐ Star this repo if it helped you learn ROS 2!