pub struct Range {
pub radiation_type: u8,
pub field_of_view: f32,
pub min_range: f32,
pub max_range: f32,
pub range: f32,
}Expand description
A single-beam distance reading — std/sensor/v1/Range.
Fields§
§radiation_type: u8The radiation type, matching sensor_msgs/Range (0 ultrasound,
1 infrared).
field_of_view: f32The beam’s field of view, in radians.
min_range: f32The smallest range the device can report, in metres.
max_range: f32The largest range the device can report, in metres.
range: f32The reading, in metres.
Implementations§
Trait Implementations§
Source§impl AstrsMessage for Range
impl AstrsMessage for Range
Source§const URN: &'static str = "std/sensor/v1/Range"
const URN: &'static str = "std/sensor/v1/Range"
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 moreimpl Copy for Range
Source§impl FromPayload for Range
impl FromPayload for Range
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 Range
Auto Trait Implementations§
impl Freeze for Range
impl RefUnwindSafe for Range
impl Send for Range
impl Sync for Range
impl Unpin for Range
impl UnsafeUnpin for Range
impl UnwindSafe for Range
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