Main MRPT website > C++ reference for MRPT 1.4.0
CPTG1.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-2016, 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 CPTG1_H
10 #define CPTG1_H
11 
13 
14 namespace mrpt
15 {
16  namespace nav
17  {
18 
19  /** A PTG for circular paths ("C" type PTG in papers).
20  *
21  * Accepted parameters in the constructor:
22  * - params["ref_distance"]: Maximum trayectory distance (meters).
23  * - params["v_max"]: Maximum linear velocity (m/s)
24  * - params["w_max"]: Maximum angular velocity (rad/s)
25  * - params["K"]: Can be "+1" for forward paths, or "-1" for backward paths.
26  *
27  * This PT generator functions are:
28  *
29  * \f[ v(\alpha) = V_{MAX} sign(K) \f]
30  * \f[ \omega(\alpha) = \dfrac{\alpha}{\pi} W_{MAX} sign(K) \f]
31  *
32  * So, the radius of curvature of each trajectory is constant for each "alpha" value (the trajectory parameter):
33  *
34  * \f[ R(\alpha) = \dfrac{v}{\omega} = \dfrac{V_{MAX}}{W_{MAX}} \dfrac{\pi}{\alpha} \f]
35  *
36  * from which a minimum radius of curvature can be set by selecting the appropriate values of V_MAX and W_MAX,
37  * knowning that \f$ \alpha \in (-\pi,\pi) \f$.
38  *
39  * ![C-PTG path examples](PTG1_paths.png)
40  *
41  * \ingroup nav_tpspace
42  */
44  {
45  public:
46  /** Constructor: possible values in "params", those of CParameterizedTrajectoryGenerator plus:
47  * - K: Direction, +1 or -1
48  */
50 
51  virtual bool inverseMap_WS2TP(float x, float y, int &out_k, float &out_d, float tolerance_dist = 0.10f) const;
52 
53  /** Gets a short textual description of the PTG and its parameters. */
54  std::string getDescription() const;
55 
56 
57  bool PTG_IsIntoDomain( float x, float y );
58  void PTG_Generator( float alpha, float t,float x, float y, float phi, float &v, float &w );
59 
60  protected:
61  /** A generation parameter */
62  float K;
63  };
64  }
65 }
66 
67 
68 #endif
69 
mrpt::nav::CPTG1
A PTG for circular paths ("C" type PTG in papers).
Definition: CPTG1.h:43
CParameterizedTrajectoryGenerator.h
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CParticleFilter.h:16
mrpt::nav::CPTG1::K
float K
A generation parameter.
Definition: CPTG1.h:62
t
const EIGEN_STRONG_INLINE AdjointReturnType t() const
Transpose.
Definition: eigen_plugins.h:470
mrpt::utils::TParameters
For usage when passing a dynamic number of (numeric) arguments to a function, by name.
Definition: TParameters.h:46
mrpt::nav::CParameterizedTrajectoryGenerator
This is the base class for any user-defined PTG.
Definition: CParameterizedTrajectoryGenerator.h:56



Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019