A ROS 2 controller that remaps a set of input hardware interfaces to a new set of output interfaces.
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.
- Interface Remapping: Map input interfaces to output interfaces with arbitrary naming conventions
- ROS 2 Control Integration: Fully compatible with
ros2_controlcontroller manager - Parameter-Based Configuration: Configure remapping through YAML parameters
- Runtime Support: Load and unload dynamically using standard
ros2_controltools
- ROS 2: Humble or later
- ros2_control: Core control framework
- controller_interface: Controller base classes
- hardware_interface: Hardware interface definitions
-
Clone the repository into your ROS 2 workspace:
cd ~/ros2_ws/src git clone <repository_url>
-
Build the package:
cd ~/ros2_ws colcon build --packages-select remapping_controller
-
Source the workspace:
source install/setup.bash
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.yamlUse the ros2_control controller manager to load the remapping controller:
ros2 control load_controller remapping_controllerros2 control switch_controllers --activate remapping_controllerros2 control switch_controllers --deactivate remapping_controllerAll parameters are defined in remapping_controller_parameter.yaml. Refer to that file for detailed parameter descriptions and configuration options.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Contributions are welcome! Please follow the ROS 2 code style guidelines and ensure all tests pass before submitting a pull request.