ros2_controllers
ros2_controllers copied to clipboard
Few toughts on simplifying controllers (JTC, admittance,...) that use position, velocity and acceleration interfaces (and combinations of those)
There is a quite a bunch of same code and logic needed in those controllers. We could add an abstraction layer to it. Here is a short proposal on this:
- Adding
KinematicsControllerBaseabstraction layer and header-file-only class taking care about:- available interfaces and their management from configure method (e.g. this part of JTC)
- reading from hardware (see
read_state_from_hardware(JointTrajectoryPoint & state)method) - writing commands to hardware by abstracting logic about existing interfaces from here
Open questions about realization:
- naming: IMO, the therm "Kinematics" describes these interfaces. Any other ideas?
- Communication with controllers using JointTrajectoryPoint message?
- Should this class be part of the
joint_trajectory_controllerpackage? PROS: part of this repository; almost everyone is having JTC installed CONS: other controllers will depend onjoint_trajectory_controllerpackage - Should this class be placed into
controller_interface/helpers.hppfile? PROS: the package is already dependency of all controllers CONS: controllers logic is placed intoros2_controlrepository - Adding a new package with abstractions/helper functionalities here? PROS: clean dependency tree and all logic inside the same repository. CONS: additional package