Main MRPT website > C++ reference for MRPT 1.9.9
CAbstractPTGBasedReactive.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef CAbstractPTGBasedReactive_H
10 #define CAbstractPTGBasedReactive_H
11 
19 #include <mrpt/utils/CTimeLogger.h>
20 #include <mrpt/system/datetime.h>
21 #include <mrpt/math/filters.h>
22 #include <mrpt/math/CPolygon.h>
24 #include <memory> // unique_ptr
25 
26 namespace mrpt
27 {
28 namespace nav
29 {
30 /** Base class for reactive navigator systems based on TP-Space, with an
31  * arbitrary holonomic
32  * reactive method running on it and any number of PTGs for transforming the
33  * navigation space.
34  * Both, the holonomic method and the PTGs can be customized by the apropriate
35  * user derived classes.
36  *
37  * How to use:
38  * - Instantiate a reactive navigation object (one of the derived classes of
39  * this virtual class).
40  * - A class with callbacks must be defined by the user and provided to the
41  * constructor (derived from CRobot2NavInterface)
42  * - loadConfigFile() must be called to set up the bunch of parameters from a
43  * config file (could be a memory-based virtual config file).
44  * - navigationStep() must be called periodically in order to effectively run
45  * the navigation. This method will internally call the callbacks to gather
46  * sensor data and robot positioning data.
47  *
48  * For working examples, refer to the source code of the apps:
49  * -
50  * [ReactiveNavigationDemo](http://www.mrpt.org/list-of-mrpt-apps/application-reactivenavigationdemo/)
51  * -
52  * [ReactiveNav3D-Demo](http://www.mrpt.org/list-of-mrpt-apps/application-reactivenav3d-demo/)
53  *
54  * Publications:
55  * - See derived classes for papers on each specific method.
56  *
57  * Available "variables" or "score names" for each motion candidate (these can
58  * be used in runtime-compiled expressions
59  * in the configuration files of motion deciders):
60  *
61  * - `clearance`: Clearance (larger means larger distances to obstacles) for
62  * the path from "current pose" up to "end of trajectory".
63  * - `collision_free_distance`: Normalized [0,1] collision-free distance in
64  * selected path. For NOP candidates, the traveled distances is substracted.
65  * - `dist_eucl_final`: Euclidean distance (in the real-world WordSpace)
66  * between "end of trajectory" and target.
67  * - `eta`: Estimated Time of Arrival at "end of trajectory".
68  * - `hysteresis`: Measure of similarity with previous command [0,1]
69  * - `is_PTG_cont`: 1 (is "NOP" motion command), 0 otherwise
70  * - `is_slowdown`: 1 if PTG returns true in
71  * CParameterizedTrajectoryGenerator::supportSpeedAtTarget() for this step.
72  * - `move_cur_d`: Normalized distance already traveled over the selected PTG.
73  * Normally 0, unless in a "NOP motion".
74  * - `move_k`: Motion candidate path 0-based index.
75  * - `num_paths`: Number of paths in the PTG
76  * - `original_col_free_dist`: Only for "NOP motions", the collision-free
77  * distance when the motion command was originally issued.
78  * - `ptg_idx`: PTG index (0-based)
79  * - `ptg_priority`: Product of PTG getScorePriority() times PTG
80  * evalPathRelativePriority()
81  * - `ref_dist`: PTG ref distance [m]
82  * - `robpose_x`, `robpose_y`, `robpose_phi`: Robot pose ([m] and [rad]) at the
83  * "end of trajectory": at collision or at target distance.
84  * - `target_d_norm`: Normalized target distance. Can be >1 if distance is
85  * larger than ref_distance.
86  * - `target_dir`: Angle of target in TP-Space [rad]
87  * - `target_k`: Same as target_dir but in discrete path 0-based indices.
88  * - `WS_target_x`, `WS_target_y`: Target coordinates in realworld [m]
89  *
90  * \sa CReactiveNavigationSystem, CReactiveNavigationSystem3D
91  * \ingroup nav_reactive
92  */
94 {
95  public:
97 
98  /** The struct for configuring navigation requests to
99  * CAbstractPTGBasedReactive and derived classes. */
102  {
103  /** (Default=empty) Optionally, a list of PTG indices can be sent such
104  * that
105  * the navigator will restrict itself to only employ those PTGs. */
106  std::vector<size_t> restrict_PTG_indices;
107 
108  virtual std::string getAsText() const override;
109  virtual std::unique_ptr<TNavigationParams> clone() const override
110  {
111  return std::unique_ptr<TNavigationParams>(
112  new TNavigationParamsPTG(*this));
113  }
114 
115  protected:
116  virtual bool isEqual(
117  const CAbstractNavigator::TNavigationParamsBase& o) const override;
118  };
119 
120  /** Constructor.
121  * \param[in] react_iterf_impl An instance of an object that implement all
122  * the required interfaces to read from and control a robot.
123  * \param[in] enableConsoleOutput Can be set to false to reduce verbosity.
124  * \param[in] enableLogFile Set to true to enable creation of navigation
125  * log files, useful for inspection and debugging.
126  */
128  CRobot2NavInterface& react_iterf_impl, bool enableConsoleOutput = true,
129  bool enableLogFile = false, const std::string& logFileDirectory =
130  std::string("./reactivenav.logs"));
131 
132  virtual ~CAbstractPTGBasedReactive();
133 
134  /** Must be called for loading collision grids, or the first navigation
135  * command may last a long time to be executed.
136  * Internally, it just calls STEP1_CollisionGridsBuilder().
137  */
138  void initialize() override;
139 
140  /** Selects which one from the set of available holonomic methods will be
141  * used
142  * into transformed TP-Space, and sets its configuration from a
143  * configuration file.
144  * Available methods: class names of those derived from
145  * CAbstractHolonomicReactiveMethod
146  */
147  void setHolonomicMethod(
148  const std::string& method, const mrpt::utils::CConfigFileBase& cfgBase);
149 
150  /** Provides a copy of the last log record with information about execution.
151  * \param o An object where the log will be stored into.
152  * \note Log records are not prepared unless either "enableLogFile" is
153  * enabled in the constructor or "enableLogFile()" has been called.
154  */
156 
157  /** Enables keeping an internal registry of navigation logs that can be
158  * queried with getLastLogRecord() */
159  void enableKeepLogRecords(bool enable = true)
160  {
161  m_enableKeepLogRecords = enable;
162  }
163 
164  /** Enables/disables saving log files. */
165  void enableLogFile(bool enable);
166 
167  /** Changes the prefix for new log files. */
169  {
170  m_navlogfiles_dir = sDir;
171  }
174  {
175  /** C++ class name of the holonomic navigation method to run in the
176  * transformed TP-Space */
178  /** C++ class name of the motion chooser */
180 
181  /** (Default: ".") */
183  /** Maximum distance up to obstacles will be considered (D_{max} in
184  * papers). */
185  double ref_distance;
186  /** Time constant (in seconds) for the low-pass filter applied to
187  * kinematic velocity commands (default=0: no filtering) */
189 
190  /** In normalized distances, the start and end of a ramp function that
191  * scales the velocity
192  * output from the holonomic navigator:
193  *
194  * \code
195  * velocity scale
196  * ^
197  * | _____________
198  * | /
199  * 1 | /
200  * | /
201  * 0 +-------+---|----------------> normalized distance
202  * Start
203  * End
204  * \endcode
205  *
206  */
209  /** Max distance [meters] to discard current PTG and issue a new vel cmd
210  * (default= 0.05) */
212  /** Min normalized dist [0,1] after current pose in a PTG continuation
213  * to allow it. */
215 
216  /** Params related to speed limits. */
220  /** Default: false */
222  /** Max dist [meters] to use time-based path prediction for NOP
223  * evaluation. */
225 
226  virtual void loadFromConfigFile(
228  const std::string& s) override;
229  virtual void saveToConfigFile(
231  const std::string& s) const override;
233  };
234 
236 
237  virtual void loadConfigFile(const mrpt::utils::CConfigFileBase& c)
238  override; // See base class docs!
240  const override; // See base class docs!
241 
242  /** Enables/disables the detailed time logger (default:disabled upon
243  * construction)
244  * When enabled, a report will be dumped to std::cout upon destruction.
245  * \sa getTimeLogger
246  */
247  void enableTimeLog(bool enable = true) { m_timelogger.enable(enable); }
248  /** Gives access to a const-ref to the internal time logger \sa
249  * enableTimeLog */
251  {
252  return m_timelogger;
253  }
254 
255  /** Returns the number of different PTGs that have been setup */
256  virtual size_t getPTG_count() const = 0;
257  /** Gets the i'th PTG */
259  /** Gets the i'th PTG */
260  virtual const CParameterizedTrajectoryGenerator* getPTG(size_t i) const = 0;
261 
262  /** Get the current, global (honored for all PTGs) robot speed limits */
265  {
267  }
268 
269  /** Changes the current, global (honored for all PTGs) robot speed limits,
270  * via returning a reference to a structure that holds those limits */
273  {
275  }
276 
277  /** Changes this parameter in all inner holonomic navigator instances [m].
278  */
279  void setTargetApproachSlowDownDistance(const double dist);
280  /** Returns this parameter for the first inner holonomic navigator instances
281  * [m] (should be the same in all of them?) */
282  double getTargetApproachSlowDownDistance() const;
283 
284  protected:
285  /** The main method for the navigator */
286  virtual void performNavigationStep() override;
287 
288  /** The holonomic navigation algorithm (one object per PTG, so internal
289  * states are maintained) */
290  std::vector<CAbstractHolonomicReactiveMethod::Ptr> m_holonomicMethod;
291  std::unique_ptr<mrpt::utils::CStream> m_logFile;
292  /** The current log file stream, or nullptr if not being used */
294  /** See enableKeepLogRecords */
296  /** The last log */
298  /** Last velocity commands */
300 
301  /** Critical zones */
302  std::recursive_mutex m_critZoneLastLog;
303 
304  /** Enables / disables the console debug output. */
306  /** Whether \a loadConfigFile() has been called or not. */
309 
310  /** A complete time logger \sa enableTimeLog() */
313 
314  /** @name Variables for CReactiveNavigationSystem::performNavigationStep
315  @{ */
319  /** Runtime estimation of execution period of the method. */
323  /** @} */
324 
325  virtual bool impl_waypoint_is_reachable(
326  const mrpt::math::TPoint2D& wp_local_wrt_robot)
327  const override; // See docs in base class
328 
329  // Steps for the reactive navigation sytem.
330  // ----------------------------------------------------------------------------
331  virtual void STEP1_InitPTGs() = 0;
332 
333  /** Return false on any fatal error */
335  mrpt::system::TTimeStamp& obs_timestamp) = 0;
336  bool STEP2_SenseObstacles();
337 
338  /** Builds TP-Obstacles from Workspace obstacles for the given PTG.
339  * "out_TPObstacles" is already initialized to the proper length and
340  * maximum collision-free distance for each "k" trajectory index.
341  * Distances are in "pseudo-meters". They will be normalized automatically
342  * to [0,1] upon return. */
343  virtual void STEP3_WSpaceToTPSpace(
344  const size_t ptg_idx, std::vector<double>& out_TPObstacles,
345  mrpt::nav::ClearanceDiagram& out_clearance,
346  const mrpt::math::TPose2D& rel_pose_PTG_origin_wrt_sense,
347  const bool eval_clearance) = 0;
348 
349  /** Generates a pointcloud of obstacles, and the robot shape, to be saved in
350  * the logging record for the current timestep */
351  virtual void loggingGetWSObstaclesAndShape(CLogFileRecord& out_log) = 0;
352 
353  struct PTGTarget
354  {
355  /** For each PTG, whether target falls into the PTG domain. */
356  bool valid_TP;
357  /** The Target, in TP-Space (x,y) */
359  /** TP-Target */
361  /** The discrete version of target_alpha */
362  int target_k;
363 
364  PTGTarget() : valid_TP(false) {}
365  };
366 
367  /** Scores \a holonomicMovement */
369  TCandidateMovementPTG& holonomicMovement,
370  const std::vector<double>& in_TPObstacles,
371  const mrpt::nav::ClearanceDiagram& in_clearance,
372  const std::vector<mrpt::math::TPose2D>& WS_Targets,
373  const std::vector<PTGTarget>& TP_Targets,
375  const bool this_is_PTG_continuation,
376  const mrpt::math::TPose2D& relPoseVelCmd_NOP,
377  const unsigned int ptg_idx4weights,
378  const mrpt::system::TTimeStamp tim_start_iteration);
379 
380  /** Return the [0,1] velocity scale of raw PTG cmd_vel */
381  virtual double generate_vel_cmd(
382  const TCandidateMovementPTG& in_movement,
385  CLogFileRecord& newLogRec,
386  const std::vector<mrpt::math::TPose2D>& relTargets, int nSelectedPTG,
387  const mrpt::kinematics::CVehicleVelCmd::Ptr& new_vel_cmd, int nPTGs,
388  const bool best_is_NOP_cmdvel,
389  const math::TPose2D& rel_cur_pose_wrt_last_vel_cmd_NOP,
390  const math::TPose2D& rel_pose_PTG_origin_wrt_sense_NOP,
391  const double executionTimeValue, const double tim_changeSpeed,
392  const mrpt::system::TTimeStamp& tim_start_iteration);
393 
394  /** To be called during children destructors to assure thread-safe
395  * destruction, and free of shared objects. */
396  void preDestructor();
397  virtual void onStartNewNavigation() override;
398 
399  /** Signal that the destructor has been called, so no more calls are
400  * accepted from other threads */
402 
404  /** Default: none */
406 
408 
409  struct TInfoPerPTG
410  {
411  std::vector<PTGTarget> targets;
412  /** One distance per discretized alpha value, describing the "polar
413  * plot" of TP obstacles. */
414  std::vector<double> TP_Obstacles;
415  /** Clearance for each path */
417  };
418 
419  /** Temporary buffers for working with each PTG during a navigationStep() */
420  std::vector<TInfoPerPTG> m_infoPerPTG;
422 
424  CParameterizedTrajectoryGenerator* ptg, const size_t indexPTG,
425  const std::vector<mrpt::math::TPose2D>& relTargets,
426  const mrpt::math::TPose2D& rel_pose_PTG_origin_wrt_sense,
427  TInfoPerPTG& ipf, TCandidateMovementPTG& holonomicMovement,
428  CLogFileRecord& newLogRec, const bool this_is_PTG_continuation,
430  const mrpt::system::TTimeStamp tim_start_iteration,
431  const TNavigationParams& navp = TNavigationParams(),
432  const mrpt::math::TPose2D& relPoseVelCmd_NOP = mrpt::poses::CPose2D());
433 
434  struct TSentVelCmd
435  {
436  /** 0-based index of used PTG */
438  /** Path index for selected PTG */
440  /** Timestamp of when the cmd was sent */
442  /** Robot pose & velocities and timestamp of when it was queried */
444  /** TP-Obstacles in the move direction at the instant of picking this
445  * movement */
448  /** [0,1] scale of the raw cmd_vel as generated by the PTG */
449  double speed_scale;
451 
452  bool isValid() const;
453  void reset();
454  TSentVelCmd();
455  };
456 
458 
459  private:
460  /** Delete m_holonomicMethod */
461  void deleteHolonomicObjects();
462 
463  /** Default: "./reactivenav.logs" */
465 
467  /** A copy of last-iteration navparams, used to detect changes */
468  std::unique_ptr<TNavigationParams> m_copy_prev_navParams;
469 
470 }; // end of CAbstractPTGBasedReactive
471 }
472 }
473 
474 #endif
std::shared_ptr< CVehicleVelCmd > Ptr
std::shared_ptr< CPointCloudFilterBase > Ptr
A base class for holonomic reactive navigation methods.
Base class for reactive navigator systems based on TP-Space, with an arbitrary holonomic reactive met...
bool m_enableKeepLogRecords
See enableKeepLogRecords.
void setLogFileDirectory(const std::string &sDir)
Changes the prefix for new log files.
std::unique_ptr< mrpt::utils::CStream > m_logFile
mrpt::math::LowPassFilter_IIR1 timoff_obstacles_avr
void STEP8_GenerateLogRecord(CLogFileRecord &newLogRec, const std::vector< mrpt::math::TPose2D > &relTargets, int nSelectedPTG, const mrpt::kinematics::CVehicleVelCmd::Ptr &new_vel_cmd, int nPTGs, const bool best_is_NOP_cmdvel, const math::TPose2D &rel_cur_pose_wrt_last_vel_cmd_NOP, const math::TPose2D &rel_pose_PTG_origin_wrt_sense_NOP, const double executionTimeValue, const double tim_changeSpeed, const mrpt::system::TTimeStamp &tim_start_iteration)
bool m_enableConsoleOutput
Enables / disables the console debug output.
virtual void loggingGetWSObstaclesAndShape(CLogFileRecord &out_log)=0
Generates a pointcloud of obstacles, and the robot shape, to be saved in the logging record for the c...
void deleteHolonomicObjects()
Delete m_holonomicMethod.
virtual void loadConfigFile(const mrpt::utils::CConfigFileBase &c) override
Loads all params from a file.
void preDestructor()
To be called during children destructors to assure thread-safe destruction, and free of shared object...
mrpt::nav::CMultiObjectiveMotionOptimizerBase::Ptr m_multiobjopt
mrpt::math::LowPassFilter_IIR1 timoff_curPoseAndSpeed_avr
virtual bool implementSenseObstacles(mrpt::system::TTimeStamp &obs_timestamp)=0
Return false on any fatal error.
bool m_init_done
Whether loadConfigFile() has been called or not.
TAbstractPTGNavigatorParams params_abstract_ptg_navigator
mrpt::math::LowPassFilter_IIR1 timoff_sendVelCmd_avr
bool m_closing_navigator
Signal that the destructor has been called, so no more calls are accepted from other threads.
virtual void onStartNewNavigation() override
Called whenever a new navigation has been started.
virtual void performNavigationStep() override
The main method for the navigator.
virtual size_t getPTG_count() const =0
Returns the number of different PTGs that have been setup.
std::recursive_mutex m_critZoneLastLog
Critical zones.
mrpt::kinematics::CVehicleVelCmd::TVelCmdParams & changeCurrentRobotSpeedLimits()
Changes the current, global (honored for all PTGs) robot speed limits, via returning a reference to a...
mrpt::math::LowPassFilter_IIR1 tim_changeSpeed_avr
CAbstractPTGBasedReactive(CRobot2NavInterface &react_iterf_impl, bool enableConsoleOutput=true, bool enableLogFile=false, const std::string &logFileDirectory=std::string("./reactivenav.logs"))
Constructor.
mrpt::math::LowPassFilter_IIR1 meanExecutionTime
void initialize() override
Must be called for loading collision grids, or the first navigation command may last a long time to b...
virtual const CParameterizedTrajectoryGenerator * getPTG(size_t i) const =0
Gets the i'th PTG.
mrpt::kinematics::CVehicleVelCmd::Ptr m_last_vel_cmd
Last velocity commands.
std::vector< CAbstractHolonomicReactiveMethod::Ptr > m_holonomicMethod
The holonomic navigation algorithm (one object per PTG, so internal states are maintained)
double getTargetApproachSlowDownDistance() const
Returns this parameter for the first inner holonomic navigator instances [m] (should be the same in a...
virtual CParameterizedTrajectoryGenerator * getPTG(size_t i)=0
Gets the i'th PTG.
virtual bool impl_waypoint_is_reachable(const mrpt::math::TPoint2D &wp_local_wrt_robot) const override
Implements the way to waypoint is free function in children classes: true must be returned if,...
void getLastLogRecord(CLogFileRecord &o)
Provides a copy of the last log record with information about execution.
void setHolonomicMethod(const std::string &method, const mrpt::utils::CConfigFileBase &cfgBase)
Selects which one from the set of available holonomic methods will be used into transformed TP-Space,...
void enableTimeLog(bool enable=true)
Enables/disables the detailed time logger (default:disabled upon construction) When enabled,...
std::vector< TInfoPerPTG > m_infoPerPTG
Temporary buffers for working with each PTG during a navigationStep()
virtual void STEP3_WSpaceToTPSpace(const size_t ptg_idx, std::vector< double > &out_TPObstacles, mrpt::nav::ClearanceDiagram &out_clearance, const mrpt::math::TPose2D &rel_pose_PTG_origin_wrt_sense, const bool eval_clearance)=0
Builds TP-Obstacles from Workspace obstacles for the given PTG.
std::unique_ptr< TNavigationParams > m_copy_prev_navParams
A copy of last-iteration navparams, used to detect changes.
const mrpt::utils::CTimeLogger & getTimeLogger() const
Gives access to a const-ref to the internal time logger.
mrpt::math::LowPassFilter_IIR1 meanExecutionPeriod
Runtime estimation of execution period of the method.
void enableKeepLogRecords(bool enable=true)
Enables keeping an internal registry of navigation logs that can be queried with getLastLogRecord()
virtual void saveConfigFile(mrpt::utils::CConfigFileBase &c) const override
Saves all current options to a config file.
mrpt::utils::CTimeLogger m_timelogger
A complete time logger.
mrpt::math::LowPassFilter_IIR1 meanTotalExecutionTime
void setTargetApproachSlowDownDistance(const double dist)
Changes this parameter in all inner holonomic navigator instances [m].
const mrpt::kinematics::CVehicleVelCmd::TVelCmdParams & getCurrentRobotSpeedLimits() const
Get the current, global (honored for all PTGs) robot speed limits.
void calc_move_candidate_scores(TCandidateMovementPTG &holonomicMovement, const std::vector< double > &in_TPObstacles, const mrpt::nav::ClearanceDiagram &in_clearance, const std::vector< mrpt::math::TPose2D > &WS_Targets, const std::vector< PTGTarget > &TP_Targets, CLogFileRecord::TInfoPerPTG &log, CLogFileRecord &newLogRec, const bool this_is_PTG_continuation, const mrpt::math::TPose2D &relPoseVelCmd_NOP, const unsigned int ptg_idx4weights, const mrpt::system::TTimeStamp tim_start_iteration)
Scores holonomicMovement.
void enableLogFile(bool enable)
Enables/disables saving log files.
virtual double generate_vel_cmd(const TCandidateMovementPTG &in_movement, mrpt::kinematics::CVehicleVelCmd::Ptr &new_vel_cmd)
Return the [0,1] velocity scale of raw PTG cmd_vel.
void build_movement_candidate(CParameterizedTrajectoryGenerator *ptg, const size_t indexPTG, const std::vector< mrpt::math::TPose2D > &relTargets, const mrpt::math::TPose2D &rel_pose_PTG_origin_wrt_sense, TInfoPerPTG &ipf, TCandidateMovementPTG &holonomicMovement, CLogFileRecord &newLogRec, const bool this_is_PTG_continuation, mrpt::nav::CAbstractHolonomicReactiveMethod &holoMethod, const mrpt::system::TTimeStamp tim_start_iteration, const TNavigationParams &navp=TNavigationParams(), const mrpt::math::TPose2D &relPoseVelCmd_NOP=mrpt::poses::CPose2D())
std::string m_navlogfiles_dir
Default: "./reactivenav.logs".
mrpt::maps::CPointCloudFilterBase::Ptr m_WS_filter
Default: none.
mrpt::utils::CStream * m_prev_logfile
The current log file stream, or nullptr if not being used.
A class for storing, saving and loading a reactive navigation log record for the CReactiveNavigationS...
std::shared_ptr< CMultiObjectiveMotionOptimizerBase > Ptr
This is the base class for any user-defined PTG.
The pure virtual interface between a real or simulated robot and any CAbstractNavigator-derived class...
This class extends CAbstractNavigator with the capability of following a list of waypoints.
Clearance information for one particular PTG and one set of obstacles.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
Definition: CPose2D.h:41
This class allows loading and storing values and vectors of different types from a configuration text...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:42
This class implements a high-performance stopwatch.
Definition: CTicTac.h:24
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X),...
Definition: CTimeLogger.h:46
void enable(bool enabled=true)
Definition: CTimeLogger.h:107
const GLubyte * c
Definition: glext.h:6313
GLdouble s
Definition: glext.h:3676
GLsizei const GLchar ** string
Definition: glext.h:4101
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:32
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Definition: memory.h:134
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Parameters that may be used by cmdVel_limits() in any derived classes.
1-order low-pass IIR filter.
Definition: filters.h:27
Lightweight 2D point.
Lightweight 2D pose.
Base for all high-level navigation commands.
The struct for configuring navigation requests.
int target_k
The discrete version of target_alpha.
bool valid_TP
For each PTG, whether target falls into the PTG domain.
mrpt::math::TPoint2D TP_Target
The Target, in TP-Space (x,y)
mrpt::kinematics::CVehicleVelCmd::TVelCmdParams robot_absolute_speed_limits
Params related to speed limits.
virtual void loadFromConfigFile(const mrpt::utils::CConfigFileBase &c, const std::string &s) override
This method load the options from a ".ini"-like file or memory-stored string list.
double secure_distance_start
In normalized distances, the start and end of a ramp function that scales the velocity output from th...
double min_normalized_free_space_for_ptg_continuation
Min normalized dist [0,1] after current pose in a PTG continuation to allow it.
std::string holonomic_method
C++ class name of the holonomic navigation method to run in the transformed TP-Space.
double max_dist_for_timebased_path_prediction
Max dist [meters] to use time-based path prediction for NOP evaluation.
virtual void saveToConfigFile(mrpt::utils::CConfigFileBase &c, const std::string &s) const override
This method saves the options to a ".ini"-like file or memory-stored string list.
std::string motion_decider_method
C++ class name of the motion chooser.
double speedfilter_tau
Time constant (in seconds) for the low-pass filter applied to kinematic velocity commands (default=0:...
double max_distance_predicted_actual_path
Max distance [meters] to discard current PTG and issue a new vel cmd (default= 0.05)
double ref_distance
Maximum distance up to obstacles will be considered (D_{max} in papers).
std::vector< double > TP_Obstacles
One distance per discretized alpha value, describing the "polar plot" of TP obstacles.
ClearanceDiagram clearance
Clearance for each path.
The struct for configuring navigation requests to CAbstractPTGBasedReactive and derived classes.
virtual std::string getAsText() const override
Gets navigation params as a human-readable format.
virtual std::unique_ptr< TNavigationParams > clone() const override
std::vector< size_t > restrict_PTG_indices
(Default=empty) Optionally, a list of PTG indices can be sent such that the navigator will restrict i...
virtual bool isEqual(const CAbstractNavigator::TNavigationParamsBase &o) const override
double speed_scale
[0,1] scale of the raw cmd_vel as generated by the PTG
TRobotPoseVel poseVel
Robot pose & velocities and timestamp of when it was queried.
double colfreedist_move_k
TP-Obstacles in the move direction at the instant of picking this movement.
CParameterizedTrajectoryGenerator::TNavDynamicState ptg_dynState
mrpt::system::TTimeStamp tim_send_cmd_vel
Timestamp of when the cmd was sent.
The structure used to store all relevant information about each transformation into TP-Space.
Dynamic state that may affect the PTG path parameterization.
The struct for configuring navigation requests to CWaypointsNavigator and derived classes.
Stores a candidate movement in TP-Space-based navigation.



Page generated by Doxygen 1.9.1 for MRPT 1.9.9 Git: 63ea9d1f1 Thu Nov 23 00:06:53 2017 +0100 at mar 26 may 2026 12:19:29 CEST