Skip to content
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

Merged
merged 21 commits into from
Sep 29, 2021

Conversation

destogl
Copy link
Member

@destogl destogl commented Aug 26, 2021

This is proposal for #107 (check the last tree comments there also).

Compoentns are now using the same structre as controller for the lifecycle.

@destogl destogl self-assigned this Aug 26, 2021
@destogl destogl changed the title Proposal for new structure of hardware components supporting lifecycle Hardware components extension for lifecycle support Aug 27, 2021
Copy link
Contributor

@Karsten1987 Karsten1987 left a 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.

@destogl destogl force-pushed the hw-lifecyle-actuator-proposal branch 2 times, most recently from 1f0f806 to a09044f Compare September 6, 2021 17:01
@destogl destogl force-pushed the hw-lifecyle-actuator-proposal branch from a09044f to e8da216 Compare September 7, 2021 08:21
@destogl
Copy link
Member Author

destogl commented Sep 7, 2021

@Karsten1987, @bmagyar this is ready for (harsh) review :D

hardware_interface/include/hardware_interface/system.hpp Outdated Show resolved Hide resolved
hardware_interface/src/sensor.cpp Outdated Show resolved Hide resolved
hardware_interface/src/system.cpp Outdated Show resolved Hide resolved
Co-authored-by: Bence Magyar <bence.magyar.robotics@gmail.com>
@bmagyar bmagyar merged commit 11948ed into ros-controls:master Sep 29, 2021
@destogl destogl deleted the hw-lifecyle-actuator-proposal branch September 29, 2021 12:22
zultron added a commit to zultron/hal_ros_control that referenced this pull request Apr 10, 2023
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`.
zultron added a commit to zultron/hal_ros_control that referenced this pull request Apr 14, 2023
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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants