pcd-rs
allows you to parse PCD point cloud data from a file 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 = "*"
```rust use failure::Fallible; use pcd_rs::{PCDRecord, SeqReaderBuilder}; use std::path::Path;
pub struct Point { x: f32, y: f32, z: f32, timestamp: u32, }
fn loadbinary() -> Fallible<()> {
let path = Path::new("testfiles/binary.pcd");
let reader = SeqReaderBuilder::openpath(path)?;
let points = reader.collect::
You may visit tests directory for more examples.