pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter

Repository Summary

Description ROS 2 type adapter for pcl
Checkout URI https://github.com/ouxt-polaris/pcl_type_adapter.git
VCS Type git
VCS Version master
Last Updated 2025-01-19
Dev Status UNKNOWN
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
pcl_type_adapter 0.1.0

README

pcl_type_adapter

ROS 2 package of type adapter for transferring point clouds via zero-copy communication.

How to use.

Publish pointcloud

class PubNode : public rclcpp::Node
{
public:
  using AdaptedType = rclcpp::TypeAdapter<pcl::PointCloud::PointXYZ::Ptr, sensor_msgs::msg::PointCloud2>;
  explicit PubNode(const rclcpp::NodeOptions & options) : Node("test", options)
  {
    publisher_ = create_publisher<AdaptedType>("pointcloud", 1);
  }
  void publish(const pcl::PointCloud::PointXYZ::Ptr & point_cloud) { publisher_->publish(point_cloud); }

private:
  std::shared_ptr<rclcpp::Publisher<AdaptedType>> publisher_;
};

Subscribe pointcloud

class SubNode : public rclcpp::Node
{
public:
  using AdaptedType = rclcpp::TypeAdapter<pcl::PointCloud::PointXYZ::Ptr, sensor_msgs::msg::PointCloud2>;
  explicit SubNode(
    const rclcpp::NodeOptions & options)
  : Node("test", options)
  {
    subscriber_ = create_subscription<AdaptedType>("pointcloud", 1, [](const auto & pointcloud){});
  }

private:
  std::shared_ptr<rclcpp::Subscription<AdaptedType>> subscriber_;
};

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository

pcl_type_adapter repository