Skip to content

Commit 7ef1089

Browse files
authored
feat(tier4_autoware_utils): add InterProcessPollingSubscriber helper factory (#7349)
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
1 parent ddce1de commit 7ef1089

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

common/tier4_autoware_utils/include/tier4_autoware_utils/ros/polling_subscriber.hpp

+8
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ namespace tier4_autoware_utils
2727
template <typename T>
2828
class InterProcessPollingSubscriber
2929
{
30+
public:
31+
using SharedPtr = std::shared_ptr<InterProcessPollingSubscriber<T>>;
32+
static SharedPtr create_subscription(
33+
rclcpp::Node * node, const std::string & topic_name, const rclcpp::QoS & qos = rclcpp::QoS{1})
34+
{
35+
return std::make_shared<InterProcessPollingSubscriber<T>>(node, topic_name, qos);
36+
}
37+
3038
private:
3139
typename rclcpp::Subscription<T>::SharedPtr subscriber_;
3240
typename T::SharedPtr data_;

0 commit comments

Comments
 (0)