This is the base class for any user defined PTG.
The class factory interface in CParameterizedTrajectoryGenerator::CreatePTG.
Changes history:
Definition at line 50 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 ()=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 181 of file CParameterizedTrajectoryGenerator.h.
typedef std::vector<TCPoint> mrpt::reactivenav::CParameterizedTrajectoryGenerator::TCPointVector [protected] |
Definition at line 282 of file CParameterizedTrajectoryGenerator.h.
| mrpt::reactivenav::CParameterizedTrajectoryGenerator::CParameterizedTrajectoryGenerator | ( | const TParameters< double > & | params ) | [protected] |
Constructor: possible values in "params":
| virtual mrpt::reactivenav::CParameterizedTrajectoryGenerator::~CParameterizedTrajectoryGenerator | ( | ) | [inline, virtual] |
Destructor.
Definition at line 80 of file CParameterizedTrajectoryGenerator.h.
| uint16_t mrpt::reactivenav::CParameterizedTrajectoryGenerator::alfa2index | ( | float | alfa ) | [inline] |
Discrete index value for the corresponding alfa value.
Definition at line 166 of file CParameterizedTrajectoryGenerator.h.
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::allocMemForVerticesData | ( | int | nVertices ) |
| static CParameterizedTrajectoryGenerator* mrpt::reactivenav::CParameterizedTrajectoryGenerator::CreatePTG | ( | const TParameters< double > & | params ) | [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.
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::FreeMemory | ( | ) | [protected] |
Free all the memory buffers:
| size_t mrpt::reactivenav::CParameterizedTrajectoryGenerator::getAlfaValuesCount | ( | ) | [inline] |
Definition at line 102 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_d | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 111 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_phi | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 109 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_t | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 110 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_v | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 112 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_w | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 113 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_x | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 107 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::GetCPathPoint_y | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 108 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 |
||
| ) |
| virtual std::string mrpt::reactivenav::CParameterizedTrajectoryGenerator::getDescription | ( | ) | [pure virtual] |
Gets a short textual description of the PTG and its parameters.
Implemented in mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getMax_V | ( | ) | [inline] |
Definition at line 151 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getMax_V_inTPSpace | ( | ) | [inline] |
Definition at line 153 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getMax_W | ( | ) | [inline] |
Definition at line 152 of file CParameterizedTrajectoryGenerator.h.
| size_t mrpt::reactivenav::CParameterizedTrajectoryGenerator::getPointsCountInCPath_k | ( | uint16_t | k ) | [inline] |
Definition at line 103 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertex_x | ( | uint16_t | k, |
| int | n, | ||
| int | m | ||
| ) | [inline] |
Definition at line 123 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertex_y | ( | uint16_t | k, |
| int | n, | ||
| int | m | ||
| ) | [inline] |
Definition at line 130 of file CParameterizedTrajectoryGenerator.h.
| float* mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertixesArray_x | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 137 of file CParameterizedTrajectoryGenerator.h.
| float* mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertixesArray_y | ( | uint16_t | k, |
| int | n | ||
| ) | [inline] |
Definition at line 143 of file CParameterizedTrajectoryGenerator.h.
| unsigned int mrpt::reactivenav::CParameterizedTrajectoryGenerator::getVertixesCount | ( | ) | [inline] |
Definition at line 149 of file CParameterizedTrajectoryGenerator.h.
| float mrpt::reactivenav::CParameterizedTrajectoryGenerator::index2alfa | ( | uint16_t | k ) | [inline] |
Alfa value for the discrete corresponding value.
Definition at line 158 of file CParameterizedTrajectoryGenerator.h.
References M_PI.
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::initializeCollisionsGrid | ( | float | refDistance, |
| float | resolution | ||
| ) | [protected] |
Initialized the collision grid with the given size and resolution.
| virtual void mrpt::reactivenav::CParameterizedTrajectoryGenerator::lambdaFunction | ( | float | x, |
| float | y, | ||
| int & | out_k, | ||
| float & | out_d | ||
| ) | [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::CPTG2, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
| bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::LoadColGridsFromFile | ( | const std::string & | filename ) |
| virtual void mrpt::reactivenav::CParameterizedTrajectoryGenerator::PTG_Generator | ( | float | alfa, |
| float | t, | ||
| float | x, | ||
| float | y, | ||
| float | phi, | ||
| float & | v, | ||
| float & | w | ||
| ) | [pure virtual] |
The main method to be implemented in derived classes.
Implemented in mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
| virtual bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::PTG_IsIntoDomain | ( | float | x, |
| float | y | ||
| ) | [pure virtual] |
To be implemented in derived classes:
Implemented in mrpt::reactivenav::CPTG1, mrpt::reactivenav::CPTG2, mrpt::reactivenav::CPTG3, mrpt::reactivenav::CPTG4, mrpt::reactivenav::CPTG5, mrpt::reactivenav::CPTG6, and mrpt::reactivenav::CPTG7.
| bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::SaveColGridsToFile | ( | const std::string & | filename ) |
| void mrpt::reactivenav::CParameterizedTrajectoryGenerator::setVertex_xy | ( | uint16_t | k, |
| int | n, | ||
| int | m, | ||
| float | x, | ||
| float | y | ||
| ) | [inline] |
Definition at line 117 of file CParameterizedTrajectoryGenerator.h.
References 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 |
||
| ) |
The main method: solves the diferential equation to generate a family of parametrical trajectories.
unsigned int mrpt::reactivenav::CParameterizedTrajectoryGenerator::alfaValuesCount [protected] |
The number of discrete values for ALFA between -PI and +PI.
Definition at line 257 of file CParameterizedTrajectoryGenerator.h.
std::vector<TCPointVector> mrpt::reactivenav::CParameterizedTrajectoryGenerator::CPoints [protected] |
Definition at line 283 of file CParameterizedTrajectoryGenerator.h.
float mrpt::reactivenav::CParameterizedTrajectoryGenerator::DELAY [protected] |
Definition at line 229 of file CParameterizedTrajectoryGenerator.h.
bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::flag1 [protected] |
Definition at line 253 of file CParameterizedTrajectoryGenerator.h.
bool mrpt::reactivenav::CParameterizedTrajectoryGenerator::flag2 [protected] |
Definition at line 253 of file CParameterizedTrajectoryGenerator.h.
The collision grid.
Definition at line 209 of file CParameterizedTrajectoryGenerator.h.
CDynamicGrid<TCellForLambdaFunction> mrpt::reactivenav::CParameterizedTrajectoryGenerator::m_lambdaFunctionOptimizer [protected] |
This grid will contain indexes data for speeding-up the default, brute-force lambda function.
Definition at line 248 of file CParameterizedTrajectoryGenerator.h.
float mrpt::reactivenav::CParameterizedTrajectoryGenerator::maxV_inTPSpace [protected] |
Definition at line 251 of file CParameterizedTrajectoryGenerator.h.
int mrpt::reactivenav::CParameterizedTrajectoryGenerator::nVertices [protected] |
Definition at line 288 of file CParameterizedTrajectoryGenerator.h.
Definition at line 216 of file CParameterizedTrajectoryGenerator.h.
float mrpt::reactivenav::CParameterizedTrajectoryGenerator::TAU [protected] |
Definition at line 229 of file CParameterizedTrajectoryGenerator.h.
Definition at line 231 of file CParameterizedTrajectoryGenerator.h.
float mrpt::reactivenav::CParameterizedTrajectoryGenerator::V_MAX [protected] |
Definition at line 228 of file CParameterizedTrajectoryGenerator.h.
std::vector<vector_float> mrpt::reactivenav::CParameterizedTrajectoryGenerator::vertexPoints_x [protected] |
The shape of the robot along the trajectories:
Definition at line 287 of file CParameterizedTrajectoryGenerator.h.
std::vector<vector_float> mrpt::reactivenav::CParameterizedTrajectoryGenerator::vertexPoints_y [protected] |
Definition at line 287 of file CParameterizedTrajectoryGenerator.h.
float mrpt::reactivenav::CParameterizedTrajectoryGenerator::W_MAX [protected] |
Definition at line 228 of file CParameterizedTrajectoryGenerator.h.
| Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011 |