docs.rs failed to build cloudini-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
cloudini-0.1.0
cloudini
The cloudini point cloud compression library as a Rust crate.
The crate provides Rust bindings of the original C++ library by default using the feature flag use_cpp. It requires CMake and a C++ 20 compiler to be installed. There is a Rust-only rewrite available by disabling the feature aforementioned feature (no-default-features = true).
Quickstart
Using the ros_pointcloud2 integration via the standard feature ros:
[]
= "0.2.0"
= "1.0.0-rc.3"
use ;
use PointXYZI;
let resolution = 0.001_f32; // 1 mm
// Simulate a Lidar scan
let points: =
.map
.collect;
let cloud = try_from_vec?;
let raw_size = cloud.data.len;
// Compress — 1 mm lossy + ZSTD
let compressed = cloud.compress?;
// compressed is a CompressedPointCloud2 — ship it over DDS, store to disk, etc.
assert!;
// Decompress
let restored = compressed.decompress?;
// Each float component is within resolution / 2 of the original
let tol = resolution / 2.0 + 1e-6;
let restored_points: = restored.try_into_iter?.collect;
for in points.iter.zip
Raw
You can disable the ros_pointcloud2 convenience wrapper by setting no-default-features = true and use the underlying enoder and decoder.
Encode
use ;
// Describe the point layout.
// point_step = sum of all field sizes = 4+4+4+1 = 13 bytes
let info = EncodingInfo ;
let encoder = new;
let compressed: = encoder.encode?;
// compressed is a self-contained buffer: header + chunk data
Decode
use PointcloudDecoder;
let decoder = new;
let : = decoder.decode?;
// decoded.len() == info.width * info.height * info.point_step
License
The original Cloudini library is bundled and licensed under the Apache 2 License. See ./cloudini-cpp/LICENSE.
The Rust code follows the typical dual-license model: