Main MRPT website
>
C++ reference for MRPT 1.4.0
mrpt
nav
tpspace
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
12
#include <
mrpt/nav/tpspace/CParameterizedTrajectoryGenerator.h
>
13
14
namespace
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
* 
35
*
36
* \ingroup nav_tpspace
37
*/
38
class
NAV_IMPEXP
CPTG2
:
public
CParameterizedTrajectoryGenerator
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
*/
44
CPTG2
(
const
mrpt::utils::TParameters<double>
¶ms );
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
CParameterizedTrajectoryGenerator.h
mrpt::nav::CPTG2
The "alpha-PTG", as named in PTG papers.
Definition:
CPTG2.h:38
NAV_IMPEXP
#define NAV_IMPEXP
Definition:
nav/include/mrpt/nav/link_pragmas.h:90
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CParticleFilter.h:16
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::CPTG2::cte_a0w
float cte_a0w
Definition:
CPTG2.h:55
mrpt::nav::CParameterizedTrajectoryGenerator
This is the base class for any user-defined PTG.
Definition:
CParameterizedTrajectoryGenerator.h:56
mrpt::nav::CPTG2::cte_a0v
float cte_a0v
Definition:
CPTG2.h:54
Page generated by
Doxygen 1.8.17
for MRPT 1.4.0 SVN: at Sat Jan 18 22:37:07 UTC 2020