pub struct LaserScan {
pub angle_min: f32,
pub angle_max: f32,
pub angle_increment: f32,
pub time_increment: f32,
pub scan_time: f32,
pub range_min: f32,
pub range_max: f32,
pub ranges: Vec<f32>,
pub intensities: Vec<f32>,
}Expand description
A planar range sweep — std/sensor/v1/LaserScan.
Fields§
§angle_min: f32The angle of the first beam, in radians.
angle_max: f32The angle of the last beam, in radians.
angle_increment: f32The angular step between beams, in radians.
time_increment: f32The time between beams, in seconds.
scan_time: f32The time the whole sweep took, in seconds.
range_min: f32The smallest range the device can report, in metres.
range_max: f32The largest range the device can report, in metres.
ranges: Vec<f32>One range per beam, in metres.
intensities: Vec<f32>One intensity per beam; empty when the device reports none.
Implementations§
Source§impl LaserScan
impl LaserScan
Sourcepub fn beam_count(&self) -> usize
pub fn beam_count(&self) -> usize
The number of beams the sweep reports.
Sourcepub fn has_intensities(&self) -> bool
pub fn has_intensities(&self) -> bool
Whether the sweep carries an intensity per beam.
Trait Implementations§
Source§impl AstrsMessage for LaserScan
impl AstrsMessage for LaserScan
Source§const URN: &'static str = "std/sensor/v1/LaserScan"
const URN: &'static str = "std/sensor/v1/LaserScan"
The type URN this message’s columnar layout is declared against
(blueprint §24.3), e.g.
"std/vision/v1/Detections".Source§fn data_type() -> DataType
fn data_type() -> DataType
The columnar layout
AstrsMessage::to_record_batch produces and
AstrsMessage::from_record_batch expects.Source§fn to_record_batch(&self) -> Result<RecordBatch>
fn to_record_batch(&self) -> Result<RecordBatch>
Encodes one message into a one-row
RecordBatch (blueprint §6.1’s
“one record batch per message”). Read moreSource§fn from_record_batch(batch: &RecordBatch) -> Result<Self>
fn from_record_batch(batch: &RecordBatch) -> Result<Self>
Decodes one message from a one-row
RecordBatch. Read moreSource§fn schema() -> Schema
fn schema() -> Schema
The single-column
Schema wrapping AstrsMessage::data_type
under crate::DATA_COLUMN (blueprint §6.1).Source§fn type_urn() -> Result<TypeUrn, TypeUrnError>
fn type_urn() -> Result<TypeUrn, TypeUrnError>
Parses
AstrsMessage::URN. Read moreSource§impl FromPayload for LaserScan
impl FromPayload for LaserScan
Source§fn from_batch(batch: &RecordBatch) -> Result<Self>
fn from_batch(batch: &RecordBatch) -> Result<Self>
Reads the value from a decoded payload batch. Read more
impl StructuralPartialEq for LaserScan
Auto Trait Implementations§
impl Freeze for LaserScan
impl RefUnwindSafe for LaserScan
impl Send for LaserScan
impl Sync for LaserScan
impl Unpin for LaserScan
impl UnsafeUnpin for LaserScan
impl UnwindSafe for LaserScan
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more