move interfaces into hardware_interface package#1
Conversation
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
destogl
left a comment
There was a problem hiding this comment.
Hi Karsten,
This looks excellent, we got full flexibility and small include footprint! Thnks!
Before merging, I would like to fix the interfaces.
In your proposal, which class has a role of the "Container" which manages everything? Also how should hardware be loaded, or should hardware implement SensorInterface, ActuatorInterfce and SensorInterface directly?
hardware_interface/include/hardware_interface/component_interfaces/actuator_interface.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/component_interfaces/actuator_interface.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/component_interfaces/sensor_interface.hpp
Show resolved
Hide resolved
|
Just went through your comments again. As for claiming resources, I am not sure that each individual package should take care of this. I'd rather have this at a central place (possibly the hardware interface) which manages all resources "globally". |
|
My observation regarding managing claims in each actuator is following: CONS:
PROS:
|
|
Thanks for the fast answer. I also added a few comments and the only question is, if we extent the final classes with some shared functionality... |
hardware_interface/include/hardware_interface/component_interfaces/actuator_interface.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/component_interfaces/system_interface.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/utils/component_parser.hpp
Show resolved
Hide resolved
These two points are pretty important for me and I think it's the right approach. That would also go along with the discussion about using InterfaceValues in these interfaces. |
|
I was thinking about the resource claiming a bit more. I haven't had time to prototype it, but essentially I'd like to implement a central resource manager within the hardware interface package. Each individual component (a single actuator, a single sensor or a complete system) has to implement a function in the style of All that resource claiming would be specific to the actuators though. I don't really see a point of claiming a sensor resource. What do you think? |
I agree completely, this is only an issue when writing variables.
I imagined that each component has/posses it’s resources and it is therefore responsible for it. My idea was that only through components hardware can be accessed. Nevertheless, I understand and agree with you on this. We can have one Ressource manager who takes care about that.
To my knowledge, it is the same if we use some kind of complex objects (e.g. maps) or vectors/arrays of doubles since we are just passing pointers to them. Am I right on this? If so I would rather provide more data and than users can decide if and how they use them. |
|
To summarize. The main open questions are:
And TODO:
|
That is still true. The actual communication with the hardware is done through the components. The resource management is just purely virtual within the hardware interface. I don't think that a component should know much about its peers. |
I meant actually, that actuators are only managing resources. Nevertheless this is not the issue currently. I will merge this until Monday so we can continue to work on the one stream of code. I hope this is ok with you :) |
I am sorry, this change is pretty brutal, but I feel it makes more sense like this.
= 0)cpplintand test failures in the component parser.