Main MRPT website
>
C++ reference
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
mrpt
reactivenav
CPTG1.h
Go to the documentation of this file.
1
/* +---------------------------------------------------------------------------+
2
| The Mobile Robot Programming Toolkit (MRPT) C++ library |
3
| |
4
| http://www.mrpt.org/ |
5
| |
6
| Copyright (C) 2005-2012 University of Malaga |
7
| |
8
| This software was written by the Machine Perception and Intelligent |
9
| Robotics Lab, University of Malaga (Spain). |
10
| Contact: Jose-Luis Blanco <jlblanco@ctima.uma.es> |
11
| |
12
| This file is part of the MRPT project. |
13
| |
14
| MRPT is free software: you can redistribute it and/or modify |
15
| it under the terms of the GNU General Public License as published by |
16
| the Free Software Foundation, either version 3 of the License, or |
17
| (at your option) any later version. |
18
| |
19
| MRPT is distributed in the hope that it will be useful, |
20
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
| GNU General Public License for more details. |
23
| |
24
| You should have received a copy of the GNU General Public License |
25
| along with MRPT. If not, see <http://www.gnu.org/licenses/>. |
26
| |
27
+---------------------------------------------------------------------------+ */
28
#ifndef CPTG1_H
29
#define CPTG1_H
30
31
#include <
mrpt/reactivenav/CParameterizedTrajectoryGenerator.h
>
32
33
namespace
mrpt
34
{
35
namespace
reactivenav
36
{
37
38
/** A PTG for circular paths. The parameter K is related with the transformation between alfa values
39
and curvature of the arcs. Let R be the radius of the circular path (the inverse of the curvature).
40
Then: <br> <center><code> R = K / (v<sub>MAX</sub> tan &alfa;) </code></center>
41
* \ingroup mrpt_reactivenav_grp
42
*/
43
class
REACTIVENAV_IMPEXP
CPTG1
:
public
CParameterizedTrajectoryGenerator
44
{
45
public
:
46
/** Constructor: possible values in "params", those of CParameterizedTrajectoryGenerator plus:
47
* - K: Direction, +1 or -1
48
*/
49
CPTG1
(
const
TParameters<double>
¶ms );
50
51
/** The lambda function. */
52
void
lambdaFunction(
float
x,
float
y,
int
&out_k,
float
&out_d );
53
54
/** Gets a short textual description of the PTG and its parameters. */
55
std::string getDescription()
const
;
56
57
58
bool
PTG_IsIntoDomain(
float
x,
float
y );
59
void
PTG_Generator(
float
alfa,
float
t
,
float
x,
float
y,
float
phi,
float
&v,
float
&w );
60
61
protected
:
62
/** A generation parameter */
63
float
K
;
64
};
65
}
66
}
67
68
69
#endif
70
Page generated by
Doxygen 1.8.3
for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013