|
TinyRobotics
|
Manages a hierarchy of 2D coordinate frames and enables SE(2) transforms and GPS conversion. More...
#include <FrameMgr2D.h>

Public Member Functions | |
| void | setGPS (Frame2D &parent, const GPSCoordinate gps, float rotationDeg=90) |
| GPSCoordinate | toGPS (const Frame2D &frame) const |
| Converts a local frame to a GPS coordinate. | |
| Transform2D | getTransform (const Frame2D &from, const Frame2D &to) const |
| Computes the transform from one frame to another using SE(2) math. | |
Protected Member Functions | |
| std::vector< const Frame2D * > | getPathToRoot (const Frame2D &frame) const |
| Returns the path from the given frame up to the root (including self). The path is verly small, so no special optimizations are needed. | |
Protected Attributes | |
| Frame2D * | p_gpsParent = nullptr |
| GPSCoordinate | gpsCoordinate |
| float | gpsRotationDeg |
Manages a hierarchy of 2D coordinate frames and enables SE(2) transforms and GPS conversion.
FrameMgr2D is designed for robotics and navigation applications where multiple coordinate frames (such as world, robot base, and sensors) must be related and transformed. It supports:
Typical usage:
Example:
This class is suitable for embedded and desktop robotics systems that require flexible, hierarchical frame management and integration with GPS.
|
inline |
Computes the transform from one frame to another using SE(2) math.
| from | The starting frame. |
| to | The target frame. |
|
inline |
Defines the GPI coordinate for the indicated parent frame. The GPS coordinate is assumed to be facing north (90 degrees) by default, but a different rotation can be specified if needed.