ros-controls/ros2_control_demos

This repository aims at providing examples to illustrate ros2_control and ros2_controllers

What it solves

This repository provides a collection of practical examples that demonstrate how to use the ros2_control framework. It helps developers understand how to implement hardware interfaces, manage controllers, and handle complex robot configurations within the ROS 2 ecosystem.

How it works

The project is organized into modular examples, each contained in its own package. These examples use two primary simulated robots—the RRBot (a manipulator) and the DiffBot (a mobile base)—to showcase specific features. Each example includes standardized folders for launch files, robot descriptions (URDF/XACRO), hardware component implementations, and controller logic, allowing users to inspect the code and configuration files to see how different control concepts are applied.

Who it’s for

This repository is designed for ROS 2 users who want to learn how to integrate hardware and controllers using the ros2_control framework. It is particularly useful for those looking for concrete code references to understand advanced topics like controller chaining, hardware lifecycle management, and sensor integration.

Highlights

  • Includes 18 distinct examples covering topics from basic position control to multi-robot systems.
  • Demonstrates advanced features like controller chaining, GPIO interfaces, and diagnostic publishing.
  • Provides examples for both simulated environments (Gazebo, MuJoCo) and real-world hardware integration.
  • Offers clear patterns for implementing custom hardware interfaces and robot controllers.
  • Supports multiple ROS 2 distributions with dedicated branches and build pipelines.

Related

  • Project
  • Project
  • Project
  • Project
  • Project