File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
behaviortree_ros2/include/behaviortree_ros2 Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1919#include < string>
2020#include < rclcpp/executors.hpp>
2121#include < rclcpp/allocator/allocator_common.hpp>
22+ #include < rclcpp/version.h>
2223#include < rclcpp/qos.hpp>
2324#include " behaviortree_cpp/bt_factory.h"
2425
@@ -217,8 +218,14 @@ inline RosServiceNode<T>::ServiceClientInstance::ServiceClientInstance(
217218 node->create_callback_group (rclcpp::CallbackGroupType::MutuallyExclusive, false );
218219 callback_executor.add_callback_group (callback_group, node->get_node_base_interface ());
219220
221+ // For Jazzy and Later Support
222+ #if RCLCPP_VERSION_GTE(28, 0, 0)
220223 service_client = node->create_client <T>(service_name, rclcpp::ServicesQoS (),
221224 callback_group);
225+ #else
226+ service_client = node->create_client <T>(service_name, rmw_qos_profile_services_default,
227+ callback_group);
228+ #endif
222229}
223230
224231template <class T >
You can’t perform that action at this time.
0 commit comments