From 0594b963685f30d844ad44e164d400fd8c50db70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D1=82=D0=B0=D0=BB=D0=B8=D0=B9=20=D0=91=D0=BE?= =?UTF-8?q?=D0=BD=D0=B4=D0=B0=D1=80=D1=8C?= Date: Fri, 5 Jun 2020 18:06:53 +0300 Subject: [PATCH] Add tf pointers initialization --- src/nodelets/obstacles_detection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nodelets/obstacles_detection.cpp b/src/nodelets/obstacles_detection.cpp index d0d5f01b..fbfbb3fc 100644 --- a/src/nodelets/obstacles_detection.cpp +++ b/src/nodelets/obstacles_detection.cpp @@ -75,6 +75,9 @@ ObstaclesDetection::ObstaclesDetection(const rclcpp::NodeOptions & options) : grid_.parseParameters(gridParameters); + tfBuffer_ = std::make_shared< tf2_ros::Buffer >(this->get_clock()); + tfListener_ = std::make_shared< tf2_ros::TransformListener >(*tfBuffer_); + cloudSub_ = create_subscription("cloud", rclcpp::SensorDataQoS(), std::bind(&ObstaclesDetection::callback, this, std::placeholders::_1)); groundPub_ = create_publisher("ground", 1);