From 97a007f08645d96527a7e22abffeecd66a62563f Mon Sep 17 00:00:00 2001 From: Shubham <52372631+skpawar1305@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:59:11 +0100 Subject: [PATCH] webots_ros2_control: remove usage of deprecated activate_all_components for humble (#901) https://github.com/ros-controls/ros2_control/pull/1064 --- webots_ros2_control/src/Ros2Control.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/webots_ros2_control/src/Ros2Control.cpp b/webots_ros2_control/src/Ros2Control.cpp index 329bdedc0..94694a5fe 100644 --- a/webots_ros2_control/src/Ros2Control.cpp +++ b/webots_ros2_control/src/Ros2Control.cpp @@ -90,16 +90,10 @@ namespace webots_ros2_control { webotsSystem->init(mNode, controlHardware[i]); resourceManager->import_component(std::move(webotsSystem), controlHardware[i]); -// Configure and activate all components -// Necessary hotfix for deprecation of component activation present in "hardware_interface" package for versions above 3.15 -// (#793) -#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 15 + // Configure and activate all components using lifecycle_msgs::msg::State; rclcpp_lifecycle::State active_state(State::PRIMARY_STATE_ACTIVE, hardware_interface::lifecycle_state_names::ACTIVE); resourceManager->set_component_state(controlHardware[i].name, active_state); -#else - resourceManager->activate_all_components(); -#endif resourceManager->load_urdf(urdfString, false, false); }