Skip to content

Commit

Permalink
feat(tier4_autoware_utils): add InterProcessPollingSubscriber helper …
Browse files Browse the repository at this point in the history
…factory (#7349)

Signed-off-by: Mamoru Sobue <[email protected]>
  • Loading branch information
soblin authored and KhalilSelyan committed Jul 22, 2024
1 parent 751a661 commit 1b851c8
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ namespace tier4_autoware_utils
template <typename T>
class InterProcessPollingSubscriber
{
public:
using SharedPtr = std::shared_ptr<InterProcessPollingSubscriber<T>>;
static SharedPtr create_subscription(
rclcpp::Node * node, const std::string & topic_name, const rclcpp::QoS & qos = rclcpp::QoS{1})
{
return std::make_shared<InterProcessPollingSubscriber<T>>(node, topic_name, qos);
}

private:
typename rclcpp::Subscription<T>::SharedPtr subscriber_;
typename T::SharedPtr data_;
Expand Down

0 comments on commit 1b851c8

Please sign in to comment.