pcd-rs 0.13.0

Working with PCD file format in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use eyre::Result;
use pcd_rs::{PcdDeserialize, Reader};

#[derive(PcdDeserialize)]
pub struct Point {
    pub x: f32,
    pub y: f32,
    pub z: f32,
    pub rgb: f32,
}

pub fn main() -> Result<()> {
    let reader = Reader::open("pcd-rs/test_files/ascii.pcd")?;
    let points: Result<Vec<Point>, _> = reader.collect();
    println!("{} points found", points?.len());
    Ok(())
}