TinyRobotics
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FrameMgr3D Class Reference

Manages a hierarchy of 3D coordinate frames and enables SE(3) transforms. More...

#include <FrameMgr3D.h>

Collaboration diagram for FrameMgr3D:
Collaboration graph
[legend]

Public Member Functions

Transform3D getTransform (const Frame3D &from, const Frame3D &to) const
 
void setGPS (Frame3D &gpsParent, const GPSCoordinate &gps, float rotationDeg=0.0f)
 Sets the GPS reference for a frame.
 
GPSCoordinate toGPS (const Frame3D &frame, const std::array< float, 3 > &local) const
 Converts a coordinate in the given frame to a GPS coordinate.
 

Protected Member Functions

std::vector< const Frame3D * > getPathToRoot (const Frame3D *frame) const
 

Protected Attributes

Frame3Dp_gpsParent = nullptr
 
GPSCoordinate gpsCoordinate
 
float gpsRotationDeg = 0.0f
 

Detailed Description

Manages a hierarchy of 3D coordinate frames and enables SE(3) transforms.

FrameMgr3D 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:

Example:

Frame3D world(FrameType3D::WORLD);
Frame3D base(FrameType3D::BASE_LINK, 0, &world, Transform3D{1,2,0,0,0,0,1});
Frame3D camera(FrameType3D::CAMERA, 0, &base,
Transform3D{0.1,0,0.2,0,0,0,1}); Transform3D tf = mgr.getTransform(camera,
world);
Represents a 3D coordinate frame in a hierarchical frame tree.
Definition: FrameMgr3D.h:97
Manages a hierarchy of 3D coordinate frames and enables SE(3) transforms.
Definition: FrameMgr3D.h:141
Represents a 3D rigid body transform: translation (tx, ty, tz) and quaternion rotation (qx,...
Definition: FrameMgr3D.h:18

Member Function Documentation

◆ setGPS()

void setGPS ( Frame3D gpsParent,
const GPSCoordinate gps,
float  rotationDeg = 0.0f 
)
inline

Sets the GPS reference for a frame.

Parameters
gpsParentThe frame to associate with the GPS reference.
gpsThe GPS coordinate at the origin of gpsParent.
rotationDegRotation from local x to GPS north (degrees).

◆ toGPS()

GPSCoordinate toGPS ( const Frame3D frame,
const std::array< float, 3 > &  local 
) const
inline

Converts a coordinate in the given frame to a GPS coordinate.

Parameters
frameThe frame in which the coordinate is expressed.
localThe coordinate in the local frame (meters).
Returns
The corresponding GPS coordinate.

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