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 
32 /** Colli States */
33 typedef enum {
34  NothingToDo, /**< Indicating that nothing is to do */
35  OrientAtTarget, /**< Indicating that the robot is at target and has to orient */
36  DriveToOrientPoint, /**< Drive to the orientation point */
37  DriveToTarget, /**< Drive to the target */
39 
40 /** Colli data, refering to current movement */
41 typedef struct
42 {
43  bool final; /**< final-status */
44  cart_coord_2d_t local_target; /**< local target */
45  cart_coord_2d_t local_trajec; /**< local trajectory */
46 } colli_data_t;
47 
48 /** Costs of occupancy-grid cells */
49 typedef struct
50 {
51  unsigned int occ; /**< The cost for an occupied cell */
52  unsigned int near; /**< The cost for a cell near an obstacle (distance="near")*/
53  unsigned int mid; /**< The cost for a cell near an obstacle (distance="near")*/
54  unsigned int far; /**< The cost for a cell near an obstacle (distance="near")*/
55  unsigned int free; /**< The cost for a free cell */
57 
58 /** Storing Translation and rotation */
59 typedef struct
60 {
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 { potential_field, basic } colli_escape_mode_t;
68 
69 /** Colli motor_instuct modes */
70 typedef enum {
71  linear, // The enum for the linear motor instruct
72  quadratic // The enum for the quadratic motor instruct
74 
75 /** Colli drive restrictions */
76 typedef enum {
77  differential, // The enum for the differential drive restriction
78  omnidirectional // The enum for the omnidirectional drive restriction
80 
81 } // namespace fawkes
82 
83 #endif
cart_coord_2d_t local_trajec
local trajectory
Definition: types.h:45
float x
Translation in x-direction.
Definition: types.h:61
Cartesian coordinates (2D).
Definition: types.h:64
Fawkes library namespace.
colli_motor_instruct_mode_t
Colli motor_instuct modes.
Definition: types.h:70
cart_coord_2d_t local_target
local target
Definition: types.h:44
colli_state_t
Colli States.
Definition: types.h:33
Storing Translation and rotation.
Definition: types.h:59
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:54
float rot
Rotation around z-axis.
Definition: types.h:63
Costs of occupancy-grid cells.
Definition: types.h:49
Drive to the orientation point.
Definition: types.h:36
unsigned int free
The cost for a free cell.
Definition: types.h:55
unsigned int occ
The cost for an occupied cell.
Definition: types.h:51
colli_drive_restriction_t
Colli drive restrictions.
Definition: types.h:76
Indicating that the robot is at target and has to orient.
Definition: types.h:35
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:53
Drive to the target.
Definition: types.h:37
Colli data, refering to current movement.
Definition: types.h:41
unsigned int near
The cost for a cell near an obstacle (distance="near")
Definition: types.h:52
Indicating that nothing is to do.
Definition: types.h:34