File tree Expand file tree Collapse file tree
behaviortree_ros2/include/behaviortree_ros2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,8 +216,12 @@ inline RosServiceNode<T>::ServiceClientInstance::ServiceClientInstance(
216216 node->create_callback_group (rclcpp::CallbackGroupType::MutuallyExclusive, false );
217217 callback_executor.add_callback_group (callback_group, node->get_node_base_interface ());
218218
219- service_client = node->create_client <T>(service_name, rclcpp::QoS (rclcpp::ServicesQoS ()),
220- callback_group);
219+ #if RCLCPP_VERSION_MAJOR >= 21 // Iron, Jazzy and later
220+ service_client = node->create_client <T>(service_name, rclcpp::QoS (rclcpp::ServicesQoS ()),
221+ callback_group);
222+ #else // Humble
223+ service_client = node->create_client <T>(service_name, rmw_qos_profile_services_default, callback_group);
224+ #endif
221225}
222226
223227template <class T >
You can’t perform that action at this time.
0 commit comments