auki-geometry-py
Synced from the repository
This page mirrors bindings/python/auki-geometry-py/README.md in the auki-sdk repo (branch develop).
The repository is the source of truth.
PyO3 bindings for auki-geometry. Lets Python consumers compose, invert, and convert spatial transforms and frame conventions on equal footing with Rust callers.
Status: Shipped.
Surfaceβ
Math types (Vec3, Quat, SpatialTransform) cross the seam as flat float arrays β matching the robotics-team convention:
Vec3β[x, y, z]Quatβ[qx, qy, qz, qw](scalar-last, Hamilton / ROS / prost wire order)SpatialTransformβ[tx, ty, tz, qx, qy, qz, qw]
Categorical types (FrameRegistryEntry, AxisConvention, axis directions, length units, handedness) stay as dicts and strings β exactly what auki-registry-py returns.
Public functionsβ
meters_per_unit(unit)β"meters"/"centimeters"/"millimeters"β float multiplier.axis_convention_matrix(from_axes, to_axes)β 3Γ3 nested list.convention_matrix(from_entry, to_entry)β 4Γ4 nested list (axis permutation + unit scale).convert_point_convention(point, from_entry, to_entry)β 3-list (axis + unit).convert_vector_convention(vector, from_entry, to_entry)β 3-list (axis + unit).convert_direction_convention(direction, from_entry, to_entry)β 3-list (axis only, no unit scale).convert_pose_convention(pose, from_entry, to_entry)β 7-list.inverse_spatial_transform(transform)β 7-list.compose_spatial_transforms(from_to_mid, mid_to_to)β 7-list (thefromβtocomposition).relative_spatial_transform(common_to_from, common_to_to)β 7-list (thefromβtoderivation).spatial_transform_to_matrix4(pose)β 4Γ4 nested list.spatial_transform_from_matrix4(matrix)β 7-list.
Errorsβ
GeometryError(subclass ofValueError) β raised for invalid axes, handedness mismatch, or zero-length orientation quaternion.- Plain
ValueErrorβ raised for array length mismatches, non-numeric elements, or malformed registry dicts.
Depends onβ
auki-geometryβ Rust crate it wraps.auki-registry-pyβ source ofFrameRegistryEntrydicts the convention helpers consume.