This repository provides examples for functionalities and capabilities of ros2_control
framework.
It consists of simple implementations that demonstrate different concepts. Choose the right branch of this repository matching you ROS 2 distribution as well as the full documentation on control.ros.org, see this table.
If you want to have rather step by step manual how to do things with ros2_control
checkout the ros-control/roscon2022_workshop repository.
The following examples are part of this demo repository:
-
Example 1: RRBot
RRBot - or ''Revolute-Revolute Manipulator Robot'' - a simple position controlled robot with one hardware interface. This example also demonstrates the switching between different controllers.
-
Example 2: DiffBot
DiffBot, or ''Differential Mobile Robot'', is a simple mobile base with differential drive. The robot is basically a box moving according to differential drive kinematics.
-
Example 3: "RRBot with multiple interfaces"
RRBot with multiple interfaces.
-
Example 4: "Industrial robot with integrated sensor"
RRBot with an integrated sensor.
-
Example 5: "Industrial robots with externally connected sensor"
RRBot with an externally connected sensor.
-
Example 6: "Modular robots with separate communication to each actuator"
The example shows how to implement robot hardware with separate communication to each actuator.
-
Example 7: "6-DOF robot"
A full tutorial for a 6 DOF robot for intermediate ROS 2 users.
-
Example 8: "Using transmissions"
RRBot with an exposed transmission interface.
-
Example 9: "Gazebo classic simulation"
Demonstrates how to switch between simulation and hardware.
-
Example 10: "Industrial robot with GPIO interfaces"
RRBot with GPIO interfaces.
-
Example 11: "Car-like robot using steering controller library (tba.)"
-
Example 12: "Controller chaining"
The example shows a simple chainable controller and its integration to form a controller chain to control the joints of RRBot.
-
Example 13: "Multi-robot example (tba.)"
The repository is structured into example_XY
folders that fully contained packages with names ros2_control_demos_example_XY
.
The packages have following structure of subfolders:
bringup
- stores launch files and runtime configurations for demo robots.description
- stores URDF (and XACRO) description files, rviz configurations and meshes for the example robots.hardware
- stores implementations of example hardware components (interfaces).controllers
(optional) - stores implementation of example controllers.
The important files to check in each example are:
bringup/launch/<example_name>.launch.py
- launch file for the examplebringup/config/<example_name>_controllers.yaml
- parameters with controllers' setup for the example.description/<example_name>.ros2_control.xacro
- XACRO file withros2_control
-URDF-tag with hardware setup and parameters.description/<example_name>.urdf.xacro
- the main description for for the example used to generate URDF on the fly that is published on the/robot_description
topic.hardware/<example_name>.hpp
- header file of the example hardware component implementation.hardware/<example_name>.cpp
- source file with the example hardware component implementation.controllers/<example_name>.hpp
- header file of the example controller implementation.controllers/<example_name>.cpp
- source file with the example controller implementation.
NOTE - The structure of packages, folders and files given in this repository is not recommended to be used for your robot. Usually you should have all of the above folders defined as separate packages with naming convention <robot_name_or_type>/[bringup|description|hardware|controllers]
.
More standard structure can be found in ros_control_boilerplate repository from Dave Coleman or documentation on ros_team_workspace from Stogl Robotics.
The concepts in this package are demonstrated on the examples of RRBot and DiffBot.
Those two world-known imaginary robots are trivial simulations to demonstrate and test ros2_control
concepts.
ROS 2 Distro | Branch | Build status | Documentation |
---|---|---|---|
Rolling | master |
|
Documentation API Reference |
Iron | master |
|
Documentation API Reference |
Humble | humble |
|
Documentation API Reference |
Galactic | galactic |
|
Documentation API Reference |
Foxy | foxy |
|
Documentation API Reference |
NOTE: There are three build stages checking current and future compatibility of the package.
-
Binary builds - against released packages (main and testing) in ROS distributions. Shows that direct local build is possible.
Uses repos file:
src/$NAME$/$NAME$-not-released.<ros-distro>.repos
-
Semi-binary builds - against released core ROS packages (main and testing), but the immediate dependencies are pulled from source. Shows that local build with dependencies is possible and if fails there we can expect that after the next package sync we will not be able to build.
Uses repos file:
src/$NAME$/$NAME$.repos
-
Source build - also core ROS packages are build from source. It shows potential issues in the mid future.