Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS 2 Lyrical Tutorial Environment

Welcome! This repository contains a fully containerized ROS 2 Lyrical environment.

🚀 Quick Start Guide

1. Clone the repository

Open a terminal on your host machine and clone this repo:

git clone https://github.com/gglaspell/lyrical_tutorial.git
cd lyrical_tutorial

2. Allow GUI Passthrough (Linux Host Only)

Because you will be using graphical tools like Turtlesim and RViz2, you need to allow the Docker container to talk to your host's display server. Run this once per session:

xhost +local:root

3. Start the Environment

Build and start the container in the background using Docker Compose:

docker compose up -d

(Note: The first time you run this, it will take a few minutes to download and build the ROS 2 Lyrical image).

4. Enter the Container

To start working, open a shell inside the running container using docker compose exec. This runs entrypoint.sh so ROS 2, your workspace overlay, and colcon helpers are all sourced automatically:

docker compose exec ros2-lyrical /entrypoint.sh bash

You should now see your terminal prompt change. You are inside the container! All the ROS 2 environment variables are automatically sourced for you.

5. Opening Multiple Terminals

ROS 2 requires running multiple nodes in separate terminals at the same time. Open a new terminal tab on your host machine and simply run the same command again:

docker compose exec ros2-lyrical /entrypoint.sh bash

📂 Where to write your code

Your code should go inside the ros2_ws/src/ directory. This folder is bind-mounted from your host machine into the container.

  • This means you can use your favorite code editor (like VS Code) on your host machine to edit the files, and then compile/run them inside the container.
  • If the container is destroyed, your code is safe!

🛑 Stopping the Environment

When you are done for the day, exit your container terminals and run:

docker compose down

🎓 ROS 2 Lyrical Tutorial Checklist

Primary Resource: Tutorials — ROS 2 Documentation: Lyrical documentation


🟢 Beginner: CLI Tools (First Steps)

Learn how to interact with ROS 2 from the command line.

  • Configuring your ROS 2 environment (✅ Handled by the Docker entrypoint.sh automatically sourcing the setup scripts)
  • Using turtlesim, ros2, and rqt
  • Understanding ROS 2 nodes
  • Understanding ROS 2 topics
  • Understanding ROS 2 services
  • Understanding ROS 2 parameters
  • Understanding ROS 2 actions
  • Using rqt_console to view logs
  • Launching multiple nodes
  • Recording and playing back data (ros2 bag)

🟡 Beginner: Client Libraries

Write your first ROS 2 code in Python and/or C++.

  • Using colcon to build packages (✅ colcon is pre-installed in the Docker image. You should still read this tutorial to learn the colcon build command!)
  • Creating a workspace (✅ The ros2_ws/src folder is already created and mapped to the container)
  • Creating a package
  • Writing a simple publisher and subscriber (C++)
  • Writing a simple publisher and subscriber (Python)
  • Writing a simple service and client (C++)
  • Writing a simple service and client (Python)
  • Creating custom msg and srv files
  • Implementing custom interfaces
  • Using parameters in a class (C++)
  • Using parameters in a class (Python)
  • Using ros2doctor to identify issues
  • Creating and using plugins (C++)

🟠 Intermediate

Level up with complex system architectures and foundational tools.

  • Managing dependencies with rosdep (✅ Note: rosdep update is handled by the Dockerfile, but read this to learn how to use rosdep install for new packages)
  • Creating a custom action
  • Writing an action server and client (C++)
  • Writing an action server and client (Python)
  • Composing multiple nodes in a single process
  • Monitoring for parameter changes
  • Launch tutorials: Creating advanced launch files
  • tf2 tutorials: Understanding coordinate frames and transforms
  • URDF tutorials: Building a visual robot model from scratch

🔴 Advanced

Explore under-the-hood configurations and performance tuning.

  • Enabling topic statistics
  • Using Fast DDS Discovery Server
  • Implementing a custom memory allocator
  • Security tutorials (Setting up SROS2)
  • Recording a bag from a node (C++)
  • Reading from a bag file (C++)

🟣 Demos

See ROS 2 in action with practical, real-world examples.

  • Quality of Service (QoS) features and degradation testing
  • Managing nodes with Managed Nodes (Lifecycle nodes)
  • Real-time programming in ROS 2 (Pendulum demo)
  • Dummy robot demo
  • Advanced logging and logger configuration

About

This repository contains a fully containerized ROS 2 Lyrical environment. It includes all the dependencies needed to complete the official ROS 2 Tutorials.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages