Skip to content

CNR-STIIMA-IRAS/remapping_controller

Repository files navigation

Remapping Controller

A ROS 2 controller that remaps a set of input hardware interfaces to a new set of output interfaces.

Overview

The remapping_controller is a standard ROS 2 controller built on top of the ros2_control framework. It allows you to remap hardware interfaces from one set to another, enabling flexible hardware abstraction and interface composition without modifying underlying hardware drivers.

Features

  • Interface Remapping: Map input interfaces to output interfaces with arbitrary naming conventions
  • ROS 2 Control Integration: Fully compatible with ros2_control controller manager
  • Parameter-Based Configuration: Configure remapping through YAML parameters
  • Runtime Support: Load and unload dynamically using standard ros2_control tools

Dependencies

  • ROS 2: Humble or later
  • ros2_control: Core control framework
  • controller_interface: Controller base classes
  • hardware_interface: Hardware interface definitions

Installation

  1. Clone the repository into your ROS 2 workspace:

    cd ~/ros2_ws/src
    git clone <repository_url>
  2. Build the package:

    cd ~/ros2_ws
    colcon build --packages-select remapping_controller
  3. Source the workspace:

    source install/setup.bash

Configuration

Configure the controller using the YAML parameter file. See remapping_controller_parameter.yaml for available parameters.

Example configuration in your robot's controller config file:

controller_manager:
  ros__parameters:
    update_rate: 100
    use_sim_time: false

remapping_controller:
  ros__parameters:
    # Controller configuration loaded from remapping_controller_parameter.yaml

Usage

Load the Controller

Use the ros2_control controller manager to load the remapping controller:

ros2 control load_controller remapping_controller

Activate the Controller

ros2 control switch_controllers --activate remapping_controller

Deactivate the Controller

ros2 control switch_controllers --deactivate remapping_controller

Parameters

All parameters are defined in remapping_controller_parameter.yaml. Refer to that file for detailed parameter descriptions and configuration options.

License

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

Contributing

Contributions are welcome! Please follow the ROS 2 code style guidelines and ensure all tests pass before submitting a pull request.

About

This controller is a chainable controller that allows to remap input interfaces into a new set of names. It can be useful to remap standard interfaces of the Trajectory Controller to ad-hoc interfaces of the hardware.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors