Trajectories with a fixed linear speed (V_MAX) and a first turning part followed by a straight segment.
#include <mrpt/nav/tpspace/CPTG7.h>
Public Types | |
typedef std::vector< std::pair< uint16_t, float > > | TCollisionCell |
A list of all the pairs (alpha,distance) such as the robot collides at that cell. More... | |
Public Member Functions | |
CPTG7 (const mrpt::utils::TParameters< double > ¶ms) | |
Constructor (this PTG has no parameters) More... | |
std::string | getDescription () const |
Gets a short textual description of the PTG and its parameters. More... | |
bool | PTG_IsIntoDomain (float x, float y) |
To be implemented in derived classes. More... | |
void | PTG_Generator (float alpha, float t, float x, float y, float phi, float &v, float &w) |
The main method to be implemented in derived classes. More... | |
void | simulateTrajectories (uint16_t alphaValuesCount, 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. More... | |
void | saveTrajectories (mrpt::utils::CStream &out) const |
Saves the simulated trajectories and other parameters to a target stream. More... | |
virtual std::string | loadTrajectories (mrpt::utils::CStream &in) |
Loads the simulated trajectories and other parameters from a target stream. More... | |
virtual bool | inverseMap_WS2TP (float x, float y, int &out_k, float &out_d, float tolerance_dist=0.10f) const |
Computes the closest (alpha,d) TP coordinates of the trajectory point closest to the Workspace (WS) Cartesian coordinates (x,y). More... | |
void | lambdaFunction (float x, float y, int &out_k, float &out_d) \ |
The "lambda" function, see paper for info. More... | |
void | directionToMotionCommand (uint16_t k, float &out_v, float &out_w) |
Converts an "alpha" value (into the discrete set) into a feasible motion command. More... | |
uint16_t | getAlfaValuesCount () const |
size_t | getPointsCountInCPath_k (uint16_t k) const |
void | getCPointWhen_d_Is (float d, uint16_t k, float &x, float &y, float &phi, float &t, float *v=NULL, float *w=NULL) |
Returns the C-Space coordinates (pose) when the robot has transversed a distance d along trajectory index \k. More... | |
float | GetCPathPoint_x (uint16_t k, int n) const |
float | GetCPathPoint_y (uint16_t k, int n) const |
float | GetCPathPoint_phi (uint16_t k, int n) const |
float | GetCPathPoint_t (uint16_t k, int n) const |
float | GetCPathPoint_d (uint16_t k, int n) const |
float | GetCPathPoint_v (uint16_t k, int n) const |
float | GetCPathPoint_w (uint16_t k, int n) const |
float | getMax_V () const |
float | getMax_W () const |
float | getMax_V_inTPSpace () const |
float | index2alpha (uint16_t k) const |
Alfa value for the discrete corresponding value. More... | |
uint16_t | alpha2index (float alpha) const |
Discrete index value for the corresponding alpha value. More... | |
bool | debugDumpInFiles (const int nPT) |
Dump PTG trajectories in a binary file "./reactivenav.logs/PTGs/PTG%i.dat", with "%i" being the user-supplied parameter "nPT", and in FIVE text files: "./reactivenav.logs/PTGs/PTG%i_{x,y,phi,t,d}.txt". More... | |
void | renderPathAsSimpleLine (const uint16_t k, mrpt::opengl::CSetOfLines &gl_obj, const float decimate_distance=0.1f, const float max_path_distance=0.0f) const |
Returns the representation of one trajectory of this PTG as a 3D OpenGL object (a simple curved line). More... | |
bool | SaveColGridsToFile (const std::string &filename, const mrpt::math::CPolygon &computed_robotShape) |
bool | LoadColGridsFromFile (const std::string &filename, const mrpt::math::CPolygon ¤t_robotShape) |
Static Public Member Functions | |
static CParameterizedTrajectoryGenerator * | CreatePTG (const mrpt::utils::TParameters< double > ¶ms) |
The class factory for creating a PTG from a list of parameters "params". More... | |
Public Attributes | |
CColisionGrid | m_collisionGrid |
The collision grid. More... | |
float | refDistance |
Protected Member Functions | |
void | initializeCollisionsGrid (float refDistance, float resolution) |
Initialized the collision grid with the given size and resolution. More... | |
void | FreeMemory () |
Free all the memory buffers. More... | |
Protected Attributes | |
float | V_MAX |
float | W_MAX |
float | turningRadiusReference |
std::vector< TCPointVector > | CPoints |
mrpt::utils::CDynamicGrid< TCellForLambdaFunction > | m_lambdaFunctionOptimizer |
This grid will contain indexes data for speeding-up the default, brute-force lambda function. More... | |
float | maxV_inTPSpace |
uint16_t | m_alphaValuesCount |
The number of discrete values for "alpha" between -PI and +PI. More... | |
|
inherited |
A list of all the pairs (alpha,distance) such as the robot collides at that cell.
Definition at line 193 of file CParameterizedTrajectoryGenerator.h.
mrpt::nav::CPTG7::CPTG7 | ( | const mrpt::utils::TParameters< double > & | params | ) |
Constructor (this PTG has no parameters)
|
inlineinherited |
Discrete index value for the corresponding alpha value.
Definition at line 157 of file CParameterizedTrajectoryGenerator.h.
|
staticinherited |
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. |
|
inherited |
Dump PTG trajectories in a binary file "./reactivenav.logs/PTGs/PTG%i.dat", with "%i" being the user-supplied parameter "nPT", and in FIVE text files: "./reactivenav.logs/PTGs/PTG%i_{x,y,phi,t,d}.txt".
Text files are loadable from MATLAB/Octave, and can be visualized with the script [MRPT_DIR]/scripts/viewPTG.m , also online: http://mrpt.googlecode.com/svn/trunk/scripts/viewPTG.m
|
inherited |
Converts an "alpha" value (into the discrete set) into a feasible motion command.
|
protectedinherited |
Free all the memory buffers.
|
inlineinherited |
Definition at line 128 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 138 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 136 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 137 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 139 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 140 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 134 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 135 of file CParameterizedTrajectoryGenerator.h.
|
inherited |
Returns the C-Space coordinates (pose) when the robot has transversed a distance d along trajectory index \k.
Returns (0,0,0) if out of bounds.
|
virtual |
Gets a short textual description of the PTG and its parameters.
Implements mrpt::nav::CParameterizedTrajectoryGenerator.
|
inlineinherited |
Definition at line 142 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 144 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 143 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Definition at line 129 of file CParameterizedTrajectoryGenerator.h.
|
inlineinherited |
Alfa value for the discrete corresponding value.
Definition at line 149 of file CParameterizedTrajectoryGenerator.h.
References M_PI.
|
protectedinherited |
Initialized the collision grid with the given size and resolution.
|
virtualinherited |
Computes the closest (alpha,d) TP coordinates of the trajectory point closest to the Workspace (WS) Cartesian coordinates (x,y).
[in] | x | X coordinate of the query point. |
[in] | y | Y coordinate of the query point. |
[out] | out_k | Trajectory parameter index (discretized alpha value, 0-based index). |
[out] | out_d | Trajectory distance, normalized such that D_max becomes 1. |
Reimplemented in mrpt::nav::CPTG1.
|
inherited |
The "lambda" function, see paper for info.
It takes the (a,d) pair that is closest to a given location.
|
inherited |
|
virtualinherited |
Loads the simulated trajectories and other parameters from a target stream.
Reimplemented in mrpt::nav::CPTG_Dummy.
Referenced by mrpt::nav::CPTG_Dummy::loadTrajectories().
|
virtual |
The main method to be implemented in derived classes.
Implements mrpt::nav::CParameterizedTrajectoryGenerator.
|
virtual |
To be implemented in derived classes.
Implements mrpt::nav::CParameterizedTrajectoryGenerator.
|
inherited |
Returns the representation of one trajectory of this PTG as a 3D OpenGL object (a simple curved line).
[in] | k | The 0-based index of the selected trajectory (discrete "alpha" parameter). |
[out] | gl_obj | Output object. |
[in] | decimate_distance | Minimum distance between path points (in meters). |
[in] | max_path_distance | If >0, cut the path at this distance (in meters). |
|
inherited |
|
inherited |
Saves the simulated trajectories and other parameters to a target stream.
|
inherited |
The main method: solves the diferential equation to generate a family of parametrical trajectories.
|
protectedinherited |
Definition at line 247 of file CParameterizedTrajectoryGenerator.h.
|
protectedinherited |
The number of discrete values for "alpha" between -PI and +PI.
Definition at line 276 of file CParameterizedTrajectoryGenerator.h.
|
inherited |
The collision grid.
Definition at line 226 of file CParameterizedTrajectoryGenerator.h.
|
protectedinherited |
This grid will contain indexes data for speeding-up the default, brute-force lambda function.
Definition at line 269 of file CParameterizedTrajectoryGenerator.h.
|
protectedinherited |
Definition at line 272 of file CParameterizedTrajectoryGenerator.h.
|
inherited |
Definition at line 233 of file CParameterizedTrajectoryGenerator.h.
|
protectedinherited |
Definition at line 246 of file CParameterizedTrajectoryGenerator.h.
|
protectedinherited |
Definition at line 245 of file CParameterizedTrajectoryGenerator.h.
|
protectedinherited |
Definition at line 245 of file CParameterizedTrajectoryGenerator.h.
Page generated by Doxygen 1.8.15 for MRPT 1.4.0 SVN: at Sat Aug 3 20:09:00 UTC 2019 |