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-2018, 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 
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::nav
27 {
28 /** Base class for reactive navigator systems based on TP-Space, with an
29  * arbitrary holonomic
30  * reactive method running on it and any number of PTGs for transforming the
31  * navigation space.
32  * Both, the holonomic method and the PTGs can be customized by the apropriate
33  * user derived classes.
34  *
35  * How to use:
36  * - Instantiate a reactive navigation object (one of the derived classes of
37  * this virtual class).
38  * - A class with callbacks must be defined by the user and provided to the
39  * constructor (derived from CRobot2NavInterface)
40  * - loadConfigFile() must be called to set up the bunch of parameters from a
41  * config file (could be a memory-based virtual config file).
42  * - navigationStep() must be called periodically in order to effectively run
43  * the navigation. This method will internally call the callbacks to gather
44  * sensor data and robot positioning data.
45  *
46  * For working examples, refer to the source code of the apps:
47  * -
48  * [ReactiveNavigationDemo](http://www.mrpt.org/list-of-mrpt-apps/application-reactivenavigationdemo/)
49  * -
50  * [ReactiveNav3D-Demo](http://www.mrpt.org/list-of-mrpt-apps/application-reactivenav3d-demo/)
51  *
52  * Publications:
53  * - See derived classes for papers on each specific method.
54  *
55  * Available "variables" or "score names" for each motion candidate (these can
56  * be used in runtime-compiled expressions
57  * in the configuration files of motion deciders):
58  *
59  * - `clearance`: Clearance (larger means larger distances to obstacles) for
60  * the path from "current pose" up to "end of trajectory".
61  * - `collision_free_distance`: Normalized [0,1] collision-free distance in
62  * selected path. For NOP candidates, the traveled distances is substracted.
63  * - `dist_eucl_final`: Euclidean distance (in the real-world WordSpace)
64  * between "end of trajectory" and target.
65  * - `eta`: Estimated Time of Arrival at "end of trajectory".
66  * - `holo_stage_eval`: Final evaluation of the selected direction from inside
67  * of the holonomic algorithm.
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,
149  const mrpt::config::CConfigFileBase& cfgBase);
150 
151  /** Provides a copy of the last log record with information about execution.
152  * \param o An object where the log will be stored into.
153  * \note Log records are not prepared unless either "enableLogFile" is
154  * enabled in the constructor or "enableLogFile()" has been called.
155  */
157 
158  /** Enables keeping an internal registry of navigation logs that can be
159  * queried with getLastLogRecord() */
160  void enableKeepLogRecords(bool enable = true)
161  {
162  m_enableKeepLogRecords = enable;
163  }
164 
165  /** Enables/disables saving log files. */
166  void enableLogFile(bool enable);
167 
168  /** Changes the prefix for new log files. */
170  {
171  m_navlogfiles_dir = sDir;
172  }
175  {
176  /** C++ class name of the holonomic navigation method to run in the
177  * transformed TP-Space */
179  /** C++ class name of the motion chooser */
181 
182  /** (Default: ".") */
184  /** Maximum distance up to obstacles will be considered (D_{max} in
185  * papers). */
186  double ref_distance;
187  /** Time constant (in seconds) for the low-pass filter applied to
188  * kinematic velocity commands (default=0: no filtering) */
190 
191  /** In normalized distances, the start and end of a ramp function that
192  * scales the velocity
193  * output from the holonomic navigator:
194  *
195  * \code
196  * velocity scale
197  * ^
198  * | _____________
199  * | /
200  * 1 | /
201  * | /
202  * 0 +-------+---|----------------> normalized distance
203  * Start
204  * End
205  * \endcode
206  *
207  */
210  /** Max distance [meters] to discard current PTG and issue a new vel cmd
211  * (default= 0.05) */
213  /** Min normalized dist [0,1] after current pose in a PTG continuation
214  * to allow it. */
216 
217  /** Params related to speed limits. */
221  /** Default: false */
223  /** Max dist [meters] to use time-based path prediction for NOP
224  * evaluation. */
226 
227  virtual void loadFromConfigFile(
229  const std::string& s) override;
230  virtual void saveToConfigFile(
232  const std::string& s) const override;
234  };
235 
237 
238  virtual void loadConfigFile(const mrpt::config::CConfigFileBase& c)
239  override; // See base class docs!
241  const override; // See base class docs!
242 
243  /** Enables/disables the detailed time logger (default:disabled upon
244  * construction)
245  * When enabled, a report will be dumped to std::cout upon destruction.
246  * \sa getTimeLogger
247  */
248  void enableTimeLog(bool enable = true) { m_timelogger.enable(enable); }
249  /** Gives access to a const-ref to the internal time logger \sa
250  * enableTimeLog */
252  {
253  return m_timelogger;
254  }
255 
256  /** Returns the number of different PTGs that have been setup */
257  virtual size_t getPTG_count() const = 0;
258  /** Gets the i'th PTG */
260  /** Gets the i'th PTG */
261  virtual const CParameterizedTrajectoryGenerator* getPTG(size_t i) const = 0;
262 
263  /** Get the current, global (honored for all PTGs) robot speed limits */
266  {
268  }
269 
270  /** Changes the current, global (honored for all PTGs) robot speed limits,
271  * via returning a reference to a structure that holds those limits */
274  {
276  }
277 
278  /** Changes this parameter in all inner holonomic navigator instances [m].
279  */
280  void setTargetApproachSlowDownDistance(const double dist);
281  /** Returns this parameter for the first inner holonomic navigator instances
282  * [m] (should be the same in all of them?) */
283  double getTargetApproachSlowDownDistance() const;
284 
285  protected:
286  /** The main method for the navigator */
287  virtual void performNavigationStep() override;
288 
289  /** The holonomic navigation algorithm (one object per PTG, so internal
290  * states are maintained) */
291  std::vector<CAbstractHolonomicReactiveMethod::Ptr> m_holonomicMethod;
292  std::unique_ptr<mrpt::io::CStream> m_logFile;
293  /** The current log file stream, or nullptr if not being used */
295  /** See enableKeepLogRecords */
297  /** The last log */
299  /** Last velocity commands */
301 
302  /** Critical zones */
303  std::recursive_mutex m_critZoneLastLog;
304 
305  /** Enables / disables the console debug output. */
307  /** Whether \a loadConfigFile() has been called or not. */
310 
311  /** A complete time logger \sa enableTimeLog() */
314 
315  /** @name Variables for CReactiveNavigationSystem::performNavigationStep
316  @{ */
320  /** Runtime estimation of execution period of the method. */
324  /** @} */
325 
326  virtual bool impl_waypoint_is_reachable(
327  const mrpt::math::TPoint2D& wp_local_wrt_robot)
328  const override; // See docs in base class
329 
330  // Steps for the reactive navigation sytem.
331  // ----------------------------------------------------------------------------
332  virtual void STEP1_InitPTGs() = 0;
333 
334  /** Return false on any fatal error */
336  mrpt::system::TTimeStamp& obs_timestamp) = 0;
337  bool STEP2_SenseObstacles();
338 
339  /** Builds TP-Obstacles from Workspace obstacles for the given PTG.
340  * "out_TPObstacles" is already initialized to the proper length and
341  * maximum collision-free distance for each "k" trajectory index.
342  * Distances are in "pseudo-meters". They will be normalized automatically
343  * to [0,1] upon return. */
344  virtual void STEP3_WSpaceToTPSpace(
345  const size_t ptg_idx, std::vector<double>& out_TPObstacles,
346  mrpt::nav::ClearanceDiagram& out_clearance,
347  const mrpt::math::TPose2D& rel_pose_PTG_origin_wrt_sense,
348  const bool eval_clearance) = 0;
349 
350  /** Generates a pointcloud of obstacles, and the robot shape, to be saved in
351  * the logging record for the current timestep */
352  virtual void loggingGetWSObstaclesAndShape(CLogFileRecord& out_log) = 0;
353 
354  struct PTGTarget
355  {
356  /** For each PTG, whether target falls into the PTG domain. */
357  bool valid_TP;
358  /** The Target, in TP-Space (x,y) */
360  /** TP-Target */
362  /** The discrete version of target_alpha */
363  int target_k;
364 
365  PTGTarget() : valid_TP(false) {}
366  };
367 
368  /** Scores \a holonomicMovement */
370  TCandidateMovementPTG& holonomicMovement,
371  const std::vector<double>& in_TPObstacles,
372  const mrpt::nav::ClearanceDiagram& in_clearance,
373  const std::vector<mrpt::math::TPose2D>& WS_Targets,
374  const std::vector<PTGTarget>& TP_Targets,
376  const bool this_is_PTG_continuation,
377  const mrpt::math::TPose2D& relPoseVelCmd_NOP,
378  const unsigned int ptg_idx4weights,
379  const mrpt::system::TTimeStamp tim_start_iteration,
381 
382  /** Return the [0,1] velocity scale of raw PTG cmd_vel */
383  virtual double generate_vel_cmd(
384  const TCandidateMovementPTG& in_movement,
387  CLogFileRecord& newLogRec,
388  const std::vector<mrpt::math::TPose2D>& relTargets, int nSelectedPTG,
389  const mrpt::kinematics::CVehicleVelCmd::Ptr& new_vel_cmd, int nPTGs,
390  const bool best_is_NOP_cmdvel,
391  const math::TPose2D& rel_cur_pose_wrt_last_vel_cmd_NOP,
392  const math::TPose2D& rel_pose_PTG_origin_wrt_sense_NOP,
393  const double executionTimeValue, const double tim_changeSpeed,
394  const mrpt::system::TTimeStamp& tim_start_iteration);
395 
396  /** To be called during children destructors to assure thread-safe
397  * destruction, and free of shared objects. */
398  void preDestructor();
399  virtual void onStartNewNavigation() override;
400 
401  /** Signal that the destructor has been called, so no more calls are
402  * accepted from other threads */
404 
406  /** Default: none */
408 
410 
411  struct TInfoPerPTG
412  {
413  std::vector<PTGTarget> targets;
414  /** One distance per discretized alpha value, describing the "polar
415  * plot" of TP obstacles. */
416  std::vector<double> TP_Obstacles;
417  /** Clearance for each path */
419  };
420 
421  /** Temporary buffers for working with each PTG during a navigationStep() */
422  std::vector<TInfoPerPTG> m_infoPerPTG;
424 
426  CParameterizedTrajectoryGenerator* ptg, const size_t indexPTG,
427  const std::vector<mrpt::math::TPose2D>& relTargets,
428  const mrpt::math::TPose2D& rel_pose_PTG_origin_wrt_sense,
429  TInfoPerPTG& ipf, TCandidateMovementPTG& holonomicMovement,
430  CLogFileRecord& newLogRec, const bool this_is_PTG_continuation,
432  const mrpt::system::TTimeStamp tim_start_iteration,
433  const TNavigationParams& navp = TNavigationParams(),
434  const mrpt::math::TPose2D& relPoseVelCmd_NOP =
435  mrpt::math::TPose2D(0, 0, 0));
436 
437  struct TSentVelCmd
438  {
439  /** 0-based index of used PTG */
441  /** Path index for selected PTG */
443  /** Timestamp of when the cmd was sent */
445  /** Robot pose & velocities and timestamp of when it was queried */
447  /** TP-Obstacles in the move direction at the instant of picking this
448  * movement */
451  /** [0,1] scale of the raw cmd_vel as generated by the PTG */
452  double speed_scale;
455 
456  bool isValid() const;
457  void reset();
458  TSentVelCmd();
459  };
460 
462 
463  private:
464  /** Delete m_holonomicMethod */
465  void deleteHolonomicObjects();
466 
467  /** Default: "./reactivenav.logs" */
469 
471  /** A copy of last-iteration navparams, used to detect changes */
472  std::unique_ptr<TNavigationParams> m_copy_prev_navParams;
473 
474 }; // end of CAbstractPTGBasedReactive
475 }
476 #endif
477 
478 
#define MRPT_MAKE_ALIGNED_OPERATOR_NEW
Put this macro inside any class with members that require {16,32,64}-byte memory alignment (e....
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: io/CStream.h:29
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.
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.
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.
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::math::TPose2D(0, 0, 0))
virtual void saveConfigFile(mrpt::config::CConfigFileBase &c) const override
Saves all current options to a config file.
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.
std::unique_ptr< mrpt::io::CStream > m_logFile
void setHolonomicMethod(const std::string &method, const mrpt::config::CConfigFileBase &cfgBase)
Selects which one from the set of available holonomic methods will be used into transformed TP-Space,...
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.
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, const mrpt::nav::CHolonomicLogFileRecord::Ptr &hlfr)
Scores holonomicMovement.
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...
const mrpt::system::CTimeLogger & getTimeLogger() const
Gives access to a const-ref to the internal time logger.
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 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.
mrpt::math::LowPassFilter_IIR1 meanExecutionPeriod
Runtime estimation of execution period of the method.
mrpt::system::CTimeLogger m_timelogger
A complete time logger.
void enableKeepLogRecords(bool enable=true)
Enables keeping an internal registry of navigation logs that can be queried with getLastLogRecord()
virtual void loadConfigFile(const mrpt::config::CConfigFileBase &c) override
Loads all params from a file.
mrpt::io::CStream * m_prev_logfile
The current log file stream, or nullptr if not being used.
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 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.
std::string m_navlogfiles_dir
Default: "./reactivenav.logs".
mrpt::maps::CPointCloudFilterBase::Ptr m_WS_filter
Default: none.
std::shared_ptr< CHolonomicLogFileRecord > Ptr
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 high-performance stopwatch, with typical resolution of nanoseconds.
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X),...
void enable(bool enabled=true)
const GLubyte * c
Definition: glext.h:6313
GLdouble s
Definition: glext.h:3676
GLsizei const GLchar ** string
Definition: glext.h:4101
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
Definition: datetime.h:40
Parameters that may be used by cmdVel_limits() in any derived classes.
1-order low-pass IIR filter.
Definition: filters.h:25
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 saveToConfigFile(mrpt::config::CConfigFileBase &c, const std::string &s) const override
This method saves the options to 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.
virtual void loadFromConfigFile(const mrpt::config::CConfigFileBase &c, const std::string &s) override
This method load the options from a ".ini"-like file or memory-stored string list.
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.
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: 814d80880 Fri Aug 24 01:51:28 2018 +0200 at mar 26 may 2026 12:30:59 CEST