-
Notifications
You must be signed in to change notification settings - Fork 291
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
Hardware components extension for lifecycle support #503
Hardware components extension for lifecycle support #503
Conversation
hardware_interface/include/hardware_interface/actuator_interface.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/actuator_interface.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/actuator_interface.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/types/lifecycle_state_names.hpp
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/types/lifecycle_state_names.hpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit hesitant to merge the rclcpp_lifecycle
dependency on the hardware interfaces. So far it's been a relatively lean setup with mostly leaf dependencies such as rcutils
etc. With the lifecycle nodes we get the full stack of ROS2 attached to the hardware interfaces.
Additionally, I am not sure exactly what we win by this addition. Couldn't we just emulate the lifecycle API ourselves? Looking at the current change, there's not too much leverage taken. I guess if we inherited from the lifecycle interfaces, we'd get the declarations and their implementations for free which makes the diff smaller.
1f0f806
to
a09044f
Compare
a09044f
to
e8da216
Compare
@Karsten1987, @bmagyar this is ready for (harsh) review :D |
hardware_interface/include/hardware_interface/actuator_interface.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/sensor_interface.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/system_interface.hpp
Outdated
Show resolved
Hide resolved
hardware_interface/include/hardware_interface/sensor_interface.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
PR 503 changes a bunch of stuff. ros-controls/ros2_control#503 `ros2_control` distro `hardware_interface` package dropped the `hardware_interface/base_interface.hpp` header. Notes say to replace `hardware_interface::BaseInterface<hardware_interface::SystemInterface>` with `hardware_interface::SystemInterface` In file included from [...]/hal_ros_control/hal_hw_interface/src/hal_system_interface.cpp:39: [...]/hal_ros_control/hal_hw_interface/include/hal_hw_interface/hal_system_interface.hpp:48:10: fatal error: hardware_interface/base_interface.hpp: No such file or directory 48 | #include "hardware_interface/base_interface.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/hal_system_interface.dir/build.make:76: CMakeFiles/hal_system_interface.dir/src/hal_system_interface.cpp.o] Error 1 Notes also say to rename `configure()` to `on_init()` and change return type to `CallbackReturn`. Replace `on_init()` `return_type::ERROR` with `CallbackReturn::ERROR`.
PR 503 changes a bunch of stuff. ros-controls/ros2_control#503 `ros2_control` distro `hardware_interface` package dropped the `hardware_interface/base_interface.hpp` header. Notes say to replace `hardware_interface::BaseInterface<hardware_interface::SystemInterface>` with `hardware_interface::SystemInterface` In file included from [...]/hal_ros_control/hal_hw_interface/src/hal_system_interface.cpp:39: [...]/hal_ros_control/hal_hw_interface/include/hal_hw_interface/hal_system_interface.hpp:48:10: fatal error: hardware_interface/base_interface.hpp: No such file or directory 48 | #include "hardware_interface/base_interface.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. gmake[2]: *** [CMakeFiles/hal_system_interface.dir/build.make:76: CMakeFiles/hal_system_interface.dir/src/hal_system_interface.cpp.o] Error 1 Notes also say to rename `configure()` to `on_init()` and change return type to `CallbackReturn`. Replace `on_init()` `return_type::ERROR` with `CallbackReturn::ERROR`.
This is proposal for #107 (check the last tree comments there also).
Compoentns are now using the same structre as controller for the lifecycle.