This is the base class for any user defined PTG.
The class factory interface in CParameterizedTrajectoryGenerator::CreatePTG.
Changes history:
Definition at line 52 of file CParameterizedTrajectoryGenerator.h.
#include <mrpt/reactivenav/CParameterizedTrajectoryGenerator.h>

Classes | |
| class | CColisionGrid |
| An internal class for storing the collision grid. More... | |
| struct | TCellForLambdaFunction |
| Specifies the min/max values for "k" and "n", respectively. More... | |
| struct | TCPoint |
| The trajectories in the C-Space: More... | |
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 | |
| virtual std::string | getDescription () const =0 |
| Gets a short textual description of the PTG and its parameters. | |
| virtual | ~CParameterizedTrajectoryGenerator () |
| Destructor. | |
| 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. | |
| virtual void | lambdaFunction (float x, float y, int &out_k, float &out_d) |
| The "lambda" function, see paper for info. | |
| 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) |
| virtual void | PTG_Generator (float alfa, float t, float x, float y, float phi, float &v, float &w)=0 |
| The main method to be implemented in derived classes. | |
| virtual bool | PTG_IsIntoDomain (float x, float y)=0 |
| To be implemented in derived classes: | |
Static Public Member Functions | |
| static CParameterizedTrajectoryGenerator * | CreatePTG (const TParameters< double > ¶ms) |
| 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< TCPoint > | TCPointVector |
Protected Member Functions | |
| CParameterizedTrajectoryGenerator (const TParameters< double > ¶ms) | |
| Constructor: possible values in "params": | |
| 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 | 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< TCPointVector > | CPoints |
| std::vector< vector_float > | vertexPoints_x |
| The shape of the robot along the trajectories: | |
| std::vector< vector_float > | vertexPoints_y |
| int | nVertices |
| typedef std::map<uint16_t,float> mrpt::reactivenav::CParameterizedTrajectoryGenerator::TCollisionCell |
A list of all the pairs (alpha,distance) such as the robot collides at that cell.
Definition at line 185 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 290 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Constructor: possible values in "params":
|
inlinevirtual |
Destructor.
Definition at line 84 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Discrete index value for the corresponding alfa value.
Definition at line 170 of file CParameterizedTrajectoryGenerator.h.
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::allocMemForVerticesData | ( | int | nVertices | ) |
|
static |
The class factory for creating a PTG from a list of parameters "params".
Possible values in "params" are:
| std::logic_error | On invalid or missing parameters. |
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::debugDumpInFiles | ( | int | nPT | ) |
Dump PTG trajectories in files in directory "./PTGs/".
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::directionToMotionCommand | ( | uint16_t | k, |
| float & | out_v, | ||
| float & | out_w | ||
| ) |
Converts an "alfa" value (into the discrete set) into a feasible motion command.
|
protected |
Free all the memory buffers:
|
inline |
Definition at line 106 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 115 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 113 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 114 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 116 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 117 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 111 of file CParameterizedTrajectoryGenerator.h.
|
inline |
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 |
||
| ) |
|
pure virtual |
Gets a short textual description of the PTG and its parameters.
Implemented in mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
|
inline |
Definition at line 155 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 157 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 156 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 107 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 127 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 134 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 141 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 147 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Definition at line 153 of file CParameterizedTrajectoryGenerator.h.
|
inline |
Alfa value for the discrete corresponding value.
Definition at line 162 of file CParameterizedTrajectoryGenerator.h.
References M_PI.
|
protected |
Initialized the collision grid with the given size and resolution.
|
virtual |
The "lambda" function, see paper for info.
It takes the (a,d) pair that is closest to a given location.
Reimplemented in mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
| bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::LoadColGridsFromFile | ( | const std::string & | filename | ) |
|
pure virtual |
The main method to be implemented in derived classes.
Implemented in mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
|
pure virtual |
To be implemented in derived classes:
Implemented in mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
| bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::SaveColGridsToFile | ( | const std::string & | filename | ) |
|
inline |
Definition at line 121 of file CParameterizedTrajectoryGenerator.h.
| 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 |
||
| ) |
The main method: solves the diferential equation to generate a family of parametrical trajectories.
|
protected |
The number of discrete values for ALFA between -PI and +PI.
Definition at line 265 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 291 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 237 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 261 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 261 of file CParameterizedTrajectoryGenerator.h.
| CColisionGrid mrpt::reactivenav::CParameterizedTrajectoryGenerator::m_collisionGrid |
The collision grid.
Definition at line 217 of file CParameterizedTrajectoryGenerator.h.
|
protected |
This grid will contain indexes data for speeding-up the default, brute-force lambda function.
Definition at line 256 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 259 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 296 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::refDistance |
Definition at line 224 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 237 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 239 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 236 of file CParameterizedTrajectoryGenerator.h.
|
protected |
The shape of the robot along the trajectories:
Definition at line 295 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 295 of file CParameterizedTrajectoryGenerator.h.
|
protected |
Definition at line 236 of file CParameterizedTrajectoryGenerator.h.
| Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013 |