Template Function rclcpp::create_subscription(rclcpp::node_interfaces::NodeParametersInterface::SharedPtr&, rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr&, const std::string&, const rclcpp::QoS&, CallbackT&&, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>&, typename MessageMemoryStrategyT::SharedPtr)
Defined in File create_subscription.hpp
Function Documentation
-
template<typename MessageT, typename CallbackT, typename AllocatorT = std::allocator<void>, typename SubscriptionT = rclcpp::Subscription<MessageT, AllocatorT>, typename MessageMemoryStrategyT = typename SubscriptionT::MessageMemoryStrategyType>
std::shared_ptr<SubscriptionT> rclcpp::create_subscription(rclcpp::node_interfaces::NodeParametersInterface::SharedPtr &node_parameters, rclcpp::node_interfaces::NodeTopicsInterface::SharedPtr &node_topics, const std::string &topic_name, const rclcpp::QoS &qos, CallbackT &&callback, const rclcpp::SubscriptionOptionsWithAllocator<AllocatorT> &options = (rclcpp::SubscriptionOptionsWithAllocator<AllocatorT>()), typename MessageMemoryStrategyT::SharedPtr msg_mem_strat = (MessageMemoryStrategyT::create_default())) Create and return a subscription of the given MessageT type.