Skip to main content

Module geometry

Module geometry 

Source
Expand description

std/geometry/v1 — rigid-body quantities (§24.3).

Six types, all Struct compositions of Float64 scalars, all mirroring their geometry_msgs counterpart field for field so astrs-ros2 bridges them by column name rather than by translation table.

TypeLayout
Vector3{x, y, z}
Quaternion{x, y, z, w} — scalar last, the ROS 2 and Eigen order
Pose{position: Vector3, orientation: Quaternion}
Transform{translation: Vector3, rotation: Quaternion}
Twist{linear: Vector3, angular: Vector3}
Accel{linear: Vector3, angular: Vector3}

Twist and Accel are byte-identical: a velocity and an acceleration have the same shape, and only the URN says which one a port carries. That is deliberate — it is also why astrs-data’s reverse lookup refuses to guess a URN from a compound layout.

§Examples

use astrs_node_api::message::{AstrsMessage, Pose, Quaternion, Vector3};

let pose = Pose::new(Vector3::new(1.0, 2.0, 3.0), Quaternion::identity());
let batch = pose.to_record_batch()?;
assert_eq!(Pose::from_record_batch(&batch)?, pose);
assert!(pose.orientation.is_normalized(1e-9));

Structs§

Accel
An acceleration — std/geometry/v1/Accel.
Pose
A position and an orientation — std/geometry/v1/Pose.
Quaternion
A rotation — std/geometry/v1/Quaternion, stored xyzw (scalar last).
Transform
A rigid-body transform — std/geometry/v1/Transform.
Twist
A velocity — std/geometry/v1/Twist.
Vector3
A three-component vector — std/geometry/v1/Vector3.