Main MRPT website > C++ reference for MRPT 1.5.3
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
mrpt::nav::CPTG_DiffDrive_C Class Reference

Detailed Description

A PTG for circular paths ("C" type PTG in papers).

This PT generator functions are:

\[ v(\alpha) = V_{MAX} sign(K) \]

\[ \omega(\alpha) = \dfrac{\alpha}{\pi} W_{MAX} sign(K) \]

So, the radius of curvature of each trajectory is constant for each "alpha" value (the trajectory parameter):

\[ R(\alpha) = \dfrac{v}{\omega} = \dfrac{V_{MAX}}{W_{MAX}} \dfrac{\pi}{\alpha} \]

from which a minimum radius of curvature can be set by selecting the appropriate values of V_MAX and W_MAX, knowning that $ \alpha \in (-\pi,\pi) $.

PTG1_paths.png
C-PTG path examples
Note
[Before MRPT 1.5.0 this was named CPTG1]

Definition at line 41 of file CPTG_DiffDrive_C.h.

#include <mrpt/nav/tpspace/CPTG_DiffDrive_C.h>

Inheritance diagram for mrpt::nav::CPTG_DiffDrive_C:
Inheritance graph

Public Member Functions

void * operator new (size_t size)
 
void * operator new[] (size_t size)
 
void operator delete (void *ptr) throw ()
 
void operator delete[] (void *ptr) throw ()
 
void operator delete (void *memory, void *ptr) throw ()
 
void * operator new (size_t size, const std::nothrow_t &) throw ()
 
void operator delete (void *ptr, const std::nothrow_t &) throw ()
 
 CPTG_DiffDrive_C ()
 
 CPTG_DiffDrive_C (const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection)
 
virtual void loadFromConfigFile (const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) MRPT_OVERRIDE
 Possible values in "params" (those in CParameterizedTrajectoryGenerator, which is called internally, plus): More...
 
virtual void saveToConfigFile (mrpt::utils::CConfigFileBase &cfg, const std::string &sSection) const MRPT_OVERRIDE
 This method saves the options to a ".ini"-like file or memory-stored string list. More...
 
std::string getDescription () const MRPT_OVERRIDE
 Gets a short textual description of the PTG and its parameters. More...
 
bool inverseMap_WS2TP (double x, double y, int &out_k, double &out_d, double tolerance_dist=0.10) const MRPT_OVERRIDE
 The default implementation in this class relies on a look-up-table. More...
 
bool PTG_IsIntoDomain (double x, double y) const MRPT_OVERRIDE
 Returns the same than inverseMap_WS2TP() but without any additional cost. More...
 
void ptgDiffDriveSteeringFunction (float alpha, float t, float x, float y, float phi, float &v, float &w) const MRPT_OVERRIDE
 The main method to be implemented in derived classes: it defines the differential-driven differential equation. More...
 
void loadDefaultParams () MRPT_OVERRIDE
 Loads a set of default parameters; provided exclusively for the PTG-configurator tool. More...
 
double getMax_V () const
 
double getMax_W () const
 
bool isPointInsideRobotShape (const double x, const double y) const MRPT_OVERRIDE
 Returns true if the point lies within the robot shape. More...
 
void add_robotShape_to_setOfLines (mrpt::opengl::CSetOfLines &gl_shape, const mrpt::poses::CPose2D &origin=mrpt::poses::CPose2D()) const MRPT_OVERRIDE
 Auxiliary function for rendering. More...
 
void updateNavDynamicState (const TNavDynamicState &newState, const bool force_update=false)
 To be invoked by the navigator before each navigation step, to let the PTG to react to changing dynamic conditions. More...
 
const TNavDynamicStategetCurrentNavDynamicState () const
 
void initialize (const std::string &cacheFilename=std::string(), const bool verbose=true)
 Must be called after setting all PTG parameters and before requesting converting obstacles to TP-Space, inverseMap_WS2TP(), etc. More...
 
void deinitialize ()
 This must be called to de-initialize the PTG if some parameter is to be changed. More...
 
bool isInitialized () const
 Returns true if initialize() has been called and there was no errors, so the PTG is ready to be queried for paths, obstacles, etc. More...
 
uint16_t getAlphaValuesCount () const
 Get the number of different, discrete paths in this family. More...
 
uint16_t getPathCount () const
 Get the number of different, discrete paths in this family. More...
 
double index2alpha (uint16_t k) const
 Alpha value for the discrete corresponding value. More...
 
uint16_t alpha2index (double alpha) const
 Discrete index value for the corresponding alpha value. More...
 
double getRefDistance () const
 
void initTPObstacles (std::vector< double > &TP_Obstacles) const
 Resizes and populates the initial appropriate contents in a vector of tp-obstacles (collision-free ranges, in "pseudometers", un-normalized). More...
 
void initTPObstacleSingle (uint16_t k, double &TP_Obstacle_k) const
 
double getScorePriority () const
 When used in path planning, a multiplying factor (default=1.0) for the scores for this PTG. More...
 
void setScorePriorty (double prior)
 
unsigned getClearanceStepCount () const
 
void setClearanceStepCount (const unsigned res)
 
unsigned getClearanceDecimatedPaths () const
 
void setClearanceDecimatedPaths (const unsigned num)
 
virtual void renderPathAsSimpleLine (const uint16_t k, mrpt::opengl::CSetOfLines &gl_obj, const double decimate_distance=0.1, const double max_path_distance=-1.0) const
 Returns the representation of one trajectory of this PTG as a 3D OpenGL object (a simple curved line). More...
 
bool debugDumpInFiles (const std::string &ptg_name) const
 Dump PTG trajectories in four text files: `. More...
 
void initClearanceDiagram (ClearanceDiagram &cd) const
 Must be called to resize a CD to its correct size, before calling updateClearance() More...
 
void updateClearance (const double ox, const double oy, ClearanceDiagram &cd) const
 Updates the clearance diagram given one (ox,oy) obstacle point, in coordinates relative to the PTG path origin. More...
 
void updateClearancePost (ClearanceDiagram &cd, const std::vector< double > &TP_obstacles) const
 
virtual void evalClearanceSingleObstacle (const double ox, const double oy, const uint16_t k, ClearanceDiagram::dist2clearance_t &inout_realdist2clearance, bool treat_as_obstacle=true) const
 Evals the robot clearance for each robot pose along path k, for the real distances in the key of the map<>, then keep in the map value the minimum of its current stored clearance, or the computed clearance. More...
 
virtual mxArraywriteToMatlab () const
 Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More...
 
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). More...
 
CObject * clone () const
 Cloning interface for smart pointers. More...
 
void loadFromConfigFileName (const std::string &config_file, const std::string &section)
 Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file. More...
 
void saveToConfigFileName (const std::string &config_file, const std::string &section) const
 Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file. More...
 
void dumpToConsole () const
 Just like dumpToTextStream() but sending the text to the console (std::cout) More...
 
virtual void dumpToTextStream (mrpt::utils::CStream &out) const
 This method should clearly display all the contents of the structure in textual form, sending it to a CStream. More...
 
Virtual interface of each PTG implementation
virtual mrpt::kinematics::CVehicleVelCmdPtr directionToMotionCommand (uint16_t k) const MRPT_OVERRIDE
 In this class, out_action_cmd contains: [0]: linear velocity (m/s), [1]: angular velocity (rad/s). More...
 
virtual mrpt::kinematics::CVehicleVelCmdPtr getSupportedKinematicVelocityCommand () const MRPT_OVERRIDE
 Returns an empty kinematic velocity command object of the type supported by this PTG. More...
 
virtual void setRefDistance (const double refDist) MRPT_OVERRIDE
 Launches an exception in this class: it is not allowed in numerical integration-based PTGs to change the reference distance after initialization. More...
 
size_t getPathStepCount (uint16_t k) const MRPT_OVERRIDE
 Access path k ([0,N-1]=>[-pi,pi] in alpha): number of discrete "steps" along the trajectory. More...
 
void getPathPose (uint16_t k, uint32_t step, mrpt::math::TPose2D &p) const MRPT_OVERRIDE
 Access path k ([0,N-1]=>[-pi,pi] in alpha): pose of the vehicle at discrete step step. More...
 
double getPathDist (uint16_t k, uint32_t step) const MRPT_OVERRIDE
 Access path k ([0,N-1]=>[-pi,pi] in alpha): traversed distance at discrete step step. More...
 
bool getPathStepForDist (uint16_t k, double dist, uint32_t &out_step) const MRPT_OVERRIDE
 Access path k ([0,N-1]=>[-pi,pi] in alpha): largest step count for which the traversed distance is < dist More...
 
double getPathStepDuration () const MRPT_OVERRIDE
 Returns the duration (in seconds) of each "step". More...
 
double getMaxLinVel () const MRPT_OVERRIDE
 Returns the maximum linear velocity expected from this PTG [m/s]. More...
 
double getMaxAngVel () const MRPT_OVERRIDE
 Returns the maximum angular velocity expected from this PTG [rad/s]. More...
 
void updateTPObstacle (double ox, double oy, std::vector< double > &tp_obstacles) const MRPT_OVERRIDE
 Updates the radial map of closest TP-Obstacles given a single obstacle point at (ox,oy) More...
 
void updateTPObstacleSingle (double ox, double oy, uint16_t k, double &tp_obstacle_k) const MRPT_OVERRIDE
 Like updateTPObstacle() but for one direction only (k) in TP-Space. More...
 
virtual void onNewNavDynamicState () MRPT_OVERRIDE
 This family of PTGs ignores the dynamic states. More...
 
Robot shape
void setRobotShape (const mrpt::math::CPolygon &robotShape)
 Robot shape must be set before initialization, either from ctor params or via this method. More...
 
const mrpt::math::CPolygongetRobotShape () const
 
double getMaxRobotRadius () const MRPT_OVERRIDE
 Returns an approximation of the robot radius. More...
 
virtual double evalClearanceToRobotShape (const double ox, const double oy) const MRPT_OVERRIDE
 Evals the clearance from an obstacle (ox,oy) in coordinates relative to the robot center. More...
 
Virtual interface of each PTG implementation
virtual bool isBijectiveAt (uint16_t k, uint32_t step) const
 Returns true if a given TP-Space point maps to a unique point in Workspace, and viceversa. More...
 
virtual bool supportVelCmdNOP () const
 Returns true if it is possible to stop sending velocity commands to the robot and, still, the robot controller will be able to keep following the last sent trajectory ("NOP" velocity commands). More...
 
virtual bool supportSpeedAtTarget () const
 Returns true if this PTG takes into account the desired velocity at target. More...
 
virtual double maxTimeInVelCmdNOP (int path_k) const
 Only for PTGs supporting supportVelCmdNOP(): this is the maximum time (in seconds) for which the path can be followed without re-issuing a new velcmd. More...
 
virtual double getActualUnloopedPathLength (uint16_t k) const
 Returns the actual distance (in meters) of the path, discounting possible circular loops of the path (e.g. More...
 
virtual double evalPathRelativePriority (uint16_t k, double target_distance) const
 Query the PTG for the relative priority factor (0,1) of this PTG, in comparison to others, if the k-th path is to be selected. More...
 

Static Public Member Functions

static void * operator new (size_t size, void *ptr)
 
static CParameterizedTrajectoryGeneratorCreatePTG (const std::string &ptgClassName, const mrpt::utils::CConfigFileBase &cfg, const std::string &sSection, const std::string &sKeyPrefix)
 The class factory for creating a PTG from a list of parameters in a section of a given config file (physical file or in memory). More...
 
static double index2alpha (uint16_t k, const unsigned int num_paths)
 
static uint16_t alpha2index (double alpha, const unsigned int num_paths)
 

Static Public Attributes

static std::string OUTPUT_DEBUG_PATH_PREFIX
 The path used as defaul output in, for example, debugDumpInFiles. (Default="./reactivenav.logs/") More...
 
static PTG_collision_behavior_t COLLISION_BEHAVIOR
 Defines the behavior when there is an obstacle inside the robot shape right at the beginning of a PTG trajectory. More...
 
static const mrpt::utils::TRuntimeClassId classCObject
 
RTTI stuff
static const mrpt::utils::TRuntimeClassId classCParameterizedTrajectoryGenerator
 
RTTI stuff
static const mrpt::utils::TRuntimeClassId classCSerializable
 

Protected 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...
 

Protected Member Functions

void internal_processNewRobotShape () MRPT_OVERRIDE
 Will be called whenever the robot shape is set / updated. More...
 
void internal_initialize (const std::string &cacheFilename=std::string(), const bool verbose=true) MRPT_OVERRIDE
 Must be called after setting all PTG parameters and before requesting converting obstacles to TP-Space, inverseMap_WS2TP(), etc. More...
 
void internal_deinitialize () MRPT_OVERRIDE
 This must be called to de-initialize the PTG if some parameter is to be changed. More...
 
void internal_readFromStream (mrpt::utils::CStream &in) MRPT_OVERRIDE
 
void internal_writeToStream (mrpt::utils::CStream &out) const MRPT_OVERRIDE
 
void simulateTrajectories (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)
 Numerically solve the diferential equations to generate a family of trajectories. More...
 
bool saveColGridsToFile (const std::string &filename, const mrpt::math::CPolygon &computed_robotShape) const
 
bool loadColGridsFromFile (const std::string &filename, const mrpt::math::CPolygon &current_robotShape)
 
void loadShapeFromConfigFile (const mrpt::utils::CConfigFileBase &source, const std::string &section)
 
void internal_shape_loadFromStream (mrpt::utils::CStream &in)
 
void internal_shape_saveToStream (mrpt::utils::CStream &out) const
 
void internal_TPObsDistancePostprocess (const double ox, const double oy, const double new_tp_obs_dist, double &inout_tp_obs) const
 To be called by implementors of updateTPObstacle() and updateTPObstacleSingle() to honor the user settings regarding COLLISION_BEHAVIOR. More...
 
CSerializable virtual methods
void writeToStream (mrpt::utils::CStream &out, int *getVersion) const
 Introduces a pure virtual method responsible for writing to a CStream. More...
 
void readFromStream (mrpt::utils::CStream &in, int version)
 Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. More...
 

Static Protected Member Functions

static void dumpVar_int (CStream &out, const char *varName, int v)
 Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR. More...
 
static void dumpVar_float (CStream &out, const char *varName, float v)
 
static void dumpVar_double (CStream &out, const char *varName, double v)
 
static void dumpVar_bool (CStream &out, const char *varName, bool v)
 
static void dumpVar_string (CStream &out, const char *varName, const std::string &v)
 

Protected Attributes

double K
 A generation parameter. More...
 
double V_MAX
 
double W_MAX
 
double turningRadiusReference
 
std::vector< TCPointVectorm_trajectory
 
double m_resolution
 
double m_stepTimeDuration
 
CCollisionGrid m_collisionGrid
 The collision grid. More...
 
mrpt::utils::CDynamicGrid< TCellForLambdaFunctionm_lambdaFunctionOptimizer
 This grid will contain indexes data for speeding-up the default, brute-force lambda function. More...
 
mrpt::math::CPolygon m_robotShape
 
double m_robotMaxRadius
 
double refDistance
 
uint16_t m_alphaValuesCount
 The number of discrete values for "alpha" between -PI and +PI. More...
 
double m_score_priority
 
uint16_t m_clearance_num_points
 Number of steps for the piecewise-constant approximation of clearance from TPS distances [0,1] (Default=5) More...
 
uint16_t m_clearance_decimated_paths
 Number of paths for the decimated paths analysis of clearance. More...
 
TNavDynamicState m_nav_dyn_state
 Updated before each nav step by. More...
 
uint16_t m_nav_dyn_state_target_k
 Update in updateNavDynamicState(), contains the path index (k) for the target. More...
 
bool m_is_initialized
 

Static Protected Attributes

static const uint16_t INVALID_PTG_PATH_INDEX = static_cast<uint16_t>(-1)
 

RTTI stuff

typedef CPTG_DiffDrive_CPtr SmartPtr
 
static mrpt::utils::CLASSINIT _init_CPTG_DiffDrive_C
 
static mrpt::utils::TRuntimeClassId classCPTG_DiffDrive_C
 
static const mrpt::utils::TRuntimeClassIdclassinfo
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class. More...
 
static mrpt::utils::CObjectCreateObject ()
 
static CPTG_DiffDrive_CPtr Create ()
 

Member Typedef Documentation

◆ SmartPtr

typedef CPTG_DiffDrive_CPtr mrpt::nav::CPTG_DiffDrive_C::SmartPtr

A typedef for the associated smart pointer

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ TCollisionCell

typedef std::vector<std::pair<uint16_t,float> > mrpt::nav::CPTG_DiffDrive_CollisionGridBased::TCollisionCell
protectedinherited

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 132 of file CPTG_DiffDrive_CollisionGridBased.h.

Constructor & Destructor Documentation

◆ CPTG_DiffDrive_C() [1/2]

mrpt::nav::CPTG_DiffDrive_C::CPTG_DiffDrive_C ( )
inline

Definition at line 45 of file CPTG_DiffDrive_C.h.

◆ CPTG_DiffDrive_C() [2/2]

mrpt::nav::CPTG_DiffDrive_C::CPTG_DiffDrive_C ( const mrpt::utils::CConfigFileBase cfg,
const std::string &  sSection 
)
inline

Definition at line 46 of file CPTG_DiffDrive_C.h.

References MRPT_OVERRIDE, t(), and exprtk::details::x().

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId* mrpt::nav::CPTG_DiffDrive_C::_GetBaseClass ( )
staticprotected

◆ add_robotShape_to_setOfLines()

void mrpt::nav::CPTG_RobotShape_Polygonal::add_robotShape_to_setOfLines ( mrpt::opengl::CSetOfLines gl_shape,
const mrpt::poses::CPose2D origin = mrpt::poses::CPose2D() 
) const
virtualinherited

Auxiliary function for rendering.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ alpha2index() [1/2]

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index ( double  alpha) const
inherited

Discrete index value for the corresponding alpha value.

See also
index2alpha

◆ alpha2index() [2/2]

static uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::alpha2index ( double  alpha,
const unsigned int  num_paths 
)
staticinherited

◆ clone()

CObject* mrpt::utils::CObject::clone ( ) const
inlineinherited

Cloning interface for smart pointers.

Definition at line 143 of file CObject.h.

◆ Create()

static CPTG_DiffDrive_CPtr mrpt::nav::CPTG_DiffDrive_C::Create ( )
static

◆ CreateObject()

static mrpt::utils::CObject* mrpt::nav::CPTG_DiffDrive_C::CreateObject ( )
static

◆ CreatePTG()

static CParameterizedTrajectoryGenerator* mrpt::nav::CParameterizedTrajectoryGenerator::CreatePTG ( const std::string &  ptgClassName,
const mrpt::utils::CConfigFileBase cfg,
const std::string &  sSection,
const std::string &  sKeyPrefix 
)
staticinherited

The class factory for creating a PTG from a list of parameters in a section of a given config file (physical file or in memory).

Possible parameters are:

ptgClassName can be any PTG class name which has been registered as any other mrpt::utils::CSerializable class.

Exceptions
std::logic_errorOn invalid or missing parameters.

◆ debugDumpInFiles()

bool mrpt::nav::CParameterizedTrajectoryGenerator::debugDumpInFiles ( const std::string &  ptg_name) const
inherited

Dump PTG trajectories in four text files: `.

