bye_pcd_rs 0.12.1

Working with PCD(Point Cloud Library) file format in Rust.在Rust中处理PCD(点云库)文件格式.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use eyre::Result;
use bye_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("test_files/ascii.pcd")?;
    let points: Result<Vec<Point>, _> = reader.collect();
    println!("{} points found", points?.len());
    Ok(())
}