Function Cloudini::ConvertToRosPointCloud2

Function Documentation

cloudini_ros::RosPointCloud2 Cloudini::ConvertToRosPointCloud2(const sensor_msgs::msg::PointCloud2 &msg)

Convert a sensor_msgs::msg::PointCloud2 to a cloudini_ros::RosPointCloud2.

The returned RosPointCloud2::data is a non-owning view into the input message’s data buffer. The caller must ensure the input message outlives the returned object. The cdr_header field is left at its default value intentionally.

Parameters:

msg – The PointCloud2 message to convert

Returns:

A RosPointCloud2 referencing the input message’s data