Main MRPT website > C++ reference for MRPT 1.4.0
CPTG2.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 CPTG2_H
10#define CPTG2_H
11
13
14namespace mrpt
15{
16 namespace nav
17 {
18 /** The "alpha-PTG", as named in PTG papers.
19 *
20 * Accepted parameters in the constructor:
21 * - params["ref_distance"]: Maximum trayectory distance (meters).
22 * - params["v_max"]: Maximum linear velocity (m/s)
23 * - params["w_max"]: Maximum angular velocity (rad/s)
24 * - params["cte_a0v"]: Constant related to the generation of linear velocities, read below (in radians).
25 * - params["cte_a0w"]: Constant related to the generation of angular velocities, read below (in radians).
26 *
27 * This PT generator functions are:
28 *
29 * \f[ v(\alpha) = V_{MAX} e^{ -\left( \dfrac{\alpha-\phi}{cte_{a0v}} \right)^2} \f]
30 * \f[ \omega(\alpha) = W_{MAX} \left( -\dfrac{1}{2} +\dfrac{1}{1+ e^{ - \dfrac{\alpha-\phi}{cte_{a0w}} } } \right) \f]
31 *
32 * So, the radius of curvature of each trajectory is NOT constant for each "alpha" value in this PTG:
33 *
34 * ![C-PTG path examples](PTG2_paths.png)
35 *
36 * \ingroup nav_tpspace
37 */
39 {
40 public:
41 /** Constructor: possible values in "params", those of CParameterizedTrajectoryGenerator plus:
42 * - cte_a0v, cte_a0w: Parameters of this PTG (both are angles in radians).
43 */
45
46 /** Gets a short textual description of the PTG and its parameters.
47 */
48 std::string getDescription() const;
49
50 bool PTG_IsIntoDomain( float x, float y );
51
52 void PTG_Generator( float alpha, float t,float x, float y, float phi, float &v, float &w );
53 protected:
54 float cte_a0v;
55 float cte_a0w;
56
57
58 };
59 }
60}
61
62
63#endif
64
The "alpha-PTG", as named in PTG papers.
Definition: CPTG2.h:39
CPTG2(const mrpt::utils::TParameters< double > &params)
Constructor: possible values in "params", those of CParameterizedTrajectoryGenerator plus:
std::string getDescription() const
Gets a short textual description of the PTG and its parameters.
float cte_a0v
Definition: CPTG2.h:54
bool PTG_IsIntoDomain(float x, float y)
To be implemented in derived classes.
void PTG_Generator(float alpha, float t, float x, float y, float phi, float &v, float &w)
The main method to be implemented in derived classes.
float cte_a0w
Definition: CPTG2.h:55
This is the base class for any user-defined PTG.
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
For usage when passing a dynamic number of (numeric) arguments to a function, by name.
Definition: TParameters.h:47



Page generated by Doxygen 1.9.6 for MRPT 1.4.0 SVN: at Fri Jan 20 02:28:26 UTC 2023