-
Notifications
You must be signed in to change notification settings - Fork 372
Description
Describe the bug
HardwareComponentInterface::read is purely virtual while HardwareComponentInterface::write has a default implementation returning OK. This is inconsistent, as both should either be unimplemented or default to OK.
By the current design, an ActuatorInterface has to implement read, while a SensorInterface does not have to implement a write. In fact, SensorInterface::write overrides HardwareComponentInterface::write with the exact same behaviour of return return_type::OK;.
To Reproduce
Steps to reproduce the behavior:
- implement a
ActuatorInterface - you have to implement a
ActuatorInterface::readthat does nothing
Expected behavior
HardwareComponentInterface::read and HardwareComponentInterface::write should both be either be purely virtual or default implemented. ActuatorInterface::read should be default implemented either via HardwareComponentInterface::read if this has a default implementation, or by a custom default implementation similar to SensorInterface::write.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: Ubuntu
- Version jazzy
Additional context
Add any other context about the problem here, especially include any modifications to ros2_control that relate to this issue.