-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create ros-humble-webots-ros2-control.patch
- Loading branch information
1 parent
b908bec
commit 54b5701
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/webots_ros2_control/src/Ros2Control.cpp b/webots_ros2_control/src/Ros2Control.cpp | ||
index fca501e86..fa414b150 100644 | ||
--- a/webots_ros2_control/src/Ros2Control.cpp | ||
+++ b/webots_ros2_control/src/Ros2Control.cpp | ||
@@ -78,7 +78,7 @@ namespace webots_ros2_control { | ||
} | ||
for (unsigned int i = 0; i < controlHardware.size(); i++) { | ||
// Necessary hotfix for renamed variables present in "hardware_interface" package for versions above 3.5 (#590) | ||
-#if HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5 | ||
+#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 5 | ||
const std::string pluginName = controlHardware[i].hardware_plugin_name; | ||
auto webotsSystem = | ||
std::unique_ptr<webots_ros2_control::Ros2ControlSystemInterface>(mHardwareLoader->createUnmanagedInstance(pluginName)); | ||
@@ -93,7 +93,7 @@ namespace webots_ros2_control { | ||
// 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 >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 15 | ||
+#if HARDWARE_INTERFACE_VERSION_MAJOR >= 4 || HARDWARE_INTERFACE_VERSION_MAJOR >= 3 && HARDWARE_INTERFACE_VERSION_MINOR >= 15 | ||
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); |