selfdriving
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
mpp::PoseOrPoint Struct Reference

#include <mpp/data/SE2_KinState.h>

Public Member Functions

 PoseOrPoint ()=default
 
 ~PoseOrPoint ()=default
 
 PoseOrPoint (const mrpt::math::TPoint2D &p)
 
 PoseOrPoint (const mrpt::math::TPose2D &p)
 
bool isEmpty () const
 
bool isPose () const
 
bool isPoint () const
 
const mrpt::math::TPose2D & pose () const
 
const mrpt::math::TPoint2D & point () const
 
std::string asString () const
 

Static Public Member Functions

static PoseOrPoint FromString (const std::string &s)
 

Private Attributes

std::variant< std::monostate, mrpt::math::TPose2D, mrpt::math::TPoint2D > data_
 

Detailed Description

Variant wrapper holding a SE(2) pose, a R(2) (2D) point, or none (default). It is used to provide a goal or waypoint state, when the heading is not important and the user only wants to specify the (x,y) coordinates of the 2D point.

Constructor & Destructor Documentation

◆ PoseOrPoint() [1/3]

mpp::PoseOrPoint::PoseOrPoint ( )
default

◆ ~PoseOrPoint()

mpp::PoseOrPoint::~PoseOrPoint ( )
default

◆ PoseOrPoint() [2/3]

mpp::PoseOrPoint::PoseOrPoint ( const mrpt::math::TPoint2D &  p)
inline

◆ PoseOrPoint() [3/3]

mpp::PoseOrPoint::PoseOrPoint ( const mrpt::math::TPose2D &  p)
inline

Member Function Documentation

◆ asString()

std::string mpp::PoseOrPoint::asString ( ) const

◆ FromString()

static PoseOrPoint mpp::PoseOrPoint::FromString ( const std::string &  s)
static

Returns a point or a pose depending on the input string having the format "[x y]" or "[x y phi_degrees]", respectively.

◆ isEmpty()

bool mpp::PoseOrPoint::isEmpty ( ) const
inline

◆ isPoint()

bool mpp::PoseOrPoint::isPoint ( ) const
inline

◆ isPose()

bool mpp::PoseOrPoint::isPose ( ) const
inline

◆ point()

const mrpt::math::TPoint2D& mpp::PoseOrPoint::point ( ) const
inline

◆ pose()

const mrpt::math::TPose2D& mpp::PoseOrPoint::pose ( ) const
inline

Member Data Documentation

◆ data_

std::variant<std::monostate, mrpt::math::TPose2D, mrpt::math::TPoint2D> mpp::PoseOrPoint::data_
private

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