RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
rz::Twist Class Reference

Differential motion (twist) in SE(2) space. More...

#include <Twist.hpp>

Public Member Functions

 Twist (Length dx, Length dy, Angle dtheta) noexcept
 Constructs a twist with translational and rotational components.
Length dX () const noexcept
 Differential translation along X.
Length dY () const noexcept
 Differential translation along Y.
Angle dTheta () const noexcept
 Differential rotation about +Z (right-handed, CCW positive).
bool isApprox (const Twist &rhs) const noexcept
 Approximate equality check with tight tolerance.

Detailed Description

Differential motion (twist) in SE(2) space.

Twist represents an infinitesimal rigid-body motion consisting of translational displacements dX, dY (in meters) and a rotational displacement dTheta (in radians). It is typically used with the SE(2) exponential and logarithmic maps (Pose::exp, Pose::log) to integrate or extract small motions between poses.

All angular quantities are normalized to (-180, 180] degrees.

Constructor & Destructor Documentation

◆ Twist()

rz::Twist::Twist ( Length dx,
Length dy,
Angle dtheta )
noexcept

Constructs a twist with translational and rotational components.

Parameters
dxTranslational displacement along the X-axis (meters).
dyTranslational displacement along the Y-axis (meters).
dthetaRotational displacement (radians).

Member Function Documentation

◆ dTheta()

Angle rz::Twist::dTheta ( ) const
noexcept

Differential rotation about +Z (right-handed, CCW positive).

Returns
Angular displacement in radians, normalized to (-π, π].

◆ dX()

Length rz::Twist::dX ( ) const
noexcept

Differential translation along X.

Returns
Displacement in meters.

◆ dY()

Length rz::Twist::dY ( ) const
noexcept

Differential translation along Y.

Returns
Displacement in meters.

◆ isApprox()

bool rz::Twist::isApprox ( const Twist & rhs) const
noexcept

Approximate equality check with tight tolerance.

Compares translational and rotational components with a tolerance of ~1e-9 m and ~1e-9 rad respectively, using Point::isApprox and Rotation::isApprox.

Parameters
rhsTwist to compare with.
Returns
true if both translations and rotation are approximately equal.

The documentation for this class was generated from the following file: