pcd-rs
allows you to parse PCD point cloud data from a file,
a path, or a binary buffer. The reader implements Iterator
to
let you iterate over points with ease.
Add pcd-rs to your Cargo.toml
.
toml
pcd_rs = "~0"
```rust use failure::Fallible; use pcd_rs::SeqReaderOptions; use std::path::Path;
fn main() -> Fallible<()> { let path = Path::new("testfiles/ascii.pcd"); let reader = SeqReaderOptions::frompath(path)?;
// Get meta data
let meta = reader.meta();
// Scan all points
let points = reader.collect::<Fallible<Vec<_>>>()?;
Ok(())
} ```