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