GAMS  1.2.2
gams::platforms::Epsilon Class Reference

A simple bounds checker which tests whether the current position is within the given number of meters of the expected position, and whether the difference in angles is within the given number of radians. More...

#include <BasePlatform.h>

Inheritance diagram for gams::platforms::Epsilon:
gams::platforms::PoseBounds gams::platforms::PositionBounds gams::platforms::OrientationBounds

Public Member Functions

 Epsilon ()
 Use default values for position and angle tolerance. More...
 
 Epsilon (double dist)
 Use default value for angle tolerance. More...
 
 Epsilon (double dist, double radians)
 Use specified tolerances. More...
 
template<typename AngleUnits >
 Epsilon (double dist, double angle, AngleUnits u)
 Use specified tolerances, with custom angle units. More...
 
bool check_orientation (const pose::Orientation &current, const pose::Orientation &target) const override
 Override to return whether the current orientation is within the expected bounds of target. More...
 
bool check_position (const pose::Position &current, const pose::Position &target) const override
 Override to return whether the current position is within the expected bounds of target. More...
 

Private Attributes

double dist_ = 0.1
 
double radians_ = M_PI/16
 

Detailed Description

A simple bounds checker which tests whether the current position is within the given number of meters of the expected position, and whether the difference in angles is within the given number of radians.

Definition at line 142 of file BasePlatform.h.

Constructor & Destructor Documentation

gams::platforms::Epsilon::Epsilon ( )
inline

Use default values for position and angle tolerance.

Definition at line 147 of file BasePlatform.h.

gams::platforms::Epsilon::Epsilon ( double  dist)
inline

Use default value for angle tolerance.

Parameters
distthe position tolerance (in meters)

Definition at line 152 of file BasePlatform.h.

gams::platforms::Epsilon::Epsilon ( double  dist,
double  radians 
)
inline

Use specified tolerances.

Parameters
distthe position tolerance (in meters)
radiansthe angle tolerance (in radians)

Definition at line 159 of file BasePlatform.h.

template<typename AngleUnits >
gams::platforms::Epsilon::Epsilon ( double  dist,
double  angle,
AngleUnits  u 
)
inline

Use specified tolerances, with custom angle units.

Parameters
distthe position tolerance (in meters)
anglethe angle tolerance (in units given)
uan angle units object (such as pose::radians, pose::degrees, or pose::revolutions)
Template Parameters
AngleUnitsthe units type for angle (inferred from u)

Definition at line 171 of file BasePlatform.h.

Member Function Documentation

bool gams::platforms::Epsilon::check_orientation ( const pose::Orientation current,
const pose::Orientation target 
) const
inlineoverridevirtual

Override to return whether the current orientation is within the expected bounds of target.

Implements gams::platforms::OrientationBounds.

Definition at line 180 of file BasePlatform.h.

bool gams::platforms::Epsilon::check_position ( const pose::Position current,
const pose::Position target 
) const
inlineoverridevirtual

Override to return whether the current position is within the expected bounds of target.

Implements gams::platforms::PositionBounds.

Definition at line 174 of file BasePlatform.h.

Member Data Documentation

double gams::platforms::Epsilon::dist_ = 0.1
private

Definition at line 144 of file BasePlatform.h.

double gams::platforms::Epsilon::radians_ = M_PI/16
private

Definition at line 144 of file BasePlatform.h.


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