Giter Club home page Giter Club logo

ros2_control_demos's Introduction

ros2_control Demos

License

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.

Getting Started

Follow the steps provided in the documentation to install ros2_control_demos.

Content

The following examples are part of this demo repository:

Structure

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 example
  • bringup/config/<example_name>_controllers.yaml - parameters with controllers' setup for the example.
  • description/<example_name>.ros2_control.xacro - XACRO file with ros2_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.

Build status

ROS 2 Distro Branch Build status Documentation
Rolling master Rolling Binary Build
Rolling Semi-Binary Build
Documentation
API Reference
Jazzy master Rolling Binary Build
Rolling Semi-Binary Build
Documentation
API Reference
Iron iron Iron Binary Build
Iron Semi-Binary Build
Documentation
API Reference
Humble humble Humble Binary Build
Humble Semi-Binary Build
Documentation
API Reference

Explanation of different build types

NOTE: There are three build stages checking current and future compatibility of the package.

  1. 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

  2. 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

  3. Source build - also core ROS packages are build from source. It shows potential issues in the mid future.

ros2_control_demos's People

Contributors

andyze avatar ark3r avatar bmagyar avatar christophfroehlich avatar dependabot[bot] avatar destogl avatar emereum avatar fmros avatar github-actions[bot] avatar karsten1987 avatar kvkpraneeth avatar livanov93 avatar luis-camero avatar mahaarbo avatar mamueluth avatar mauricesvp avatar mergify[bot] avatar muritane avatar nils-christianiseke avatar nuclearsandwich avatar olivier-stasse avatar pac48 avatar saikishor avatar sangteak601 avatar svnrk avatar t3ch9 avatar timple avatar vladimirfokow avatar wmmc88 avatar xi-hhhm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ros2_control_demos's Issues

Use Case: ros2_control should support tool chaning on a robot

Tool changers are a usual component in an industrial robotic cell. ros2_control should be able to support a change of tools, i.e. hardware interfaces, of a robot.
This should be done without restarting the control node.
This could be done by dynamically loading and unloading the tool components (different sensors and actuators).
To support real-time constrains, one could load all the components on start and use init, start, stop, halt commands to control a tool.

Use Case: Different hardware interfaces for each joint

Modern robots provide usually multiple interfaces towards them, e.g. position, velocity, acceleration, force, etc. It is thinkable that in some cases a user wants to use different interfaces along the kinematic chain, e.g. position on joint 1-3 and velocity on joints 4-6. This is especially interesting for making very complex robots, like mobile manipulators, humanoid robots, etc.

wrong command in Readme

In readme, ros2 control list_controller is wrong command.
Request that command "ros2 control list_controller" replace to "ros2 control list_controllers".

Example executables from README are missing

After building, these 2 demos don't exist:

ros2 launch ros2_control_demo_robot demo_robot_launch.py

ros2 launch ros2_control_demo_robot demo_robot_modular_launch.py

Build command:

colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release

RRBotSystemMultiInterface example with multiple command interfaces

I thought I'd try to make a RRBotSystemMultiInterface according to the components_architecture_and_urdf_examples example that has position, velocity, and acceleration. Integration of the velocity or acceleration to position depends on whether these interfaces have been claimed, but how can the hardware interface see which command interfaces are currently claimed, or react to changes of the command interfaces claimed?

In the example, the problem pops up here: rrbot_system_multi_interface/L190-L200. This problem also popped up in my attempts to port Franka Emika Panda to ROS2. Previously the RobotHW would be able to notice the switch of controller in prepareSwitch and doSwitch, how should it be done with the new resource manager standing between the hardware_interface and the controller manager?

ros2_control_node fail to launch by using the launch script

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ros2_control_node-1]: process started with pid [861]
[ros2_control_node-1] terminate called after throwing an instance of 'pluginlib::LibraryLoadException'
[ros2_control_node-1] what(): According to the loaded plugin descriptions the class ros2_control_demo_hardware/RRBotSystemPositionOnlyHardware with base class type hardware_interface::SystemInterface does not exist. Declared types are test_robot_hardware/TestTwoJointSystem test_system

Use case: robotic components should have transparent state representation

When using hardware components they can be in different states. This is really considered in hardware_interface in ROS1, which often leads to a completely new start of the whole control system.

The states could be:

  • LOADED: objects of components and interfaces are created (e.g. classes are loaded using pluginlib)
  • CONFIGURED: parameters for the robot are read from parameter server and the objects are configured according to them
  • INITIALIZED: there is communication with a real hardware (or simulation) and components are ready to start. No active movement allowed.
  • RUNNING: active movement/control is allowed.
  • STOPPED: as initialized, but previous state was running
  • HALTED: similar to initialized, but an unexpected event occurred and the robot should be further used with caution. The next state is INITIALIZED, after the is solved.

Use case: Enable separate hardware communication and control loops

For communication with some hardware very high frequencies are desirable, e.g. a force-torque sensor. Nevertheless, the control loop is usually limited to the robot hardware or the "slowest" data source. To enable flexible data access from hardware and filtering it should be possible to define the hardware communication loop separate from control loop.

Organization

Dear @destogl ,
As mentioned during the ros2_control meeting I am willing to help.
From your designed document I tried to give it a shot in:
https://github.com/olivier-stasse/ros2_control_demos.git

It just a starting point to implement the generic headless robot taking inspiration from Dave Coleman and @Karsten1987

