pcd-rs
allows you to parse PCD point cloud data from a file or a binary buffer
Add pcd-rs to your Cargo.toml
.
toml
pcd_rs = "*"
Checkout docs.rs to see detailed usage.
```rust use failure::Fallible; use pcdrs::{seqreader::SeqReaderBuilder, PCDRecordRead}; use std::path::Path;
pub struct Point { x: f32, y: f32, z: f32, rgb: f32, }
fn main() -> Fallible<()> {
let reader = SeqReaderBuilder::open("testfiles/ascii.pcd")?;
let points = reader.collect::
```rust use failure::Fallible; use pcdrs::{DataKind, seqwriter::SeqWriterBuilder, PCDRecordWrite}; use std::path::Path;
pub struct Point { x: f32, y: f32, z: f32, }
fn main() -> Fallible<()> {
let viewpoint = Default::default();
let kind = DataKind::ASCII;
let mut writer = SeqWriterBuilder::
let point = Point {
x: 3.14159,
y: 2.71828,
z: -5.0,
};
writer.push(&point)?;
Ok(())
} ```