]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/motion/trgenconstr.h
robofsm: Competition strategy tuning.
[eurobot/public.git] / src / motion / trgenconstr.h
1 //     Copyright 2009 Michal Sojka <sojkam1@fel.cvut.cz>
2 //     Copyright 2009 Petr Beneš
3 //
4 //     This file is part of Trgen library.
5 //
6 //     Trgen is free software: you can redistribute it and/or modify
7 //     it under the terms of the GNU General Public License as published by
8 //     the Free Software Foundation, either version 3 of the License, or
9 //     (at your option) any later version.
10 //
11 //     Trgen is distributed in the hope that it will be useful,
12 //     but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 //     GNU General Public License for more details.
15 //
16 //     You should have received a copy of the GNU General Public License
17 //     along with Trgen.  If not, see <http://www.gnu.org/licenses/>.
18
19 #ifndef TRGENCONSTR_H
20 #define TRGENCONSTR_H
21
22 /**
23  * A structure describing various constraints used during calculation
24  * of a trajectory.
25  */
26 struct TrajectoryConstraints {
27     double maxv;                ///< maximal speed [m/s]
28     double maxomega;            ///< maximal angular speed [rad/s]
29     double maxangacc;           ///< maximal angular acceleration [rad/s^2] (for ::TrajectorySegmentTurn)
30     double maxacc;              ///< maximal acceleration [m/s^2]
31     double maxcenacc;           ///< maximal centripetal acceleration [m/s^2]
32     double maxe;                ///< maximal trajectory error for Trajectory::corners2arcs() [m]
33 };
34
35 enum turn_type { 
36         FH_DONT_TURN,
37         FH_CW,          /* Clockwise */
38         FH_CCW,         /* Counter-clockwise */
39         FH_SHORTEST,    /* Shortest turn */
40 };
41
42 struct final_heading {
43         enum turn_type turn_type;
44         float heading;          /* Heading in rad */
45 };
46
47 #endif