Crate velodyne_lidar
source ·Expand description
Packet data parsing and conversion for Velodyne LiDARs.
Example
use velodyne_lidar::{types::measurements::Measurement, Config};
let config = Config::new_vlp_32c_strongest();
let frame_iter =
velodyne_lidar::iter::frame_xyz_iter_from_file(config, "tests/velodyne_vlp32.pcap")?;
for frame in frame_iter {
let frame = frame?;
for firing in frame.firing_iter() {
for point in firing.point_iter() {
let point = point.as_single().unwrap();
let Measurement {
distance,
intensity,
xyz: [x, y, z],
} = point.measurement;
print!("dist: {distance}\t");
print!("int: {distance}\t");
println!("xyz: {x} {y} {z}");
}
}
}
Re-exports
pub use packet::DataPacket;
pub use packet::Packet;
pub use packet::PositionPacket;
pub use packet::ProductID;
pub use packet::ReturnMode;
pub use config::*;
Modules
- Group consecutive elements.
- Defines a set of Velodyne LiDAR configurations.
- Useful constants for Velodyne data structures and calculations.
- Iterator combinators.
- Defines Velodyne packet data structures.
- Parallel iterator combinators.
- Trait definitions.