Skip to content

Latest commit

 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS 2 Development Workspace

Docker Build & Publish Docker Hub

ROS 2 Python Ubuntu Status

Active ROS 2 engineering workspace for building modular robotics software examples with Python (rclpy), supported by a reproducible Docker development environment and an automated GitHub Actions CI workflow.

The workspace demonstrates ROS 2 package organization, node communication, custom interfaces, launch and configuration, debugging, and practical development workflows.

Current Progress

Completed

  • ✔ Publishers & Subscribers
  • ✔ Services & Clients
  • ✔ Actions
  • ✔ Custom Interfaces
  • ✔ Modular Package Architecture
  • ✔ Parameters
  • ✔ Namespaces & Remapping
  • ✔ XML Launch Files
  • ✔ Python Launch Files
  • ✔ Docker-based Development Environment
  • colcon Builds
  • ✔ GitHub Actions CI
  • ✔ Docker Image Publishing
  • ✔ Quality of Service (QoS)
  • ✔ ROS 2 Diagnostics & Observability
  • rosbag2 Analysis & Debugging

Currently Learning

  • Executors, Callback Groups & Lifecycle Nodes
  • State Estimation with robot_localization
  • Nav2 Behavior Trees & Recovery Behaviors
  • ros2_control
  • C++ / rclcpp
  • SIL & launch_testing

Project Overview

This repository is a continuously maintained ROS 2 development workspace focused on practical, modular examples rather than a single finished robot application.

The workspace is used to develop and validate ROS 2 packages while maintaining a consistent development environment and repeatable build workflow.

Development Workflow

ROS 2 Packages
      │
      ▼
Docker Development Environment
      │
      ▼
colcon Build & Validation
      │
      ▼
GitHub Actions CI
      │
      ▼
Docker Image Published to Docker Hub

Changes to the Docker environment or CI configuration trigger the GitHub Actions workflow.

CI Pipeline

Docker CI Pipeline

Docker & CI

The ROS 2 development environment is containerized with Docker to provide a consistent and reproducible development environment.

GitHub Actions is used to:

  1. Build the Docker image.
  2. Validate the Docker-based ROS 2 environment.
  3. Publish the image to Docker Hub.

Docker image:

preeet/ros2-jazzy-dev

Docker Hub:

https://hub.docker.com/r/preeet/ros2-jazzy-dev

Workflow:

.github/workflows/docker-build.yml

Objectives

  • Build and maintain a modular ROS 2 workspace.
  • Practice ROS 2 communication and package development using Python.
  • Maintain a reproducible Docker-based development environment.
  • Automate image build, validation, and publishing through GitHub Actions.
  • Keep the repository structured and extensible for future robotics projects.

Repository Architecture

ros2-programming-examples/
├── .github/
│   └── workflows/
│       └── docker-build.yml
├── docker/
│   ├── entrypoint.sh
│   └── README.md
├── Dockerfile
├── LICENSE
├── README.md
└── src/
    ├── my_robot_bringup/
    ├── my_robot_interfaces/
    ├── robot_bringup_sensors/
    ├── robot_core/
    ├── robot_navigation/
    ├── robot_navigation_diagnostics/
    ├── robot_safety/
    ├── robot_sensors/
    └── robot_state/

Most packages are ament_python; my_robot_interfaces and my_robot_bringup use ament_cmake for interface and bringup-related functionality.

Package Overview

Package Description
my_robot_bringup CMake-based bringup package containing launch files and configuration for system-level startup and diagnostics.
my_robot_interfaces Custom messages, services, and actions for robot state, safety, mode control, and navigation.
robot_bringup_sensors Sensor bringup, health monitoring, IMU tilt guard, power switching, and QoS publisher examples.
robot_core Basic ROS 2 node examples and publisher/subscriber communication.
robot_navigation Area navigation action server using the custom MapsArea action.
robot_navigation_diagnostics Position tracking, goal markers, and navigation/path safety checking examples.
robot_safety Safety service/client, thermal guard, and emergency velocity command examples.
robot_sensors Battery, motor temperature, LiDAR publisher/watchdog, and IMU monitoring examples.
robot_state Robot state publisher/subscriber, robot mode service/client, and pose tracking examples.

Implemented ROS 2 Concepts

  • Multi-package ROS 2 workspace structure
  • Python node development with rclpy
  • Publishers, subscribers, services, clients, and actions
  • Custom msg, srv, and action interfaces
  • Timers and callbacks
  • Parameters
  • Namespaces and remapping
  • ROS 2 logging
  • XML and Python launch files
  • CLI-based build and execution with colcon
  • Node and graph validation using ROS 2 CLI and rqt_graph

Build Locally

Native Ubuntu / ROS 2

Requirements:

  • Ubuntu with ROS 2 Jazzy
  • Python 3
  • colcon
  • ROS 2 dependencies

Clone the repository:

git clone https://github.com/Preetbandgar/ros2-programming-examples.git
cd ros2-programming-examples
source /opt/ros/jazzy/setup.bash

Install dependencies:

rosdep update
rosdep install --from-paths src --ignore-src -r -y

Build:

colcon build
source install/setup.bash

Docker

The repository also provides a Docker-based ROS 2 development environment.

Pull the published image:

docker pull preeet/ros2-jazzy-dev:latest

Run the development container:

docker run --rm -it \
  -v "$PWD":/home/ubuntu/ros2-programming-examples \
  -w /home/ubuntu/ros2-programming-examples \
  preeet/ros2-jazzy-dev:latest

Inside the container:

source /opt/ros/jazzy/setup.bash
colcon build
source install/setup.bash

Run

List available executables:

ros2 pkg executables robot_core
ros2 pkg executables robot_sensors
ros2 pkg executables robot_state
ros2 pkg executables robot_safety
ros2 pkg executables robot_navigation

Example commands:

ros2 run robot_core robot_speaker_exe
ros2 run robot_core robot_listener_exe

ros2 run robot_state robot_mode_server_exe
ros2 run robot_state robot_mode_client_exe

ros2 run robot_sensors lidar_fake_node_exe
ros2 run robot_sensors lidar_watchdog_node_exe

ros2 run robot_navigation area_navigation_action_server_exe

After changing packages or interfaces:

colcon build
source install/setup.bash

Tools & Technologies

  • ROS 2 Jazzy
  • Python 3
  • rclpy
  • ament_python
  • ament_cmake
  • rosidl_default_generators
  • colcon
  • ROS 2 CLI
  • Docker
  • GitHub Actions
  • Docker Hub
  • RViz2
  • Gazebo Harmonic
  • Foxglove
  • rqt_graph

Development Status

This repository is actively maintained as a structured ROS 2 engineering workspace.

Implemented work is kept separate from planned topics so the repository reflects the current state of the project.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

ROS 2 Jazzy workspace demonstrating modular robotics software development using Python (rclpy), including publishers, services, actions, custom interfaces, and navigation fundamentals.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages