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

Represents a 2D coordinate frame in a hierarchical frame tree. More...

#include <FrameMgr2D.h>

Collaboration diagram for Frame2D:
Collaboration graph
[legend]

Public Member Functions

 Frame2D (FrameType type, uint8_t idx=0)
 
 Frame2D (FrameType type, uint8_t idx, Frame2D &parent)
 
 Frame2D (FrameType type, uint8_t idx, Frame2D &parent, const Transform2D &tf)
 
bool operator== (const Frame2D &o) const
 
FrameType getType () const
 
uint8_t getIndex () const
 
const Frame2DgetParent () const
 
void setParent (Frame2D &parent)
 
const Transform2DgetTransform () const
 
Transform2DgetTransform ()
 
void setTransform (const Transform2D &transform)
 

Protected Attributes

FrameType type
 
uint8_t index = 0
 
Frame2Dp_parent = nullptr
 
Transform2D tf
 

Detailed Description

Represents a 2D coordinate frame in a hierarchical frame tree.

Frame2D models a reference frame in 2D space, such as a robot base, sensor, or world frame. Each frame can have a parent frame, forming a tree structure for managing relative poses. The pose of the frame relative to its parent is described by a Transform2D (translation and heading).

Features:

Typical usage:

Example:

Frame2D base(FrameType::BASE, 0, world, Transform2D(1.0, 2.0, 45));
Frame2D lidar(FrameType::SENSOR, 0, base, Transform2D(0.2, 0.0, 0));
Represents a 2D rigid body transform (SE(2)): translation and rotation.
Definition: FrameMgr2D.h:42
@ WORLD
World/global reference frame (fixed, absolute)
@ BASE
Robot or vehicle base frame (body frame)
Represents a 2D coordinate frame in a hierarchical frame tree.
Definition: FrameMgr2D.h:130

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