-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent handling of registered InterfaceManagers in InterfaceManager #452
Comments
Hi,
Have you tried implementing this, do you have an estimate of the size of
the changeset?
Also, could you please elaborate a little more on potential use cases?
Ideally we'd want changes to be binary compatible as well.
…On Fri, 8 May 2020, 14:42 RobertWilbrandt, ***@***.***> wrote:
Currently, the hardware_interface::InterfaceManager
<https://github.com/ros-controls/ros_control/blob/melodic-devel/hardware_interface/include/hardware_interface/internal/interface_manager.h>
class allows to either register either interfaces directly or sub-
InterfaceManagers (afaik only used for combined_robot_hw in this repo).
But while the get<InterfaceType>() uses the registered InterfaceManagers
in order to find a valid interface/Resourcemanager, the getNames() and
getInterfaceResources() ignore them completely. Because of this, when you
use a RobotHW which registered another InterfaceManager, you cannot use
it in a combined_robot_hw (the filter-routines don't know about the
'transitively-registered' interfaces).
While it is probably not too tragic that you cannot use a
combined_robot_hw inside another combined_robot_hw, i had some siuations
where using registerInterfaceManager() would have been quite handy
(mostly wrapping existing ros-control drivers to be loadable in a
combined_robot_hw). The current state also seems pretty inconsistent to
me, which is why i want to create a PR to handle all transitively
registered interfaces consistently.
Because i don't know too much about other ros-control parts, i created
this issue first before providing a PR myself. As far as i can tell this
shouldn't break things inside ros_control, but please tell if this doesn't
work for some reason.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#452>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA24PYKP3QJPW2BSAY6GEWLRQQD3XANCNFSM4M4FX62A>
.
|
Hey, the change should be pretty small, as it would basically would just go through the For the use cases: I worked on integrating some Probably more important then that, the current behavior doesn't seem intuitive and like the expected behavior (e.g. this function doesn't produce the correct result for a I'll have time to provide a patch in the next days, for now i am still looking at which error behaviors there currently are (example: what happens when multiple interfaces try to provide the same resource). It also seems like the doxygen doc for |
All InterfaceManager now handle registered InterfaceManagers transparently. This allows chains of multiple InterfaceManagers registered to each other to work corectly, mostly relevant for registering a manager from a combined_robot_hw RobotHW. Resolves ros-controls#452
All InterfaceManager now handle registered InterfaceManagers transparently. This allows chains of multiple InterfaceManagers registered to each other to work corectly, mostly relevant for registering a manager from a combined_robot_hw RobotHW. Resolves ros-controls#452
@RobertWilbrandt I've stumbled also on the issue of the lacking compatibility of the ros_canopen package with the combine_hw required class_loader plugin. Do you, by any chance, have a branch somewhere with your solution? This is the problematic part from the wiki where the problems start: |
@ivan140 Currently our ros_canopen adapter is only internal, i'll ask if i can share it. Basically it consists of a new RobotHW which does all of the startup code and then either uses registerInterface for all the interfaces of the ros_canopen-enclosed RobotHW (the RobotLayer class) or (after #456) just registerInterfaceManagers it. It is possible to implement this without a change to ros_canopen, but this requires a small code duplication. It is also still not a good solution (the internal control still runs at its own frequency etc), but good enough for what we needed it for. |
@RobertWilbrandt I created an issue/feature request in ros_canopen. Maybe you can add a comment there, since you're basically neighbours with the maintainers of that package. |
@bmagyar Is there something holding this back? It would be nice if |
All InterfaceManager now handle registered InterfaceManagers transparently. This allows chains of multiple InterfaceManagers registered to each other to work corectly, mostly relevant for registering a manager from a combined_robot_hw RobotHW. Resolves ros-controls#452
Resolved with merge of #456 |
All InterfaceManager now handle registered InterfaceManagers transparently. This allows chains of multiple InterfaceManagers registered to each other to work corectly, mostly relevant for registering a manager from a combined_robot_hw RobotHW. Resolves #452
FYI I also put releases out to Melodic and Noetic ;) Now we only need to wait for the next sync |
Currently, the hardware_interface::InterfaceManager class allows to either register either interfaces directly or sub-
InterfaceManager
s (afaik only used forcombined_robot_hw
in this repo). But while theget<InterfaceType>()
uses the registeredInterfaceManager
s in order to find a valid interface/Resourcemanager, thegetNames()
andgetInterfaceResources()
ignore them completely. Because of this, when you use aRobotHW
which registered anotherInterfaceManager
, you cannot use it in acombined_robot_hw
(the filter-routines don't know about the 'transitively-registered' interfaces).While it is probably not too tragic that you cannot use a
combined_robot_hw
inside anothercombined_robot_hw
, i had some siuations where usingregisterInterfaceManager()
would have been quite handy (mostly wrapping existing ros-control drivers to be loadable in acombined_robot_hw
). The current state also seems pretty inconsistent to me, which is why i want to create a PR to handle all transitively registered interfaces consistently.Because i don't know too much about other ros-control parts, i created this issue first before providing a PR myself. As far as i can tell this shouldn't break things inside ros_control, but please tell if this doesn't work for some reason.
The text was updated successfully, but these errors were encountered: