Main MRPT website > C++ reference
MRPT logo
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
mrpt::reactivenav::CPTG5 Class Reference

Detailed Description

A PTG for optimal paths of type "C|C,S".

See "Obstacle Distance for Car-Like Robots", IEEE Trans. Rob. And Autom, 1999.

#include <mrpt/reactivenav/CPTG5.h>

Inheritance diagram for mrpt::reactivenav::CPTG5:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::map< uint16_t, float > TCollisionCell
 A list of all the pairs (alpha,distance) such as the robot collides at that cell.

Public Member Functions

 CPTG5 (const TParameters< double > &params)
 Constructor: possible values in "params", those of CParameterizedTrajectoryGenerator plus:
void lambdaFunction (float x, float y, int &out_k, float &out_d)
 The lambda function.
std::string getDescription () const
 Gets a short textual description of the PTG and its parameters.
bool PTG_IsIntoDomain (float x, float y)
 To be implemented in derived classes:
void PTG_Generator (float alfa, float t, float x, float y, float phi, float &v, float &w)
 The main method to be implemented in derived classes.
void simulateTrajectories (uint16_t alfaValuesCount, float max_time, float max_dist, unsigned int max_n, float diferencial_t, float min_dist, float *out_max_acc_v=NULL, float *out_max_acc_w=NULL)
 The main method: solves the diferential equation to generate a family of parametrical trajectories.
void directionToMotionCommand (uint16_t k, float &out_v, float &out_w)
 Converts an "alfa" value (into the discrete set) into a feasible motion command.
size_t getAlfaValuesCount ()
size_t getPointsCountInCPath_k (uint16_t k)
void getCPointWhen_d_Is (float d, uint16_t k, float &x, float &y, float &phi, float &t, float *v=NULL, float *w=NULL)
float GetCPathPoint_x (uint16_t k, int n)
float GetCPathPoint_y (uint16_t k, int n)
float GetCPathPoint_phi (uint16_t k, int n)
float GetCPathPoint_t (uint16_t k, int n)
float GetCPathPoint_d (uint16_t k, int n)
float GetCPathPoint_v (uint16_t k, int n)
float GetCPathPoint_w (uint16_t k, int n)
void allocMemForVerticesData (int nVertices)
void setVertex_xy (uint16_t k, int n, int m, float x, float y)
float getVertex_x (uint16_t k, int n, int m)
float getVertex_y (uint16_t k, int n, int m)
float * getVertixesArray_x (uint16_t k, int n)
float * getVertixesArray_y (uint16_t k, int n)
unsigned int getVertixesCount ()
float getMax_V ()
float getMax_W ()
float getMax_V_inTPSpace ()
float index2alfa (uint16_t k)
 Alfa value for the discrete corresponding value.
uint16_t alfa2index (float alfa)
 Discrete index value for the corresponding alfa value.
void debugDumpInFiles (int nPT)
 Dump PTG trajectories in files in directory "./PTGs/".
bool SaveColGridsToFile (const std::string &filename)
bool LoadColGridsFromFile (const std::string &filename)

Static Public Member Functions

static
CParameterizedTrajectoryGenerator
CreatePTG (const TParameters< double > &params)
 The class factory for creating a PTG from a list of parameters "params".

Public Attributes

CColisionGrid m_collisionGrid
 The collision grid.
float refDistance

Protected Types

typedef std::vector< TCPointTCPointVector

Protected Member Functions

void initializeCollisionsGrid (float refDistance, float resolution)
 Initialized the collision grid with the given size and resolution.
void FreeMemory ()
 Free all the memory buffers:

Protected Attributes

float R
float K
float V_MAX
float W_MAX
float TAU
float DELAY
float turningRadiusReference
CDynamicGrid
< TCellForLambdaFunction
m_lambdaFunctionOptimizer
 This grid will contain indexes data for speeding-up the default, brute-force lambda function.
float maxV_inTPSpace
bool flag1
bool flag2
unsigned int alfaValuesCount
 The number of discrete values for ALFA between -PI and +PI.
std::vector< TCPointVectorCPoints
std::vector< vector_floatvertexPoints_x
 The shape of the robot along the trajectories:
std::vector< vector_floatvertexPoints_y
int nVertices

Member Typedef Documentation

A list of all the pairs (alpha,distance) such as the robot collides at that cell.

  • map key (uint16_t) -> alpha value (k)
    • map value (float) -> the MINIMUM distance (d), in meters, associated with that "k".

Definition at line 185 of file CParameterizedTrajectoryGenerator.h.

Definition at line 290 of file CParameterizedTrajectoryGenerator.h.


Constructor & Destructor Documentation

mrpt::reactivenav::CPTG5::CPTG5 ( const TParameters< double > &  params)

Constructor: possible values in "params", those of CParameterizedTrajectoryGenerator plus:

  • K: Direction, +1 or -1

Member Function Documentation

uint16_t mrpt::reactivenav::CParameterizedTrajectoryGenerator::alfa2index ( float  alfa) [inline, inherited]

Discrete index value for the corresponding alfa value.

See also:
index2alfa

Definition at line 170 of file CParameterizedTrajectoryGenerator.h.

References M_PI, and M_2PI.

void mrpt::reactivenav::CParameterizedTrajectoryGenerator::allocMemForVerticesData ( int  nVertices) [inherited]
static CParameterizedTrajectoryGenerator* mrpt::reactivenav::CParameterizedTrajectoryGenerator::CreatePTG ( const TParameters< double > &  params) [static, inherited]

The class factory for creating a PTG from a list of parameters "params".

Possible values in "params" are:

Exceptions:
std::logic_errorOn invalid or missing parameters.
void mrpt::reactivenav::CParameterizedTrajectoryGenerator::debugDumpInFiles ( int  nPT) [inherited]

Dump PTG trajectories in files in directory "./PTGs/".

void mrpt::reactivenav::CParameterizedTrajectoryGenerator::directionToMotionCommand ( uint16_t  k,
float &  out_v,
float &  out_w 
) [inherited]

Converts an "alfa" value (into the discrete set) into a feasible motion command.

void mrpt::reactivenav::CParameterizedTrajectoryGenerator::FreeMemory ( ) [protected, inherited]

Free all the memory buffers:

size_t mrpt::reactivenav::CParameterizedTrajectoryGenerator::getAlfaValuesCount ( ) [inline, inherited]

Definition at line 106 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_d ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 115 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_phi ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 113 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_t ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 114 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_v ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 116 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_w ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 117 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_x ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 111 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_y ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 112 of file CParameterizedTrajectoryGenerator.h.

void mrpt::reactivenav::CParameterizedTrajectoryGenerator::getCPointWhen_d_Is ( float  d,
uint16_t  k,
float &  x,
float &  y,
float &  phi,
float &  t,
float *  v = NULL,
float *  w = NULL 
) [inherited]
std::string mrpt::reactivenav::CPTG5::getDescription ( ) const [virtual]

Gets a short textual description of the PTG and its parameters.

Implements mrpt::reactivenav::CParameterizedTrajectoryGenerator.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getMax_V ( ) [inline, inherited]

Definition at line 155 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getMax_V_inTPSpace ( ) [inline, inherited]

Definition at line 157 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getMax_W ( ) [inline, inherited]

Definition at line 156 of file CParameterizedTrajectoryGenerator.h.

size_t mrpt::reactivenav::CParameterizedTrajectoryGenerator::getPointsCountInCPath_k ( uint16_t  k) [inline, inherited]

Definition at line 107 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertex_x ( uint16_t  k,
int  n,
int  m 
) [inline, inherited]

Definition at line 127 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertex_y ( uint16_t  k,
int  n,
int  m 
) [inline, inherited]

Definition at line 134 of file CParameterizedTrajectoryGenerator.h.

float* mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertixesArray_x ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 141 of file CParameterizedTrajectoryGenerator.h.

float* mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertixesArray_y ( uint16_t  k,
int  n 
) [inline, inherited]

Definition at line 147 of file CParameterizedTrajectoryGenerator.h.

unsigned int mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertixesCount ( ) [inline, inherited]

Definition at line 153 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CParameterizedTrajectoryGenerator::index2alfa ( uint16_t  k) [inline, inherited]

Alfa value for the discrete corresponding value.

See also:
alfa2index

Definition at line 162 of file CParameterizedTrajectoryGenerator.h.

References M_PI.

void mrpt::reactivenav::CParameterizedTrajectoryGenerator::initializeCollisionsGrid ( float  refDistance,
float  resolution 
) [protected, inherited]

Initialized the collision grid with the given size and resolution.

void mrpt::reactivenav::CPTG5::lambdaFunction ( float  x,
float  y,
int &  out_k,
float &  out_d 
) [virtual]

The lambda function.

Reimplemented from mrpt::reactivenav::CParameterizedTrajectoryGenerator.

bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::LoadColGridsFromFile ( const std::string filename) [inherited]
void mrpt::reactivenav::CPTG5::PTG_Generator ( float  alfa,
float  t,
float  x,
float  y,
float  phi,
float &  v,
float &  w 
) [virtual]

The main method to be implemented in derived classes.

Implements mrpt::reactivenav::CParameterizedTrajectoryGenerator.

bool mrpt::reactivenav::CPTG5::PTG_IsIntoDomain ( float  x,
float  y 
) [virtual]

To be implemented in derived classes:

Implements mrpt::reactivenav::CParameterizedTrajectoryGenerator.

bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::SaveColGridsToFile ( const std::string filename) [inherited]
void mrpt::reactivenav::CParameterizedTrajectoryGenerator::setVertex_xy ( uint16_t  k,
int  n,
int  m,
float  x,
float  y 
) [inline, inherited]

Definition at line 121 of file CParameterizedTrajectoryGenerator.h.

References Eigen::internal::y.

void mrpt::reactivenav::CParameterizedTrajectoryGenerator::simulateTrajectories ( uint16_t  alfaValuesCount,
float  max_time,
float  max_dist,
unsigned int  max_n,
float  diferencial_t,
float  min_dist,
float *  out_max_acc_v = NULL,
float *  out_max_acc_w = NULL 
) [inherited]

The main method: solves the diferential equation to generate a family of parametrical trajectories.


Member Data Documentation

The number of discrete values for ALFA between -PI and +PI.

Definition at line 265 of file CParameterizedTrajectoryGenerator.h.

Definition at line 291 of file CParameterizedTrajectoryGenerator.h.

Definition at line 237 of file CParameterizedTrajectoryGenerator.h.

Definition at line 261 of file CParameterizedTrajectoryGenerator.h.

Definition at line 261 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CPTG5::K [protected]

Definition at line 64 of file CPTG5.h.

The collision grid.

Definition at line 217 of file CParameterizedTrajectoryGenerator.h.

This grid will contain indexes data for speeding-up the default, brute-force lambda function.

Definition at line 256 of file CParameterizedTrajectoryGenerator.h.

Definition at line 259 of file CParameterizedTrajectoryGenerator.h.

Definition at line 296 of file CParameterizedTrajectoryGenerator.h.

float mrpt::reactivenav::CPTG5::R [protected]

Definition at line 64 of file CPTG5.h.

Definition at line 224 of file CParameterizedTrajectoryGenerator.h.

Definition at line 237 of file CParameterizedTrajectoryGenerator.h.

Definition at line 239 of file CParameterizedTrajectoryGenerator.h.

Definition at line 236 of file CParameterizedTrajectoryGenerator.h.

The shape of the robot along the trajectories:

Definition at line 295 of file CParameterizedTrajectoryGenerator.h.

Definition at line 295 of file CParameterizedTrajectoryGenerator.h.

Definition at line 236 of file CParameterizedTrajectoryGenerator.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011