File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ namespace webots_ros2_control {
7878 }
7979 for (unsigned int i = 0 ; i < controlHardware.size (); i++) {
8080// Necessary hotfix for renamed variables present in "hardware_interface" package for versions above 3.5 (#590)
81- #if HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5
81+ #if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5
8282 const std::string pluginName = controlHardware[i].hardware_plugin_name ;
8383 auto webotsSystem =
8484 std::unique_ptr<webots_ros2_control::Ros2ControlSystemInterface>(mHardwareLoader ->createUnmanagedInstance (pluginName));
@@ -93,7 +93,7 @@ namespace webots_ros2_control {
9393// Configure and activate all components
9494// Necessary hotfix for deprecation of component activation present in "hardware_interface" package for versions above 3.15
9595// (#793)
96- #if HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 15
96+ #if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 15
9797 using lifecycle_msgs::msg::State;
9898 rclcpp_lifecycle::State active_state (State::PRIMARY_STATE_ACTIVE, hardware_interface::lifecycle_state_names::ACTIVE);
9999 resourceManager->set_component_state (controlHardware[i].name , active_state);
You can’t perform that action at this time.
0 commit comments