LocalGuidance
A library that generates velocity references to follow a path.
navigation_common::Tolerance Class Reference

#include <Tolerance.hpp>

Public Member Functions

 Tolerance ()=default
 
 Tolerance (const double translation, const double rotation)
 
 Tolerance (const navigation_msgs::Tolerance &msg)
 
 ~Tolerance ()=default
 
double getTranslation () const
 
double getRawTranslation () const
 
void setTranslation (const double translation)
 
double getRotation () const
 
double getRawRotation () const
 
void setRotation (const double rotation)
 
void fromRos (const navigation_msgs::Tolerance &msg)
 
navigation_msgs::Tolerance toRos () const
 

Static Public Member Functions

static double getDefaultTranslation ()
 
static void setDefaultTranslation (const double defaultTranslation)
 
static double getDefaultRotation ()
 
static void setDefaultRotation (const double defaultRotation)
 

Protected Attributes

double translation_ = 0.0
 Translational tolerance. If not set (== 0.0), the default tolerance is used. More...
 
double rotation_ = 0.0
 Rotational tolerance. If not set (== 0.0), the default tolerance is used. More...
 

Static Protected Attributes

static double defaultTranslation_
 Default translational tolerance. This default needs to be set before initializing an object of type Tolerance. More...
 
static double defaultRotation_
 Default rotational tolerance. This default needs to be set before initializing an object of type Tolerance. More...
 

Constructor & Destructor Documentation

navigation_common::Tolerance::Tolerance ( )
default

Constructor using the default tolerances.

navigation_common::Tolerance::Tolerance ( const double  translation,
const double  rotation 
)
explicit

Constructor.

Parameters
translationtranslation.
rotationrotation.
navigation_common::Tolerance::Tolerance ( const navigation_msgs::Tolerance msg)
explicit

Constructor.

Parameters
msgros msg.
navigation_common::Tolerance::~Tolerance ( )
default

Destructor.

Member Function Documentation

void navigation_common::Tolerance::fromRos ( const navigation_msgs::Tolerance msg)

Imports a ros msg.

Parameters
msgros msg.
static double navigation_common::Tolerance::getDefaultRotation ( )
static

Get the default rotational tolerance.

Returns
Default rotational tolerance.
static double navigation_common::Tolerance::getDefaultTranslation ( )
static

Get the default translational tolerance.

Returns
Default translational tolerance.
double navigation_common::Tolerance::getRawRotation ( ) const

Get the raw rotational part of the tolerance. Returns 0.0 if not set.

Returns
Raw rotation.
double navigation_common::Tolerance::getRawTranslation ( ) const

Get the raw translational part of the tolerance. Returns 0.0 if not set.

Returns
Raw translation.
double navigation_common::Tolerance::getRotation ( ) const

Get the rotational part of the tolerance. Returns the default if not set.

Returns
Rotation.
double navigation_common::Tolerance::getTranslation ( ) const

Get the translational part of the tolerance. Returns the default if not set.

Returns
Translation.
static void navigation_common::Tolerance::setDefaultRotation ( const double  defaultRotation)
static

Set the default rotational tolerance.

Parameters
defaultTranslationDefault rotational tolerance.
static void navigation_common::Tolerance::setDefaultTranslation ( const double  defaultTranslation)
static

Set the default translational tolerance.

Parameters
defaultTranslationDefault translational tolerance.
void navigation_common::Tolerance::setRotation ( const double  rotation)

Set the rotational part of the tolerance.

Parameters
rotationTranslation.
void navigation_common::Tolerance::setTranslation ( const double  translation)

Set the translational part of the tolerance.

Parameters
translationTranslation.
navigation_msgs::Tolerance navigation_common::Tolerance::toRos ( ) const

Exports a ros msg.

Returns
ros msg.

Member Data Documentation

double navigation_common::Tolerance::defaultRotation_
staticprotected

Default rotational tolerance. This default needs to be set before initializing an object of type Tolerance.

double navigation_common::Tolerance::defaultTranslation_
staticprotected

Default translational tolerance. This default needs to be set before initializing an object of type Tolerance.

double navigation_common::Tolerance::rotation_ = 0.0
protected

Rotational tolerance. If not set (== 0.0), the default tolerance is used.

double navigation_common::Tolerance::translation_ = 0.0
protected

Translational tolerance. If not set (== 0.0), the default tolerance is used.


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