Geometry Messages
Spatial data types for positions, orientations, velocities, and coordinate transforms.
from horus import Pose2D, Pose3D, Twist, Vector3, Quaternion, TransformStamped
Pose2D
2D position and orientation — the most common pose type for ground robots.
import horus
pose = horus.Pose2D(x=1.0, y=2.0, theta=0.5) # meters, radians
| Field | Type | Unit | Description |
|---|---|---|---|
x | float | m | X position |
y | float | m | Y position |
theta | float | rad | Heading angle |
Pose3D
6-DOF pose — position + quaternion orientation.
pose = horus.Pose3D(
x=1.0, y=2.0, z=0.5,
qx=0.0, qy=0.0, qz=0.0, qw=1.0, # identity rotation
)
| Field | Type | Unit | Description |
|---|---|---|---|
x, y, z | float | m | Position |
qx, qy, qz, qw | float | — | Quaternion orientation |
Twist
6-DOF velocity — linear + angular.
twist = horus.Twist(
linear_x=0.5, linear_y=0.0, linear_z=0.0,
angular_x=0.0, angular_y=0.0, angular_z=0.3,
)
| Field | Type | Unit | Description |
|---|---|---|---|
linear_x, linear_y, linear_z | float | m/s | Linear velocity |
angular_x, angular_y, angular_z | float | rad/s | Angular velocity |
ROS2 equivalent:
geometry_msgs/msg/Twist
Vector3
3D vector for general-purpose spatial math.
v = horus.Vector3(x=1.0, y=0.0, z=0.0)
Point3
3D point (semantically distinct from Vector3 — a position, not a direction).
p = horus.Point3(x=1.0, y=2.0, z=3.0)
Quaternion
Rotation quaternion (x, y, z, w format).
q = horus.Quaternion(x=0.0, y=0.0, z=0.0, w=1.0) # identity
Accel
6-DOF acceleration.
accel = horus.Accel(
linear_x=0.0, linear_y=0.0, linear_z=9.81,
angular_x=0.0, angular_y=0.0, angular_z=0.0,
)
TransformStamped
Timestamped transform between two coordinate frames.
tf = horus.TransformStamped(
parent_frame="base_link",
child_frame="camera",
x=0.1, y=0.0, z=0.3,
qx=0.0, qy=0.0, qz=0.0, qw=1.0,
timestamp_ns=horus.timestamp_ns(),
)
PoseStamped
Timestamped pose.
ps = horus.PoseStamped(
x=1.0, y=2.0, z=0.0,
qx=0.0, qy=0.0, qz=0.0, qw=1.0,
frame_id="map",
timestamp_ns=horus.timestamp_ns(),
)
PoseWithCovariance / TwistWithCovariance
Pose or twist with uncertainty estimate (6x6 covariance matrix).
pwc = horus.PoseWithCovariance(
x=1.0, y=2.0, z=0.0,
qx=0.0, qy=0.0, qz=0.0, qw=1.0,
covariance=[0.01] * 36, # 6x6 row-major
)
See Also
- Sensor Messages — Odometry uses Pose2D + Twist
- Navigation Messages — Goals, paths, waypoints
- TransformFrame API — Coordinate frame tree
- Rust Geometry Messages — Rust equivalent