Skip to main content

Module sensor

Module sensor 

Source
Expand description

std/sensor/v1 — raw sensor frames (§24.3).

TypeLayout
LaserScanseven Float32 scalars plus ranges/intensities as List<Float32>
Imuorientation, angular velocity and linear acceleration, each with a Float64[9] covariance
NavSatFixa GNSS fix with a Float64[9] position covariance
Rangea single-beam distance reading
PointCloudStruct{<name>: List<Float32>, …}, structure-of-arrays over fields=

PointCloud’s layout depends on its URN parameter, so it carries the field names as data and exposes PointCloud::urn rather than a const URN; the other four implement AstrsMessage directly.

§Examples

use astrs_node_api::message::{AstrsMessage, Imu, PointCloud, Vector3};

let imu = Imu::from_readings(
    Default::default(),
    Vector3::new(0.0, 0.0, 0.1),
    Vector3::new(0.0, 0.0, -9.81),
);
assert_eq!(Imu::from_record_batch(&imu.to_record_batch()?)?, imu);

let cloud = PointCloud::from_columns(vec![
    ("x".to_owned(), vec![1.0, 2.0]),
    ("y".to_owned(), vec![0.0, 0.5]),
])?;
assert_eq!(cloud.urn(), "std/sensor/v1/PointCloud[fields=x:y]");

Structs§

Imu
An inertial reading — std/sensor/v1/Imu.
LaserScan
A planar range sweep — std/sensor/v1/LaserScan.
NavSatFix
A GNSS fix — std/sensor/v1/NavSatFix.
PointCloud
A point set with named per-point fields — std/sensor/v1/PointCloud[fields=…], structure-of-arrays.
Range
A single-beam distance reading — std/sensor/v1/Range.

Constants§

COVARIANCE_3X3
The width of a 3x3 covariance matrix, flattened row-major.