/reactivenav.logs/PTGs/PTGi_{x,y,phi,d}.txt Text files are loadable from MATLAB/Octave, and can be visualized with the script[MRPT_DIR]/scripts/viewPTG.m`

Note
The directory "./reactivenav.logs/PTGs" will be created if doesn't exist.
Returns
false on any error writing to disk.
See also
OUTPUT_DEBUG_PATH_PREFIX

◆ deinitialize()

void mrpt::nav::CParameterizedTrajectoryGenerator::deinitialize ( )
inherited

This must be called to de-initialize the PTG if some parameter is to be changed.

After changing it, call initialize again

◆ directionToMotionCommand()

virtual mrpt::kinematics::CVehicleVelCmdPtr mrpt::nav::CPTG_DiffDrive_CollisionGridBased::directionToMotionCommand ( uint16_t  k) const
virtualinherited

In this class, out_action_cmd contains: [0]: linear velocity (m/s), [1]: angular velocity (rad/s).

See more docs in CParameterizedTrajectoryGenerator::directionToMotionCommand()

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ dumpToConsole()

void mrpt::utils::CLoadableOptions::dumpToConsole ( ) const
inherited

◆ dumpToTextStream()

virtual void mrpt::utils::CLoadableOptions::dumpToTextStream ( mrpt::utils::CStream out) const
virtualinherited

This method should clearly display all the contents of the structure in textual form, sending it to a CStream.

The default implementation in this base class relies on saveToConfigFile() to generate a plain text representation of all the parameters.

Reimplemented in mrpt::vision::TMultiResDescOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLoopClosureParams, mrpt::vision::TMultiResDescMatchOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLaserParams, mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::vision::TMatchingOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::GraphVisualizationParams, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::TParams, mrpt::vision::TStereoSystemParams, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::OptimizationParams, mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::TParams, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams, mrpt::graphslam::deciders::CFixedIntervalsNRD< GRAPH_T >::TParams, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::graphslam::TSlidingWindow, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::bayes::TKF_options, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::vision::CFeatureExtraction::TOptions, mrpt::graphslam::TUncertaintyPath< GRAPH_T >, mrpt::maps::TMapGenericParams, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::slam::CICP::TConfigParams, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::maps::TMetricMapInitializer, mrpt::vision::CCamModel, and mrpt::slam::TKLDParams.

◆ dumpVar_bool()

static void mrpt::utils::CLoadableOptions::dumpVar_bool ( CStream out,
const char *  varName,
bool  v 
)
staticprotectedinherited

◆ dumpVar_double()

static void mrpt::utils::CLoadableOptions::dumpVar_double ( CStream out,
const char *  varName,
double  v 
)
staticprotectedinherited

◆ dumpVar_float()

static void mrpt::utils::CLoadableOptions::dumpVar_float ( CStream out,
const char *  varName,
float  v 
)
staticprotectedinherited

◆ dumpVar_int()

static void mrpt::utils::CLoadableOptions::dumpVar_int ( CStream out,
const char *  varName,
int  v 
)
staticprotectedinherited

Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.

◆ dumpVar_string()

static void mrpt::utils::CLoadableOptions::dumpVar_string ( CStream out,
const char *  varName,
const std::string &  v 
)
staticprotectedinherited

◆ duplicate()

virtual mrpt::utils::CObject* mrpt::nav::CPTG_DiffDrive_C::duplicate ( ) const
virtual

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

◆ duplicateGetSmartPtr()

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 140 of file CObject.h.

◆ evalClearanceSingleObstacle()

virtual void mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle ( const double  ox,
const double  oy,
const uint16_t  k,
ClearanceDiagram::dist2clearance_t inout_realdist2clearance,
bool  treat_as_obstacle = true 
) const
virtualinherited

Evals the robot clearance for each robot pose along path k, for the real distances in the key of the map<>, then keep in the map value the minimum of its current stored clearance, or the computed clearance.

In case of collision, clearance is zero.

Parameters
treat_as_obstacletrue: normal use for obstacles; false: compute shortest distances to a target point (no collision)

◆ evalClearanceToRobotShape()

virtual double mrpt::nav::CPTG_RobotShape_Polygonal::evalClearanceToRobotShape ( const double  ox,
const double  oy 
) const
virtualinherited

Evals the clearance from an obstacle (ox,oy) in coordinates relative to the robot center.

Zero or negative means collision.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ evalPathRelativePriority()

virtual double mrpt::nav::CParameterizedTrajectoryGenerator::evalPathRelativePriority ( uint16_t  k,
double  target_distance 
) const
inlinevirtualinherited

Query the PTG for the relative priority factor (0,1) of this PTG, in comparison to others, if the k-th path is to be selected.

Definition at line 211 of file CParameterizedTrajectoryGenerator.h.

◆ getActualUnloopedPathLength()

virtual double mrpt::nav::CParameterizedTrajectoryGenerator::getActualUnloopedPathLength ( uint16_t  k) const
inlinevirtualinherited

Returns the actual distance (in meters) of the path, discounting possible circular loops of the path (e.g.

if it comes back to the origin). Default: refDistance

Definition at line 208 of file CParameterizedTrajectoryGenerator.h.

◆ getAlphaValuesCount()

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::getAlphaValuesCount ( ) const
inlineinherited

Get the number of different, discrete paths in this family.

Definition at line 237 of file CParameterizedTrajectoryGenerator.h.

◆ getClearanceDecimatedPaths()

unsigned mrpt::nav::CParameterizedTrajectoryGenerator::getClearanceDecimatedPaths ( ) const
inlineinherited

Definition at line 262 of file CParameterizedTrajectoryGenerator.h.

◆ getClearanceStepCount()

unsigned mrpt::nav::CParameterizedTrajectoryGenerator::getClearanceStepCount ( ) const
inlineinherited

Definition at line 259 of file CParameterizedTrajectoryGenerator.h.

◆ getCurrentNavDynamicState()

const TNavDynamicState& mrpt::nav::CParameterizedTrajectoryGenerator::getCurrentNavDynamicState ( ) const
inlineinherited

Definition at line 225 of file CParameterizedTrajectoryGenerator.h.

◆ getDescription()

std::string mrpt::nav::CPTG_DiffDrive_C::getDescription ( ) const
virtual

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

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getMax_V()

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getMax_V ( ) const
inlineinherited

Definition at line 87 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ getMax_W()

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getMax_W ( ) const
inlineinherited

Definition at line 88 of file CPTG_DiffDrive_CollisionGridBased.h.

References MRPT_OVERRIDE.

◆ getMaxAngVel()

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getMaxAngVel ( ) const
inlinevirtualinherited

Returns the maximum angular velocity expected from this PTG [rad/s].

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

Definition at line 75 of file CPTG_DiffDrive_CollisionGridBased.h.

References MRPT_OVERRIDE.

◆ getMaxLinVel()

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getMaxLinVel ( ) const
inlinevirtualinherited

Returns the maximum linear velocity expected from this PTG [m/s].

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

Definition at line 74 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ getMaxRobotRadius()

double mrpt::nav::CPTG_RobotShape_Polygonal::getMaxRobotRadius ( ) const
virtualinherited

Returns an approximation of the robot radius.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getPathCount()

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::getPathCount ( ) const
inlineinherited

Get the number of different, discrete paths in this family.

Definition at line 239 of file CParameterizedTrajectoryGenerator.h.

◆ getPathDist()

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathDist ( uint16_t  k,
uint32_t  step 
) const
virtualinherited

Access path k ([0,N-1]=>[-pi,pi] in alpha): traversed distance at discrete step step.

Returns
Distance in pseudometers (real distance, NOT normalized to [0,1] for [0,refDist])
See also
getPathStepCount(), getAlphaValuesCount()

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getPathPose()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathPose ( uint16_t  k,
uint32_t  step,
mrpt::math::TPose2D p 
) const
virtualinherited

Access path k ([0,N-1]=>[-pi,pi] in alpha): pose of the vehicle at discrete step step.

See also
getPathStepCount(), getAlphaValuesCount()

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getPathStepCount()

size_t mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathStepCount ( uint16_t  k) const
virtualinherited

Access path k ([0,N-1]=>[-pi,pi] in alpha): number of discrete "steps" along the trajectory.

May be actual steps from a numerical integration or an arbitrary small length for analytical PTGs.

See also
getAlphaValuesCount()

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getPathStepDuration()

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathStepDuration ( ) const
virtualinherited

Returns the duration (in seconds) of each "step".

See also
getPathStepCount()

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getPathStepForDist()

bool mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getPathStepForDist ( uint16_t  k,
double  dist,
uint32_t &  out_step 
) const
virtualinherited

Access path k ([0,N-1]=>[-pi,pi] in alpha): largest step count for which the traversed distance is < dist

Parameters
[in]distDistance in pseudometers (real distance, NOT normalized to [0,1] for [0,refDist])
Returns
false if no step fulfills the condition for the given trajectory k (e.g. out of reference distance). Note that, anyway, the maximum distance (closest point) is returned in out_step.
See also
getPathStepCount(), getAlphaValuesCount()

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getRefDistance()

double mrpt::nav::CParameterizedTrajectoryGenerator::getRefDistance ( ) const
inlineinherited

Definition at line 249 of file CParameterizedTrajectoryGenerator.h.

◆ getRobotShape()

const mrpt::math::CPolygon& mrpt::nav::CPTG_RobotShape_Polygonal::getRobotShape ( ) const
inlineinherited

Definition at line 360 of file CParameterizedTrajectoryGenerator.h.

References MRPT_OVERRIDE.

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId* mrpt::nav::CPTG_DiffDrive_C::GetRuntimeClass ( ) const
virtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::nav::CParameterizedTrajectoryGenerator.

◆ getScorePriority()

double mrpt::nav::CParameterizedTrajectoryGenerator::getScorePriority ( ) const
inlineinherited

When used in path planning, a multiplying factor (default=1.0) for the scores for this PTG.

Assign values <1 to PTGs with low priority.

Definition at line 256 of file CParameterizedTrajectoryGenerator.h.

◆ getSupportedKinematicVelocityCommand()

virtual mrpt::kinematics::CVehicleVelCmdPtr mrpt::nav::CPTG_DiffDrive_CollisionGridBased::getSupportedKinematicVelocityCommand ( ) const
virtualinherited

Returns an empty kinematic velocity command object of the type supported by this PTG.

Can be queried to determine the expected kinematic interface of the PTG.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ index2alpha() [1/2]

double mrpt::nav::CParameterizedTrajectoryGenerator::index2alpha ( uint16_t  k) const
inherited

Alpha value for the discrete corresponding value.

See also
alpha2index

◆ index2alpha() [2/2]

static double mrpt::nav::CParameterizedTrajectoryGenerator::index2alpha ( uint16_t  k,
const unsigned int  num_paths 
)
staticinherited

◆ initClearanceDiagram()

void mrpt::nav::CParameterizedTrajectoryGenerator::initClearanceDiagram ( ClearanceDiagram cd) const
inherited

Must be called to resize a CD to its correct size, before calling updateClearance()

◆ initialize()

void mrpt::nav::CParameterizedTrajectoryGenerator::initialize ( const std::string &  cacheFilename = std::string(),
const bool  verbose = true 
)
inherited

Must be called after setting all PTG parameters and before requesting converting obstacles to TP-Space, inverseMap_WS2TP(), etc.

◆ initTPObstacles()

void mrpt::nav::CParameterizedTrajectoryGenerator::initTPObstacles ( std::vector< double > &  TP_Obstacles) const
inherited

Resizes and populates the initial appropriate contents in a vector of tp-obstacles (collision-free ranges, in "pseudometers", un-normalized).

See also
updateTPObstacle()

◆ initTPObstacleSingle()

void mrpt::nav::CParameterizedTrajectoryGenerator::initTPObstacleSingle ( uint16_t  k,
double &  TP_Obstacle_k 
) const
inherited

◆ internal_deinitialize()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_deinitialize ( )
protectedvirtualinherited

This must be called to de-initialize the PTG if some parameter is to be changed.

After changing it, call initialize again

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ internal_initialize()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_initialize ( const std::string &  cacheFilename = std::string(),
const bool  verbose = true 
)
protectedvirtualinherited

Must be called after setting all PTG parameters and before requesting converting obstacles to TP-Space, inverseMap_WS2TP(), etc.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ internal_processNewRobotShape()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_processNewRobotShape ( )
protectedvirtualinherited

Will be called whenever the robot shape is set / updated.

Implements mrpt::nav::CPTG_RobotShape_Polygonal.

◆ internal_readFromStream()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_readFromStream ( mrpt::utils::CStream in)
protectedvirtualinherited

◆ internal_shape_loadFromStream()

void mrpt::nav::CPTG_RobotShape_Polygonal::internal_shape_loadFromStream ( mrpt::utils::CStream in)
protectedinherited

◆ internal_shape_saveToStream()

void mrpt::nav::CPTG_RobotShape_Polygonal::internal_shape_saveToStream ( mrpt::utils::CStream out) const
protectedinherited

◆ internal_TPObsDistancePostprocess()

void mrpt::nav::CParameterizedTrajectoryGenerator::internal_TPObsDistancePostprocess ( const double  ox,
const double  oy,
const double  new_tp_obs_dist,
double &  inout_tp_obs 
) const
protectedinherited

To be called by implementors of updateTPObstacle() and updateTPObstacleSingle() to honor the user settings regarding COLLISION_BEHAVIOR.

Parameters
new_tp_obs_distThe newly determiend collision-free ranges, in "pseudometers", un-normalized, for some "k" direction.
inout_tp_obsThe target where to store the new TP-Obs distance, if it fulfills the criteria determined by the collision behavior.

◆ internal_writeToStream()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_writeToStream ( mrpt::utils::CStream out) const
protectedvirtualinherited

◆ inverseMap_WS2TP()

bool mrpt::nav::CPTG_DiffDrive_C::inverseMap_WS2TP ( double  x,
double  y,
int &  out_k,
double &  out_d,
double  tolerance_dist = 0.10 
) const
virtual

The default implementation in this class relies on a look-up-table.

Derived classes may redefine this to closed-form expressions, when they exist. See full docs in base class CParameterizedTrajectoryGenerator::inverseMap_WS2TP()

Reimplemented from mrpt::nav::CPTG_DiffDrive_CollisionGridBased.

◆ isBijectiveAt()

virtual bool mrpt::nav::CParameterizedTrajectoryGenerator::isBijectiveAt ( uint16_t  k,
uint32_t  step 
) const
inlinevirtualinherited

Returns true if a given TP-Space point maps to a unique point in Workspace, and viceversa.

Default implementation returns true.

Definition at line 113 of file CParameterizedTrajectoryGenerator.h.

◆ isInitialized()

bool mrpt::nav::CParameterizedTrajectoryGenerator::isInitialized ( ) const
inherited

Returns true if initialize() has been called and there was no errors, so the PTG is ready to be queried for paths, obstacles, etc.

◆ isPointInsideRobotShape()

bool mrpt::nav::CPTG_RobotShape_Polygonal::isPointInsideRobotShape ( const double  x,
const double  y 
) const
virtualinherited

Returns true if the point lies within the robot shape.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ loadColGridsFromFile()

bool mrpt::nav::CPTG_DiffDrive_CollisionGridBased::loadColGridsFromFile ( const std::string &  filename,
const mrpt::math::CPolygon current_robotShape 
)
protectedinherited

◆ loadDefaultParams()

void mrpt::nav::CPTG_DiffDrive_C::loadDefaultParams ( )
virtual

Loads a set of default parameters; provided exclusively for the PTG-configurator tool.

Reimplemented from mrpt::nav::CPTG_DiffDrive_CollisionGridBased.

◆ loadFromConfigFile()

virtual void mrpt::nav::CPTG_DiffDrive_C::loadFromConfigFile ( const mrpt::utils::CConfigFileBase cfg,
const std::string &  sSection 
)
virtual

Possible values in "params" (those in CParameterizedTrajectoryGenerator, which is called internally, plus):

  • ${sKeyPrefix}resolution: The cell size
  • ${sKeyPrefix}v_max, ${sKeyPrefix}w_max`: Maximum robot speeds.
  • `${sKeyPrefix}shape_x{0,1,2..}`,${sKeyPrefix}shape_y{0,1,2..}: Polygonal robot shape [Optional, can be also set viasetRobotPolygonShape()`]

See docs of derived classes for additional parameters in setParams()

Reimplemented from mrpt::nav::CPTG_DiffDrive_CollisionGridBased.

◆ loadFromConfigFileName()

void mrpt::utils::CLoadableOptions::loadFromConfigFileName ( const std::string &  config_file,
const std::string &  section 
)
inherited

◆ loadShapeFromConfigFile()

void mrpt::nav::CPTG_RobotShape_Polygonal::loadShapeFromConfigFile ( const mrpt::utils::CConfigFileBase source,
const std::string &  section 
)
protectedinherited

◆ maxTimeInVelCmdNOP()

virtual double mrpt::nav::CParameterizedTrajectoryGenerator::maxTimeInVelCmdNOP ( int  path_k) const
virtualinherited

Only for PTGs supporting supportVelCmdNOP(): this is the maximum time (in seconds) for which the path can be followed without re-issuing a new velcmd.

Note that this is only an absolute maximum duration, navigation implementations will check for many other conditions. Default method in the base virtual class returns 0.

Parameters
path_kQueried path k index [0,N-1]

Reimplemented in mrpt::nav::CPTG_Holo_Blend.

◆ onNewNavDynamicState()

virtual void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::onNewNavDynamicState ( )
inlinevirtualinherited

This family of PTGs ignores the dynamic states.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

Definition at line 81 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ operator delete() [1/3]

void mrpt::nav::CPTG_DiffDrive_C::operator delete ( void *  memory,
void *  ptr 
)
throw (
)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator delete() [2/3]

void mrpt::nav::CPTG_DiffDrive_C::operator delete ( void *  ptr)
throw (
)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator delete() [3/3]

void mrpt::nav::CPTG_DiffDrive_C::operator delete ( void *  ptr,
const std::nothrow_t &   
)
throw (
)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator delete[]()

void mrpt::nav::CPTG_DiffDrive_C::operator delete[] ( void *  ptr)
throw (
)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator new() [1/3]

void* mrpt::nav::CPTG_DiffDrive_C::operator new ( size_t  size,
const std::nothrow_t &   
)
throw (
)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator new() [2/3]

static void* mrpt::nav::CPTG_DiffDrive_C::operator new ( size_t  size,
void *  ptr 
)
inlinestatic

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator new() [3/3]

void* mrpt::nav::CPTG_DiffDrive_C::operator new ( size_t  size)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ operator new[]()

void* mrpt::nav::CPTG_DiffDrive_C::operator new[] ( size_t  size)
inline

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ PTG_IsIntoDomain()

bool mrpt::nav::CPTG_DiffDrive_C::PTG_IsIntoDomain ( double  x,
double  y 
) const
virtual

Returns the same than inverseMap_WS2TP() but without any additional cost.

The default implementation just calls inverseMap_WS2TP() and discards (k,d).

Reimplemented from mrpt::nav::CParameterizedTrajectoryGenerator.

◆ ptgDiffDriveSteeringFunction()

void mrpt::nav::CPTG_DiffDrive_C::ptgDiffDriveSteeringFunction ( float  alpha,
float  t,
float  x,
float  y,
float  phi,
float &  v,
float &  w 
) const
virtual

The main method to be implemented in derived classes: it defines the differential-driven differential equation.

Implements mrpt::nav::CPTG_DiffDrive_CollisionGridBased.

◆ readFromStream()

void mrpt::nav::CPTG_DiffDrive_C::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protectedvirtual

Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any error, see CStream::ReadBuffer
See also
CStream

Implements mrpt::utils::CSerializable.

◆ renderPathAsSimpleLine()

virtual void mrpt::nav::CParameterizedTrajectoryGenerator::renderPathAsSimpleLine ( const uint16_t  k,
mrpt::opengl::CSetOfLines gl_obj,
const double  decimate_distance = 0.1,
const double  max_path_distance = -1.0 
) const
virtualinherited

Returns the representation of one trajectory of this PTG as a 3D OpenGL object (a simple curved line).

Parameters
[in]kThe 0-based index of the selected trajectory (discrete "alpha" parameter).
[out]gl_objOutput object.
[in]decimate_distanceMinimum distance between path points (in meters).
[in]max_path_distanceIf >=0, cut the path at this distance (in meters).

Referenced by mrpt::nav::PlannerTPS_VirtualBase::renderMoveTree().

◆ saveColGridsToFile()

bool mrpt::nav::CPTG_DiffDrive_CollisionGridBased::saveColGridsToFile ( const std::string &  filename,
const mrpt::math::CPolygon computed_robotShape 
) const
protectedinherited

◆ saveToConfigFile()

virtual void mrpt::nav::CPTG_DiffDrive_C::saveToConfigFile ( mrpt::utils::CConfigFileBase target,
const std::string &  section 
) const
virtual

This method saves the options to a ".ini"-like file or memory-stored string list.

See also
loadFromConfigFile, saveToConfigFileName

Reimplemented from mrpt::nav::CPTG_DiffDrive_CollisionGridBased.

◆ saveToConfigFileName()

void mrpt::utils::CLoadableOptions::saveToConfigFileName ( const std::string &  config_file,
const std::string &  section 
) const
inherited

Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file.

See also
saveToConfigFile, loadFromConfigFileName

◆ setClearanceDecimatedPaths()

void mrpt::nav::CParameterizedTrajectoryGenerator::setClearanceDecimatedPaths ( const unsigned  num)
inlineinherited

Definition at line 263 of file CParameterizedTrajectoryGenerator.h.

References MRPT_OVERRIDE.

◆ setClearanceStepCount()

void mrpt::nav::CParameterizedTrajectoryGenerator::setClearanceStepCount ( const unsigned  res)
inlineinherited

Definition at line 260 of file CParameterizedTrajectoryGenerator.h.

◆ setRefDistance()

virtual void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::setRefDistance ( const double  refDist)
virtualinherited

Launches an exception in this class: it is not allowed in numerical integration-based PTGs to change the reference distance after initialization.

Reimplemented from mrpt::nav::CParameterizedTrajectoryGenerator.

◆ setRobotShape()

void mrpt::nav::CPTG_RobotShape_Polygonal::setRobotShape ( const mrpt::math::CPolygon robotShape)
inherited

Robot shape must be set before initialization, either from ctor params or via this method.

◆ setScorePriorty()

void mrpt::nav::CParameterizedTrajectoryGenerator::setScorePriorty ( double  prior)
inlineinherited

Definition at line 257 of file CParameterizedTrajectoryGenerator.h.

◆ simulateTrajectories()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::simulateTrajectories ( 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 
)
protectedinherited

Numerically solve the diferential equations to generate a family of trajectories.

◆ supportSpeedAtTarget()

virtual bool mrpt::nav::CParameterizedTrajectoryGenerator::supportSpeedAtTarget ( ) const
inlinevirtualinherited

Returns true if this PTG takes into account the desired velocity at target.

See also
updateNavDynamicState()

Definition at line 196 of file CParameterizedTrajectoryGenerator.h.

◆ supportVelCmdNOP()

virtual bool mrpt::nav::CParameterizedTrajectoryGenerator::supportVelCmdNOP ( ) const
virtualinherited

Returns true if it is possible to stop sending velocity commands to the robot and, still, the robot controller will be able to keep following the last sent trajectory ("NOP" velocity commands).

Default implementation returns "false".

Reimplemented in mrpt::nav::CPTG_Holo_Blend.

◆ updateClearance()

void mrpt::nav::CParameterizedTrajectoryGenerator::updateClearance ( const double  ox,
const double  oy,
ClearanceDiagram cd 
) const
inherited

Updates the clearance diagram given one (ox,oy) obstacle point, in coordinates relative to the PTG path origin.

Parameters
[in,out]cdThe clearance will be updated here.
See also
m_clearance_dist_resolution

◆ updateClearancePost()

void mrpt::nav::CParameterizedTrajectoryGenerator::updateClearancePost ( ClearanceDiagram cd,
const std::vector< double > &  TP_obstacles 
) const
inherited

◆ updateNavDynamicState()

void mrpt::nav::CParameterizedTrajectoryGenerator::updateNavDynamicState ( const TNavDynamicState newState,
const bool  force_update = false 
)
inherited

To be invoked by the navigator before each navigation step, to let the PTG to react to changing dynamic conditions.

◆ updateTPObstacle()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::updateTPObstacle ( double  ox,
double  oy,
std::vector< double > &  tp_obstacles 
) const
virtualinherited

Updates the radial map of closest TP-Obstacles given a single obstacle point at (ox,oy)

Parameters
[in,out]tp_obstaclesA vector of length getAlphaValuesCount(), initialized with initTPObstacles() (collision-free ranges, in "pseudometers", un-normalized).
[in]oxObstacle point (X), relative coordinates wrt origin of the PTG.
[in]oyObstacle point (Y), relative coordinates wrt origin of the PTG.
Note
The length of tp_obstacles is not checked for efficiency since this method is potentially called thousands of times per navigation timestap, so it is left to the user responsibility to provide a valid buffer.
tp_obstacles must be initialized with initTPObstacle() before call.

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ updateTPObstacleSingle()

void mrpt::nav::CPTG_DiffDrive_CollisionGridBased::updateTPObstacleSingle ( double  ox,
double  oy,
uint16_t  k,
double &  tp_obstacle_k 
) const
virtualinherited

Like updateTPObstacle() but for one direction only (k) in TP-Space.

tp_obstacle_k must be initialized with initTPObstacleSingle() before call (collision-free ranges, in "pseudometers", un-normalized).

Implements mrpt::nav::CParameterizedTrajectoryGenerator.

◆ writeToMatlab()

virtual mxArray* mrpt::utils::CSerializable::writeToMatlab ( ) const
inlinevirtualinherited

Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class.

Returns
A new mxArray (caller is responsible of memory freeing) or NULL is class does not support conversion to MATLAB.

Definition at line 79 of file CSerializable.h.

References BASE_IMPEXP, DEFINE_MRPT_OBJECT_POST, mrpt::utils::ObjectToOctetVector(), mrpt::utils::ObjectToRawString(), mrpt::utils::ObjectToString(), mrpt::utils::OctetVectorToObject(), mrpt::utils::RawStringToObject(), and mrpt::utils::StringToObject().

◆ writeToStream()

void mrpt::nav::CPTG_DiffDrive_C::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protectedvirtual

Introduces a pure virtual method responsible for writing to a CStream.

This can not be used directly be users, instead use "stream << object;" for writing it to a stream.

Parameters
outThe output binary stream where object must be dumped.
getVersionIf NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data.
Exceptions
std::exceptionOn any error, see CStream::WriteBuffer
See also
CStream

Implements mrpt::utils::CSerializable.

Member Data Documentation

◆ _init_CPTG_DiffDrive_C

mrpt::utils::CLASSINIT mrpt::nav::CPTG_DiffDrive_C::_init_CPTG_DiffDrive_C
staticprotected

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ classCObject

const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject
staticinherited

Definition at line 128 of file CObject.h.

◆ classCParameterizedTrajectoryGenerator

const mrpt::utils::TRuntimeClassId mrpt::nav::CParameterizedTrajectoryGenerator::classCParameterizedTrajectoryGenerator
staticinherited

Definition at line 65 of file CParameterizedTrajectoryGenerator.h.

◆ classCPTG_DiffDrive_C

mrpt::utils::TRuntimeClassId mrpt::nav::CPTG_DiffDrive_C::classCPTG_DiffDrive_C
static

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ classCSerializable

const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable
staticinherited

Definition at line 42 of file CSerializable.h.

◆ classinfo

const mrpt::utils::TRuntimeClassId* mrpt::nav::CPTG_DiffDrive_C::classinfo
static

Definition at line 43 of file CPTG_DiffDrive_C.h.

◆ COLLISION_BEHAVIOR

PTG_collision_behavior_t mrpt::nav::CParameterizedTrajectoryGenerator::COLLISION_BEHAVIOR
staticinherited

Defines the behavior when there is an obstacle inside the robot shape right at the beginning of a PTG trajectory.

Default value: COLL_BEH_BACK_AWAY

Definition at line 296 of file CParameterizedTrajectoryGenerator.h.

◆ INVALID_PTG_PATH_INDEX

const uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::INVALID_PTG_PATH_INDEX = static_cast<uint16_t>(-1)
staticprotectedinherited

Definition at line 317 of file CParameterizedTrajectoryGenerator.h.

◆ K

double mrpt::nav::CPTG_DiffDrive_C::K
protected

A generation parameter.

Definition at line 60 of file CPTG_DiffDrive_C.h.

◆ m_alphaValuesCount

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::m_alphaValuesCount
protectedinherited

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

Definition at line 310 of file CParameterizedTrajectoryGenerator.h.

◆ m_clearance_decimated_paths

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::m_clearance_decimated_paths
protectedinherited

Number of paths for the decimated paths analysis of clearance.

Definition at line 313 of file CParameterizedTrajectoryGenerator.h.

◆ m_clearance_num_points

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::m_clearance_num_points
protectedinherited

Number of steps for the piecewise-constant approximation of clearance from TPS distances [0,1] (Default=5)

See also
updateClearance()

Definition at line 312 of file CParameterizedTrajectoryGenerator.h.

◆ m_collisionGrid

CCollisionGrid mrpt::nav::CPTG_DiffDrive_CollisionGridBased::m_collisionGrid
protectedinherited

The collision grid.

Definition at line 167 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ m_is_initialized

bool mrpt::nav::CParameterizedTrajectoryGenerator::m_is_initialized
protectedinherited

Definition at line 319 of file CParameterizedTrajectoryGenerator.h.

◆ m_lambdaFunctionOptimizer

mrpt::utils::CDynamicGrid<TCellForLambdaFunction> mrpt::nav::CPTG_DiffDrive_CollisionGridBased::m_lambdaFunctionOptimizer
protectedinherited

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

Definition at line 188 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ m_nav_dyn_state

TNavDynamicState mrpt::nav::CParameterizedTrajectoryGenerator::m_nav_dyn_state
protectedinherited

Updated before each nav step by.

Definition at line 314 of file CParameterizedTrajectoryGenerator.h.

◆ m_nav_dyn_state_target_k

uint16_t mrpt::nav::CParameterizedTrajectoryGenerator::m_nav_dyn_state_target_k
protectedinherited

Update in updateNavDynamicState(), contains the path index (k) for the target.

Definition at line 315 of file CParameterizedTrajectoryGenerator.h.

◆ m_resolution

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::m_resolution
protectedinherited

Definition at line 112 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ m_robotMaxRadius

double mrpt::nav::CPTG_RobotShape_Polygonal::m_robotMaxRadius
protectedinherited

Definition at line 369 of file CParameterizedTrajectoryGenerator.h.

◆ m_robotShape

mrpt::math::CPolygon mrpt::nav::CPTG_RobotShape_Polygonal::m_robotShape
protectedinherited

Definition at line 368 of file CParameterizedTrajectoryGenerator.h.

◆ m_score_priority

double mrpt::nav::CParameterizedTrajectoryGenerator::m_score_priority
protectedinherited

Definition at line 311 of file CParameterizedTrajectoryGenerator.h.

◆ m_stepTimeDuration

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::m_stepTimeDuration
protectedinherited

Definition at line 113 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ m_trajectory

std::vector<TCPointVector> mrpt::nav::CPTG_DiffDrive_CollisionGridBased::m_trajectory
protectedinherited

Definition at line 111 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ OUTPUT_DEBUG_PATH_PREFIX

std::string mrpt::nav::CParameterizedTrajectoryGenerator::OUTPUT_DEBUG_PATH_PREFIX
staticinherited

The path used as defaul output in, for example, debugDumpInFiles. (Default="./reactivenav.logs/")

Definition at line 227 of file CParameterizedTrajectoryGenerator.h.

◆ refDistance

double mrpt::nav::CParameterizedTrajectoryGenerator::refDistance
protectedinherited

Definition at line 309 of file CParameterizedTrajectoryGenerator.h.

◆ turningRadiusReference

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::turningRadiusReference
protectedinherited

Definition at line 110 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ V_MAX

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::V_MAX
protectedinherited

Definition at line 109 of file CPTG_DiffDrive_CollisionGridBased.h.

◆ W_MAX

double mrpt::nav::CPTG_DiffDrive_CollisionGridBased::W_MAX
protectedinherited

Definition at line 109 of file CPTG_DiffDrive_CollisionGridBased.h.




Page generated by Doxygen 1.8.13 for MRPT 1.5.3 at Tue Aug 22 01:03:35 UTC 2017