-
Notifications
You must be signed in to change notification settings - Fork 81
Fix deprecated hardware_interface API #309
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
Open
christophfroehlich
wants to merge
1
commit into
Kinovarobotics:main
Choose a base branch
from
christophfroehlich:fix/API
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I also found another error when building for Jazzy along these lines: --- stderr: hardware_interface
In file included from /root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/actuator_interface.hpp:18,
from /root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/actuator.hpp:18,
from /root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/resource_manager.hpp:23,
from /root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/src/resource_manager.cpp:15:
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp: In member function ‘rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn hardware_interface::HardwareComponentInterface::init(const hardware_interface::HardwareComponentParams&)’:
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:138:23: error: ‘AsyncFunctionHandlerParams’ is not a member of ‘realtime_tools’; did you mean ‘AsyncFunctionHandler’?
138 | realtime_tools::AsyncFunctionHandlerParams async_thread_params;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| AsyncFunctionHandler
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:139:7: error: ‘async_thread_params’ was not declared in this scope
139 | async_thread_params.thread_priority = info_.async_params.thread_priority;
| ^~~~~~~~~~~~~~~~~~~
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:141:25: error: ‘AsyncSchedulingPolicy’ is not a member of ‘realtime_tools’
141 | realtime_tools::AsyncSchedulingPolicy(info_.async_params.scheduling_policy);
| ^~~~~~~~~~~~~~~~~~~~~
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp: In member function ‘void hardware_interface::HardwareComponentInterface::pause_async_operations()’:
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:892:23: error: ‘class realtime_tools::AsyncFunctionHandler<hardware_interface::return_type>’ has no member named ‘pause_execution’
892 | async_handler_->pause_execution();
| ^~~~~~~~~~~~~~~
In file included from /root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component.hpp:23,
from /root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/src/hardware_component.cpp:15:
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp: In member function ‘rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn hardware_interface::HardwareComponentInterface::init(const hardware_interface::HardwareComponentParams&)’:
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:138:23: error: ‘AsyncFunctionHandlerParams’ is not a member of ‘realtime_tools’; did you mean ‘AsyncFunctionHandler’?
138 | realtime_tools::AsyncFunctionHandlerParams async_thread_params;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| AsyncFunctionHandler
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:139:7: error: ‘async_thread_params’ was not declared in this scope
139 | async_thread_params.thread_priority = info_.async_params.thread_priority;
| ^~~~~~~~~~~~~~~~~~~
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:141:25: error: ‘AsyncSchedulingPolicy’ is not a member of ‘realtime_tools’
141 | realtime_tools::AsyncSchedulingPolicy(info_.async_params.scheduling_policy);
| ^~~~~~~~~~~~~~~~~~~~~
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp: In member function ‘void hardware_interface::HardwareComponentInterface::pause_async_operations()’:
/root/workspace/ros2_kortex_ws/src/ros2_control/hardware_interface/include/hardware_interface/hardware_component_interface.hpp:892:23: error: ‘class realtime_tools::AsyncFunctionHandler<hardware_interface::return_type>’ has no member named ‘pause_execution’
892 | async_handler_->pause_execution();
| ^~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/hardware_interface.dir/build.make:104: CMakeFiles/hardware_interface.dir/src/hardware_component.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: *** [CMakeFiles/hardware_interface.dir/build.make:90: CMakeFiles/hardware_interface.dir/src/resource_manager.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/hardware_interface.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< hardware_interface [17.3s, exited with code 2]
Aborted <<< control_toolbox [56.2s]
Aborted <<< ros_gz_bridge [2min 58s]
Summary: 18 packages finished [3min 41s]
1 package failed: hardware_interface
2 packages aborted: control_toolbox ros_gz_bridge
5 packages had stderr output: control_toolbox generate_parameter_library_example hardware_interface kortex_api ros_gz_bridge
52 packages not processed |
we released realtime_tools recently with the new asynchandler. you either have to use ros2-testing or compile realtime_tools from source |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See ros-controls/ros2_control#2323
needed for ros-controls/ros2_control#2589
Please release it to kilted and rolling, thanks :)
Note: This API is not available on humble.