mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-03 16:27:46 +08:00
Merge pull request #426 from blacksoul000/ros2
Add tf pointers initialization
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user