Function publish_points_as_pointcloud

Function Documentation

void publish_points_as_pointcloud(const rclcpp::Publisher<sensor_msgs::msg::PointCloud2>::SharedPtr &publisher, const std_msgs::msg::Header &common_header, const std::vector<std::pair<float, float>> &points)

Publishes points as a PointCloud2 message.

Parameters:
  • publisher – Publisher for the PointCloud2 message

  • common_header – Header for the PointCloud2 message

  • points – Vector of points to publish as vector of pairs