A comprehensive ROS 2 (Robot Operating System 2) learning project covering fundamental to advanced concepts through hands-on implementation. This repository documents a complete learning path from basic ROS 2 nodes to autonomous navigation and advanced system features.
This project is a structured learning journey through ROS 2, organized into 10 chapters. Each chapter builds upon previous concepts, progressing from basic node creation to advanced topics like Navigation2, custom plugins, and real robot implementation.
ROS 2 Distribution: Humble Hawksbill
Ubuntu Version: 22.04 LTS
Simulation: Gazebo Fortress/Garden
Topics: Basic ROS 2 node structure, CMake fundamentals, node lifecycle
Key Concepts: Node initialization, logger usage, CMake build system
View Chapter 1 Notes →
Topics: Workspace structure, package creation, colcon build system
Key Concepts: C++ and Python packages, package.xml, CMakeLists.txt, setup.py
View Chapter 2 Notes →
Topics: Publisher-subscriber pattern, message types, topic communication
Key Concepts: Topics, publishers, subscribers, message types, asynchronous communication
View Chapter 3 Notes →
Topics: Request-response communication, service clients/servers, action framework
Key Concepts: Services, actions, when to use each communication pattern
View Chapter 4 Notes →
Topics: Runtime configuration, parameter system, launch file composition
Key Concepts: Parameters, launch files, node configuration
View Chapter 5 Notes →
Topics: Robot modeling, URDF/Xacro, coordinate transforms
Key Concepts: Links, joints, visual/collision properties, TF tree, static/dynamic transforms
View Chapter 6 Notes →
Topics: Autonomous navigation, localization, path planning, costmaps
Key Concepts: Navigation2 stack, AMCL, path planning, autonomous waypoint navigation
View Chapter 7 Notes →
Topics: Custom Navigation2 plugins, ROS 2 Control, plugin systems
Key Concepts: Plugin architecture, custom controllers/planners, ROS 2 Control framework
View Chapter 8 Notes →
Topics: Hardware interfaces, sensor integration, actuator control
Key Concepts: ROS 2 Control for real robots, hardware abstraction, sensor/actuator drivers
Note: Hardware components to be purchased later - focuses on ROS concepts
View Chapter 9 Notes →
Topics: QoS policies, executors, lifecycle nodes, message filters, DDS, composition
Key Concepts: Quality of Service, callback groups, time synchronization, intra-process communication
View Chapter 10 Notes →
FishRos/
├── ch1/ # ROS basics and CMake
├── ch2/ # Packages and workspaces
├── ch3/ # Topics and communication
├── ch4/ # Services and actions
├── ch5/ # Parameters and launch files
├── ch6/ # URDF/Xacro and TF
├── ch7/ # Navigation2 and autonomous navigation
├── ch8/ # Advanced topics (plugins, ROS 2 Control)
├── ch9/ # Real robot implementation concepts
├── ch10/ # Advanced ROS 2 features (QoS, executors, etc.)
├── PLAN.md # Project cleanup and documentation plan
└── README.md # This file
Each chapter contains:
- Source code examples (C++ and/or Python)
- Package configurations (
package.xml,CMakeLists.txt,setup.py) - Comprehensive learning notes (
README.md) - Launch files and configuration files
- Ubuntu: 22.04 LTS (Jammy) or compatible
- ROS 2: Humble Hawksbill Desktop
- Gazebo: Fortress or Garden (for simulation chapters)
- Architecture: ARM64 (Apple Silicon) or x86_64
sudo apt update
sudo apt install -y \
ros-humble-desktop \
ros-humble-navigation2 \
ros-humble-nav2-bringup \
ros-humble-nav2-simple-commander \
ros-humble-gazebo-ros-pkgs \
ros-humble-ros-gz \
ros-humble-ros-gz-bridge \
ros-humble-ros-gz-sim \
python3-colcon-common-extensionspip3 install opencv-python cv-bridge numpy transforms3dgit clone <repository-url>
cd FishRoscd ch2/ch2_ws # Example: Chapter 2 workspace
colcon build --symlink-install
source install/setup.bash# Example: Run a node from Chapter 1
ros2 run demo_cpp_pkg cpp_node
# Example: Launch Navigation2 (Chapter 7)
ros2 launch fishbot_description gazebo_sim.launch.py
ros2 launch fishbot_navigation2 navigation2.launch.pyLearn the basics of ROS 2: creating nodes, understanding packages, and building workspaces. These chapters establish the fundamental concepts needed for all subsequent learning.
Master ROS 2 communication mechanisms: topics for continuous data streams, services for request-response, actions for long-running tasks, parameters for configuration, and launch files for system orchestration.
Learn to describe robots using URDF and Xacro, understand coordinate frames and transforms (TF), and visualize robot models in RViz.
Implement autonomous navigation using Navigation2, create custom plugins, and understand ROS 2 Control for robot motion control.
Prepare for real robot deployment and master advanced ROS 2 features for building sophisticated robotic systems.
After completing this learning journey, you will understand:
✅ ROS 2 Architecture: Nodes, topics, services, actions, parameters
✅ Build Systems: CMake, colcon, Python setup tools
✅ Robot Description: URDF/Xacro, TF, coordinate frames
✅ Navigation: Navigation2 stack, AMCL, path planning, costmaps
✅ Advanced Features: QoS, executors, lifecycle nodes, message filters
✅ System Design: Plugin architecture, component composition, hardware abstraction
✅ Best Practices: Code organization, launch file design, parameter management
✅ Completed: All 10 chapters with comprehensive documentation
✅ Code: Source code examples in C++ and Python
✅ Documentation: Detailed learning notes for each chapter
✅ Cleanup: Build artifacts removed, ready for GitHub
This is a personal learning project. Feel free to use it as a reference or starting point for your own ROS 2 learning journey.
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
nayr (ryan881028@gmail.com)
| Chapter | Focus Area | Key Topics |
|---|---|---|
| Ch1 | Basics | Nodes, CMake, Logger |
| Ch2 | Workspaces | Packages, colcon, Build system |
| Ch3 | Communication | Topics, Publishers, Subscribers |
| Ch4 | Services | Services, Actions, Request-Response |
| Ch5 | Configuration | Parameters, Launch files |
| Ch6 | Robot Model | URDF, Xacro, TF |
| Ch7 | Navigation | Navigation2, AMCL, Path Planning |
| Ch8 | Advanced | Plugins, ROS 2 Control |
| Ch9 | Real Robot | Hardware, Sensors, Actuators |
| Ch10 | Advanced ROS 2 | QoS, Executors, Lifecycle, Filters |
Happy Learning! 🤖