Skip to content

CNR ROS CONTROL

Nicola Pedrocchi edited this page Jul 7, 2020 · 2 revisions

Continuous Integration

service Master
Travis Build Status
Codecov codecov
Codacy Codacy Badge

Design

The repository contains the implementation of an extension of the ros_control framework developed by the Institute of Intelligent Industrial Technologies and Systems for Advanced Manufacturing (STIIMA), of the National Research Council of Italy (CNR-ITIA).

The extension is based on one package and two meta-packages.

The core of the extension is having encapsulated the lifecycle of the RobotHw (link) in a nodelet.

This design choice allows the implementation of cascade controller architectures, preserving the fastest communication as possible between the nodelets constituting the controller architecture.

A special RobotHw called TopicRobotHw is provided by the cnr_hardware_interfaces package, and it has been designed in order to encapsulate generic topics in the standard hardware_interface (link), and therefore to allows the controller accessing the topic content using the handle-based mechanism.

<iframe src=”.media/ros_control.html/ros_control.html” width="800" height="600" scrolling=”no” />

cnr_hardware_interfaces (readme)

The metapackage is built by five packages:

  1. cnr_hardware_interface (readme): this package is fully compatible with ros_control. It implements a derived class cnr_hardware_interface::RobotHW that inherits the standard RobotHW. The class implements some useful functionalities:

    1. It Integrates a diagnostics module, to track the times of the read/write and update functions.
    2. It provides tracking of the state of the class, and it reacts in case of error.
    3. It provides a prepareSwitch function to ease the inherited classes.
    4. It integrates a logger module that tracks the input and output of the function and generates a log file for the class.
  2. cnr_hardware_nodelet_interface (readme): this package is a set of utilities that ease the lifecycle management of the RobotHW in a nodelet. The package allows loading and downloading of a nodelet, and inside the nodelet, an infinite-loop is packed in a thread. The loop implements the read/update/write architecture of the ros_control architecture. The RobotHW is uploaded using the pluginlib, and the actual robot can be easily uploaded just through a parameter, that corresponds to the type of the RobotHW implementation (that should be properly configured. See here

  3. cnr_topic_hardware_interface (readme): this pakcage is a specialization of the abstract RobotHW class in cnr_hardware_interface. Specifically:

    1. It subscribes/publishes a topic of type joint_states and it translates the topic field inside the proper handle structures. It allows a generic controller to access the topic field as it is a standard hardware_interface
    2. It exports the class using the pluginlib, in order to ease the dynamic loading of the class.
  4. cnr_topics_hardware_interface (readme): this package is similar to the previous, but it allows the publication and subscription of a set of topics, and it manages more topic types.

  5. cnr_fake_hardware_interface (readme): This package implements a fake RobotHW that receives the joint position commands, and it copies the information on the feedback fields. It is useful for debugging and simulation.

cnr_controller_interfaces (readme)

The metapackage is built by five packages:

  1. cnr_controller_interface (readme): this package is fully compatible with ros_control. It implements a template derived by ::controller_interface::Controller< T > (link). The class implements some useful functionalities:

    1. It Integrates a diagnostics module, to track the times of the read/write and update functions
    2. It provides tracking of the state of the class, and it reacts in case of error
    3. It provides a ros::CallbackQueue to control the flow of the topics managed by the controller
    4. It integrates a logger module that tracks the input and outputs of the function and generates a log file for the class.
  2. cnr_controller_manager_interface (readme): this package is fully compatible with ros_control. The package is a set of utilities to load/unload start and stop the controller. The controllers namespace are constrained to couple the controllers parameters with the proper hardware_interface parameter.

cnr_configuration_manager (readme)

The core of the extension is the cnr_configuration_manager (readme).

The node has been designed to allow a dynamic configuration of the controller architecture.

First, it allows the dynamic loading/unloading of many RobotHW in parallel encapsulating each RobotHW in a different nodelet. Then, it allows the loading/unloading and start/stop of all the different controllers needed.

The configuration is done through a proper YAML file, and it is possible to dynamically switch between many different configurations.

Example of configuration

A collection of Matlab scripts useful for the...

Dependencies

Example to download

Developer Contact

Authors:

Software License Agreement (BSD License) Copyright (c) 2020, National Research Council of Italy, Institute of Intelligent Industrial Technologies and Systems for Advanced Manufacturing All rights reserved.

Acknowledge

EC-H2020 This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 820807. This website reflects only the author’s view and the European Commission is not responsible for any use that may be made of the information it contains.
EC-H2020 ShareWork webpage