ISeeML  1.0
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
iSeeML::rob::CurvConfig Class Reference

This class defines a more precise configuration than classical ones for mobile robots. More...

#include <CurvConfig.hpp>

Inheritance diagram for iSeeML::rob::CurvConfig:
Inheritance graph
[legend]
Collaboration diagram for iSeeML::rob::CurvConfig:
Collaboration graph
[legend]

Public Member Functions

 CurvConfig ()
 The default constructor should only be used for array initializations: it correspond to a default oriented point with zero curvature. More...
 
 CurvConfig (const iSeeML::rob::OrPtConfig &OrPt, const double &kappa)
 The main constructor. More...
 
 CurvConfig (const iSeeML::geom::Point &P, const double &theta, const double &kappa)
 A first detailled constructor allows to give the classical configuration as a point and an orientation. More...
 
 CurvConfig (const double &x, const double &y, const double &theta, const double &kappa)
 A second detailled constructor allows to give the classical configuration as two Cartesian coordinates and an orientation. More...
 
iSeeML::Objectclone () const
 Description method, giving a copy of the current object. More...
 
void writeTo (ostream &O) const
 Description method, writing a description of the object into a given output stream. More...
 
const double & curvature () const
 Description method, giving the intantaneous curvature, in this configuration, of the curve followed by the robot's reference point. More...
 
- Public Member Functions inherited from iSeeML::rob::OrPtConfig
 OrPtConfig ()
 The default constructor should only be used for array initializations: it correspond to a default point with zero orientation. More...
 
 OrPtConfig (const iSeeML::geom::Point &P, const double &theta)
 The main constructor. More...
 
 OrPtConfig (const double &x, const double &y, const double &theta)
 A usefull constructor. More...
 
virtual ~OrPtConfig ()
 The virtual destructor does nothing.
 
iSeeML::Objectclone () const
 Description method, giving a copy of the current configuration. More...
 
void writeTo (ostream &O) const
 Description method, writing the configuration in a given output stream: coordinate in each dimension is written, between paranthesis and separated by commas. More...
 
const iSeeML::geom::Pointposition () const
 Description method, giving the position of the robot's reference point in this configuration. More...
 
const double & orientation () const
 Description method, giving the orientation of the robot's main axis in this configuration. More...
 
iSeeML::geom::Vector projection (const iSeeML::geom::Point &P) const
 Gives the projection of a point in the frame of this configuration. More...
 
OrPtConfig projection (const OrPtConfig &q) const
 Projects a configuration in the frame of this configuration. More...
 
OrPtConfiguTurn ()
 Modification method, turning the current oriented point to its opposite: the position does not change but the orientation is replaced by its opposite ( $\pm$ $\pi$ is added to it). More...
 
bool operator== (const OrPtConfig &other) const
 Equality operator between oriented points. More...
 
void operator+= (const OrPtConfig &other)
 Adds an oriente point to the current one: gives the oriented point obtained when the added oriented point is considered in the current's frame. More...
 
OrPtConfig operator+ (const OrPtConfig &other) const
 Addition operator between oriented points: gives the oriented point obtained when the second oriented point is considered in the first's frame. More...
 