Please feel free to reorganize or start from something different if you wish.

Let me know how you want to organize, we can probably split the work by issuing issues in the project https://github.com/orgs/ros-controls/projects/1

I will very much appreciate if you drive this but let me know if you are short in time.

Thanks again for your nice proposal.
Best,

Gazebo examples

Hi,

Are the gazebo files currently not on the repo? Searching for ros2_control_demo_hardware_gazebo returns nothing.

Thanks,
Simon

Add test package for modeled robotic components

Add test package for CI and to test the dynamic loading of components as they are implemented.

This is important for #6 so that one is able to test the implementation.

Do this first for the components and allow them not to load any ComponentHardware:

  • First: Write a test for the Sensor component - it does not have many dependencies
  • Test for the Actuator component
  • Test for the Robot component

get_name() doesn't seem to be virtual

I'm trying to compile the add_rrbot_system_position_joints branch, and I'm getting this error:

.../ros2_control_demos/ros2_control_demo_hardware/include/ros2_control_demo_hardware/rrbot_system_position_only.hpp:50:15: error: ‘std::string hardware_interface::BaseSystemHardwareInterface::get_name() const’ marked ‘final’, but is not virtual

If I remove final it seems to compile fine.

Update to new ros2controlcli interface

Replace the following:

  • ros2 control load_start_controller to ros2 control load --state start
  • ros2 control load_configure_controller to ros2 control load --state configure

Use case for a simple DIY robot

The goal of this use case is to show how easily ROS can help robot makers.

Several discussions with people from FabLabs show that they do not know where to start.
Making a clear, lean example would be very helpful.

Maybe this is more about documentation, but it could show clearly where to put the real-time process, the access to the electronics to read sensors, call controllers and write the command.

Then briefly show in the documentation how all the functionalities visualization, playing back trajectories and planning are coming from free.

This could be nice for a PhD student making his own robot prototype.

Use case: Composition of robots

Mobile manipulators are now a day almost in every research lab for robotics. These are basically multiple robots assembled into one mechanical construction. If each component is already ros2_control enabled there should be a simple way to create a complex robot (in ROS1 CombinedRobot).
Toward controllers, this construction should be transparent in terms that they automatically gain access to every one of them. This could be achieved using the DynamicJointState message.

Demo not work

I'm testing demo -b add_rrbot_system_position_joints.

In the file rrbot_system_position_only.launch.py, exist line executable='ros2_control_node', but in the package control_manager not exist ros2_control_node.

image

Could indicate the steps to run the demo correctly.

Thank you in advance.

Use Case: Using industrial robot with `ros2_control`

Industrial robot has usually single interface for all joints, sensors, and actuators to the "outside world".
The ros2_control should enable custom protocol with such "on-block" communication toward hardware.

Use case: Support for initialization of robot hardware

Many robotic components need initialization (e.g. homing) procedures to be ready to use.
Also, the components need to be able to recover themselves after an unexpected event, e.g. an emergency stop.

In ROS1, services are often used for this, and they are calling methods directly in hardware_interface. This is actually something which could be managed by the controller manager or at least the top-level robot interface to make it transparent throughout whole control chain.

Use case: Enable a robot to be extended with different tools

A robot as ros2_control structure should be extensible with additional tools, e.g. force-torque sensor, milling machine, etc.
This extension should be transparent for controllers by adding new data in the DynamicJointState message.
It is preferable to do this without any coding and just loading additional sensor component, i.e. hardware_interface (i the case that sensors is ros2_control enabled).

Use case: robot prototype

In this use case, it is assumed that the user wants to:

  • Test various power electronics - and therefore can have various low level control: torque control, current control, current control + position (PD+),
  • Design its own specific transmission protocol
  • Transmit PID value computed by a Differential Dynamic Program (Gain scheduling)
  • Create complex actuator with current sensor, absolute encoder, motor encoder, temperature, IMU

The goal is to show that this does not break the ros control API.

Integrate and test internal model and `*Hardware`-structures

  • dynamically load *Hardware structures in the internal model. Use templated classes to avoid possibility of mixing different types of components.
  • Create classes for demo_robot
  • Test demo_robot - this is a point where it will be shown is concept is working, therefore be careful and suspicious/strict.

Create `ros2_control_core` package as proof of concept

Create a new package ros_control_core in this repository to evaluate the concepts from the design document.

This is crucial for implementation of demo_robot.

The following issues need to be close before closing this one!

Probably is the simplest way to implement this in the following order:
#7
#10
#11
#12
#13
#14

Initial setup

@destogl travis is already enabled, I believe github actions can be largely copied over from the ros2_control repo and I also added this to the boilerplate project so you can assign tickets to the project directly

Use Case: Using modular robot with `ros2_control`

Many researchers and hobbyists build their robots by using simple sensors and actuators which usually communicate using separate interfaces and protocols to a computer.
The ros2_control should support this so that one could create software equivalent of the hardware separating communication interfaces and protocols from a representation of the hardware in ros2_control.

Provide methods to stop controllers, and verify they are stopped

This is a problem we've noticed with ros1_control. When transitioning from streaming commands (e.g. teleoperation or visual servoing) to trajectory planning, we need a way to verify that the robot has actually stopped.

Otherwise, the robot continues to move while the trajectory plan occurs, which makes the start state invalid and the trajectory will not execute.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.