ros-controls / ros-controls/ros2_controllers
Few toughts on simplifying controllers (JTC, admittance,...) that use position, velocity and acceleration interfaces (and combinations of those)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 834
- Forks
- 530
- Avg merge
- 18h 3m
- Merged PRs (30d)
- 19
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced joint_trajectory_controller.cpp sections for interface configuration, hardware state reads, and command writes, then compare controller_interface/include/controller_interface/helpers.hpp. Resolve the naming, message, package placement, and dependency questions before implementing; done requires an agreed abstraction and its adoption by the relevant controllers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- robotics
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100