Skip to content

Commit

Permalink
enable passing rclcpp::QoS w/ srv introspection
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Chen <[email protected]>
  • Loading branch information
ihasdapie committed Aug 9, 2022
1 parent cdadf7b commit 802c351
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions rclcpp/include/rclcpp/create_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,16 @@ typename rclcpp::Service<ServiceT>::SharedPtr
create_service(
std::shared_ptr<node_interfaces::NodeBaseInterface> node_base,
std::shared_ptr<node_interfaces::NodeServicesInterface> node_services,
std::shared_ptr<node_interfaces::NodeClockInterface> node_clock,
const std::string & service_name,
CallbackT && callback,
const rclcpp::QoS & qos,
rclcpp::CallbackGroup::SharedPtr group)
rclcpp::CallbackGroup::SharedPtr group,
bool enable_service_introspection)
{
return create_service<ServiceT, CallbackT>(
node_base, node_services, service_name,
std::forward<CallbackT>(callback), qos.get_rmw_qos_profile(), group);
node_base, node_services, node_clock, service_name, std::forward<CallbackT>(callback),
qos.get_rmw_qos_profile(), group, enable_service_introspection);
}


Expand Down
4 changes: 3 additions & 1 deletion rclcpp/include/rclcpp/node_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,12 @@ Node::create_service(
return rclcpp::create_service<ServiceT, CallbackT>(
node_base_,
node_services_,
node_clock_,
extend_name_with_sub_namespace(service_name, this->get_sub_namespace()),
std::forward<CallbackT>(callback),
qos,
group);
group,
node_options_.enable_service_introspection());
}

template<typename ServiceT, typename CallbackT>
Expand Down

0 comments on commit 802c351

Please sign in to comment.