Add tf pointers initialization

This commit is contained in:
Виталий Бондарь
2020-06-05 18:06:53 +03:00
parent 60cdacdba9
commit 0594b96368
+3
View File
@@ -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<sensor_msgs::msg::PointCloud2>("cloud", rclcpp::SensorDataQoS(), std::bind(&ObstaclesDetection::callback, this, std::placeholders::_1));
groundPub_ = create_publisher<sensor_msgs::msg::PointCloud2>("ground", 1);