Expand description
ROS integration — compress and decompress PointCloud2Msg using the Cloudini format.
Enable the ros feature in your Cargo.toml:
[dependencies]
cloudini = { version = "*", features = ["ros"] }§Compressing a cloud
use cloudini::ros::{CompressExt, CompressionConfig, PointCloud2Msg};
use ros_pointcloud2::points::PointXYZ;
// one line — 1 mm resolution, ZSTD compression
let compressed = cloud_msg.compress(CompressionConfig::lossy_zstd(0.001)).unwrap();
// ship `compressed` over the network or store it§Decompressing
use cloudini::ros::{CompressExt, CompressionConfig, PointCloud2Msg};
use ros_pointcloud2::points::PointXYZ;
let cloud_msg = compressed.decompress().unwrap();
// cloud_msg is a PointCloud2Msg ready for downstream processing§Re-exported types
Common ros_pointcloud2 types are re-exported here so you only need one import:
PointCloud2Msg, HeaderMsg, PointFieldMsg, TimeMsg,
FieldDatatype, CloudDimensions, Endian, Denseness.
Structs§
- Archived
Compressed Point Cloud2 - An archived
CompressedPointCloud2 - Cloud
Dimensions - Dimensions of the point cloud as width and height.
- Compressed
Point Cloud2 - The
point_cloud_interfaces/msg/CompressedPointCloud2ROS message type. - Compressed
Point Cloud2 Resolver - The resolver for an archived
CompressedPointCloud2 - Compression
Config - Controls how a
PointCloud2Msgis encoded and compressed. - Header
Msg - Represents the header of a ROS message.
- Point
Cloud2 Msg - The intermediate point cloud type.
- Point
Field Msg - Describing a point encoded in the byte buffer of a PointCloud2 message. See the official message description for more information.
- TimeMsg
- Describing a point encoded in the byte buffer of a PointCloud2 message. See the official message description for more information. Time representation for ROS messages.
Enums§
- Denseness
- Density flag for the message. Writing sparse point clouds is not supported.
- Endian
- Endianess encoding hint for the message.
- Field
Datatype - Datatypes from the
PointFieldMsg.
Traits§
- Compress
Ext - Extension trait that adds
.compress()directly toPointCloud2Msg.