![]() |
RaidZeroLib
Coroutine robot framework for VEX V5
|
Rigid-body transform in SE(2): translation (meters) + rotation (radians). More...
#include <Transform.hpp>
Public Member Functions | |
| constexpr | Transform () noexcept=default |
| Identity transform: zero translation, zero rotation. | |
| Transform (const Pose &initial, const Pose &final) noexcept | |
| Body-frame transform from initial to final. | |
| Transform (const Point &point, const Rotation &rotation) noexcept | |
| Constructs directly from a translation and rotation. | |
| const Point & | getPoint () const noexcept |
| Access the translation component. | |
| const Rotation & | getRotation () const noexcept |
| Access the rotation component. | |
| Length | X () const noexcept |
| X translation (meters). | |
| Length | Y () const noexcept |
| Y translation (meters). | |
| Angle | Theta () const noexcept |
| Heading delta (radians, in (-π, π]). | |
| Transform | operator+ (const Transform &rhs) const noexcept |
| SE(2) composition (apply this, then rhs). | |
| Transform | operator- () const noexcept |
| Unary inverse. | |
| bool | isApprox (const Transform &rhs) const noexcept |
| Approximate equality on both translation and rotation. | |
Rigid-body transform in SE(2): translation (meters) + rotation (radians).
Transform represents a body-frame motion: a rotation about +Z (right-handed, CCW positive, normalized to (-180, 180] degrees) and a translation expressed in the transform’s own frame when used compositionally with Pose.
Key semantics:
|
constexprdefaultnoexcept |
Identity transform: zero translation, zero rotation.
Body-frame transform from initial to final.
Translation is (final.p - initial.p) expressed in the initial local frame: (final.p - initial.p).rotateBy(-initial.R). Rotation is final.R - initial.R (normalized).
| initial | Start pose. |
| final | End pose. |
Constructs directly from a translation and rotation.
| point | Translation (meters). |
| rotation | Rotation (radians, normalized to (-π, π]). |
|
noexcept |
Access the translation component.
|
noexcept |
Access the rotation component.
|
noexcept |
Approximate equality on both translation and rotation.
Uses Point::isApprox (≤ 1e-9 m) and Rotation::isApprox (≤ 1e-9 rad).
| rhs | Other transform. |
SE(2) composition (apply this, then rhs).
Equivalent to composing via poses: Pose().transformBy(*this).transformBy(rhs) and extracting the resulting transform from identity.
| rhs | Transform to apply after this one. |
|
noexcept |
Unary inverse.
Returns the unique transform that composes with *this to yield identity. Translation is rotated by the negative rotation and negated accordingly.
|
noexcept |
Heading delta (radians, in (-π, π]).
|
noexcept |
X translation (meters).
|
noexcept |
Y translation (meters).