OrPtConfig opposite () const
 Various method, giving the opposite oriented point of the current one: the opposite oriented point has the same position but opposite orientation (current oriented point's orientation $\pm$ $\pi$). More...
 
double distance2 (const OrPtConfig &other) const
 Various method, giving the distance between two oriented points' positions. More...
 
bool isParallelTo (const OrPtConfig &other) const
 Various method, checking whether two oriented points are parallel, ie whether their orientations are equal (modulo 2 $pi$). More...
 
bool isSymmetricTo (const OrPtConfig &other) const
 Various method, checking whether two oriented points are symmetric, ie whether their orientations are symmetric wrt the line segment connecting their position. More...
 
bool isAlignedWith (const OrPtConfig &other) const
 Various method, checking whether two oriented points are aligned: their orientations should be equal, and be the same as the orientation of the segment connecting their positions. More...
 
bool hasInFront (const iSeeML::geom::Point &point) const
 Various method, checking whether a point is in the front half-plane of the current oriented point: the vector connecting the current oriented point's position to the given point should make an angle between - $\pi$/ 2 and $\pi$/ 2 with the current oriented point's orientation. More...
 
- Public Member Functions inherited from iSeeML::Object
virtual ~Object ()
 This virtual class needs a virtual destructor.
 
virtual const string className () const
 Description method, giving the object's class name. More...
 
bool sameClass (const iSeeML::Object &other)
 Method verifying that a given object has the same type (same class name) than the current one. More...
 

Static Public Attributes

static const string ClassName
 The class name is public, as this class can be instanced. More...
 
- Static Public Attributes inherited from iSeeML::rob::OrPtConfig
static const string ClassName
 The class name is public, as this class can be instanced. More...
 

Protected Member Functions

int algDimension () const
 Description method, giving the dimension of the containing space (4) when this configuration is considered as an algebraic vector. More...
 
double algCoord (const int i) const
 Description method, giving the coordinate of given index of the configuration (both coordinates of the position, then orientation, then curvature). More...
 
- Protected Member Functions inherited from iSeeML::rob::OrPtConfig
int algDimension () const
 Description method, giving the dimension of the containing space (3) when this configuration is considered as an algebraic vector. More...
 
double algCoord (const int i) const
 Description method, giving the coordinate of given index of the configuration (both coordinates of the position, then orientation). More...
 
- Protected Member Functions inherited from iSeeML::Object
virtual void algWriteTo (ostream &O) const
 Description method for algebraic vectors, writing this vector in a given output stream: coordinates for each dimension are written, between paranthesis and separated by commas. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from iSeeML::Object
template<class T >
static const T & min (const T &a, const T &b)
 Method giving the minimum of two elements. More...
 
template<class T >
static const T & max (const T &a, const T &b)
 Method giving the maximum of two elements. More...
 
static double sqr (const double &x)
 Method giving the square of a double. More...
 
static double mod2pi (const double &theta)
 Method giving the angle between - $\pi$ (excluded) and $\pi$ (included), which is equal to a given angle modulo 2 $\pi$. More...
 
static double rad2deg (const double &theta)
 Method transforming an angle in radian, $x \pi$ with $x$ between -1 (excluded) and 1 (included), into its equivalent in degree, i.e. More...
 
static double deg2rad (const double &theta)
 Method transforming an angle in degree, $90 x$ with $x$ between -1 (excluded) and 1 (included), into its equivalent in radian, i.e. More...
 
static bool isPositive (const double &x)
 Method telling whether a double is strictly positive. More...
 
static bool isNegative (const double &x)
 Method telling whether a double is strictly negative. More...
 
static bool isZero (const double &x)
 Method comparing a double to zero. More...
 
static int sign (const double &x)
 Method giving the sign of a double. More...
 

Detailed Description

This class defines a more precise configuration than classical ones for mobile robots.

This configuration contains, added to the classical position of a reference point and orientation of a main axis, the curvature of the curve followed by the reference point (representing the directing wheels' orientation).

This class adds to those of iSeeML::rob::OrPtConfig a description method giving the curvature, and redefines description method writeTo.

Author
Alexis Scheuer.
Version
1.0

Constructor & Destructor Documentation

iSeeML::rob::CurvConfig::CurvConfig ( )
inline

The default constructor should only be used for array initializations: it correspond to a default oriented point with zero curvature.

See also
default constructor of iSeeML::rob::OrPtConfig.
iSeeML::rob::CurvConfig::CurvConfig ( const iSeeML::rob::OrPtConfig OrPt,
const double &  kappa 
)
inline

The main constructor.

Parameters
OrPta classical configuration as an oriented point,
kappathe curvature of the reference point's curve.
iSeeML::rob::CurvConfig::CurvConfig ( const iSeeML::geom::Point P,
const double &  theta,
const double &  kappa 
)
inline

A first detailled constructor allows to give the classical configuration as a point and an orientation.

Parameters
Pthe position of the reference point,
thetathe orientation of the main axis,
kappathe curvature of the reference point's curve.
See also
main constructor of iSeeML::rob::OrPtConfig.
iSeeML::rob::CurvConfig::CurvConfig ( const double &  x,
const double &  y,
const double &  theta,
const double &  kappa 
)
inline

A second detailled constructor allows to give the classical configuration as two Cartesian coordinates and an orientation.

Parameters
xthe X coordinate of the reference point,
ythe Y coordinate of the reference point,
thetathe orientation of the main axis,
kappathe curvature of the reference point's curve.
See also
usefull constructor of iSeeML::rob::OrPtConfig.

Member Function Documentation

double iSeeML::rob::CurvConfig::algCoord ( const int  i) const
inlineprotectedvirtual

Description method, giving the coordinate of given index of the configuration (both coordinates of the position, then orientation, then curvature).

Parameters
ithe index of the searched coordinate.
Precondition
the parameter is an index, and should be between one and four. If not, and ISEEML_CHECK_CURV_CONFIG_PRECOND is defined (see CompilerFlags.h), an error is generated.
Returns
the double coordinate associated to the index if this one is between 1 and dimension, or 0.
See also
curvature, iSeeML::rob::OrPtConfig::algCoord.

Reimplemented from iSeeML::Object.

int iSeeML::rob::CurvConfig::algDimension ( ) const
inlineprotectedvirtual

Description method, giving the dimension of the containing space (4) when this configuration is considered as an algebraic vector.

This representation is mainly used to define a unified writeTo. Dimension cannot be static, as it is virtual.

Reimplemented from iSeeML::Object.

iSeeML::Object& iSeeML::rob::CurvConfig::clone ( ) const
inlinevirtual

Description method, giving a copy of the current object.

This clone is dynamically allocated (and can be built easily using a copy constructor), it has to be deleted later.

Precondition
memory should not be full. If memory is full and ISEEML_CHECK_NIL_POINTER is defined (see CompilerFlags.h), an error message is generated and the program exits.
Returns
a copy/clone of the current object.

Implements iSeeML::Object.

const double& iSeeML::rob::CurvConfig::curvature ( ) const
inline

Description method, giving the intantaneous curvature, in this configuration, of the curve followed by the robot's reference point.

Returns
the intantaneous curvature of the robot's reference point's curve.
Examples:
wxGuiFwd.cpp.
void iSeeML::rob::CurvConfig::writeTo ( ostream &  O) const
inlinevirtual

Description method, writing a description of the object into a given output stream.

This method is preferred to a toString method, as writting into a stream is much easier than writting into a string.

Parameters
Othe output stream in which description is written.

Implements iSeeML::Object.

Member Data Documentation

const string iSeeML::rob::CurvConfig::ClassName
static

The class name is public, as this class can be instanced.

See also
className.

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