|
TinyRobotics
|
Represents a 2D rigid body transform (SE(2)): translation and rotation. More...
#include <FrameMgr2D.h>

Public Member Functions | |
| Transform2D (float x, float y, float heading_deg) | |
| Transform2D (const Coordinate< DistanceM > &coord, float heading_deg) | |
| float | getHeading (AngleUnit unit) const |
| Get heading in specified unit (degrees or radians) | |
| Coordinate< DistanceM > | apply (const Coordinate< DistanceM > &local) const |
| Applies this transform to a local coordinate, returning the coordinate in the global frame. The local coordinate is first rotated by the heading, then translated by the position of this transform. | |
| Transform2D | operator* (const Transform2D &other) const |
| Compose this transform with another (this * other). Applies this transform, then the other. | |
| Transform2D | inverse () const |
| Invert this transform. | |
Public Attributes | |
| Coordinate< DistanceM > | pos |
| Position (x, y) in meters. | |
| float | heading_deg |
| Heading in degrees (0 = x axis) | |
Represents a 2D rigid body transform (SE(2)): translation and rotation.
Transform2D models a pose in 2D space, consisting of a translation (x, y) in meters and a heading (rotation) in degrees. It supports:
The heading is in degrees, where 0 means facing along the positive x-axis, and positive values rotate counterclockwise (e.g., 90 degrees is along the positive y-axis).
Typical usage:
Example: