Fawkes API  Fawkes Development Version
types.h
1 
2 /***************************************************************************
3  * types.h - Types that are used throughout the colli
4  *
5  * Created: Tue Mar 25 21:51:11 2014
6  * Copyright 2014 Bahram Maleki-Fard
7  * 2014 Tobias Neumann
8  *
9  ****************************************************************************/
10 
11 /* This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version. A runtime exception applies to
15  * this software (see LICENSE.GPL_WRE file mentioned below for details).
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Library General Public License for more details.
21  *
22  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23  */
24 
25 #ifndef __PLUGINS_COLLI_TYPES_H_
26 #define __PLUGINS_COLLI_TYPES_H_
27 
28 #include <utils/math/types.h>
29 
30 namespace fawkes {
31 #if 0 /* just to make Emacs auto-indent happy */
32 }
33 #endif
34 
35 /** Colli States */
36 typedef enum {
37  NothingToDo, /**< Indicating that nothing is to do */
38  OrientAtTarget, /**< Indicating that the robot is at target and has to orient */
39  DriveToOrientPoint, /**< Drive to the orientation point */
40  DriveToTarget, /**< Drive to the target */
42 
43 /** Colli data, refering to current movement */
44 typedef struct {
45  bool final; /**< final-status */
46  cart_coord_2d_t local_target; /**< local target */
47  cart_coord_2d_t local_trajec; /**< local trajectory */
48 } colli_data_t;
49 
50 /** Costs of occupancy-grid cells */
51 typedef struct {
52  unsigned int occ; /**< The cost for an occupied cell */
53  unsigned int near; /**< The cost for a cell near an obstacle (distance="near")*/
54  unsigned int mid; /**< The cost for a cell near an obstacle (distance="near")*/
55  unsigned int far; /**< The cost for a cell near an obstacle (distance="near")*/
56  unsigned int free; /**< The cost for a free cell */
58 
59 /** Storing Translation and rotation */
60 typedef struct {
61  float x; /**< Translation in x-direction */
62  float y; /**< Translation in y-direction */
63  float rot; /**< Rotation around z-axis */
65 
66 /** Colli Escape modes */
67 typedef enum {
68  potential_field,
69  basic
71 
72 /** Colli motor_instuct modes */
73 typedef enum {
74  linear, // The enum for the linear motor instruct
75  quadratic // The enum for the quadratic motor instruct
77 
78 /** Colli drive restrictions */
79 typedef enum {
80  differential, // The enum for the differential drive restriction
81  omnidirectional // The enum for the omnidirectional drive restriction
83 
84 
85 } // end namespace firevision
86 
87 #endif
cart_coord_2d_t local_trajec
local trajectory
Definition: types.h:47
float x
Translation in x-direction.
Definition: types.h:61
Cartesian coordinates (2D).
Definition: types.h:59
Fawkes library namespace.
colli_motor_instruct_mode_t
Colli motor_instuct modes.
Definition: types.h:73
cart_coord_2d_t local_target
local target
Definition: types.h:46
colli_state_t
Colli States.
Definition: types.h:36
Storing Translation and rotation.
Definition: types.h:60
float y
Translation in y-direction.
Definition: types.h:62
unsigned int far
The cost for a cell near an obstacle (distance="near")
Definition: types.h:55
float rot
Rotation around z-axis.
Definition: types.h:63
Costs of occupancy-grid cells.
Definition: types.h:51
Drive to the orientation point.
Definition: types.h:39
unsigned int free
The cost for a free cell.
Definition: types.h:56
unsigned int occ
The cost for an occupied cell.
Definition: types.h:52
colli_drive_restriction_t
Colli drive restrictions.
Definition: types.h:79
Indicating that the robot is at target and has to orient.
Definition: types.h:38
colli_escape_mode_t
Colli Escape modes.
Definition: types.h:67
unsigned int mid
The cost for a cell near an obstacle (distance="near")
Definition: types.h:54
Drive to the target.
Definition: types.h:40
Colli data, refering to current movement.
Definition: types.h:44
unsigned int near
The cost for a cell near an obstacle (distance="near")
Definition: types.h:53
Indicating that nothing is to do.
Definition: types.h:37