Fawkes API  Fawkes Development Version
types.h
1 
2 /***************************************************************************
3  * types.h - Definition of simple types
4  *
5  * Generated: Sun May 08 22:29:34 2005
6  * Copyright 2005-2006 Tim Niemueller [www.niemueller.de]
7  * 2005 Martin Heracles
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 __FIREVISION_UTILS_TYPE_H_
26 #define __FIREVISION_UTILS_TYPE_H_
27 
28 #include <utils/math/types.h>
29 #include <stdint.h>
30 
31 namespace firevision {
32 #if 0 /* just to make Emacs auto-indent happy */
33 }
34 #endif
35 
36 /** Center in ROI.
37  * Must be signed since the center of a ball may be out of the ROI.
38  */
39 typedef struct {
40  float x; /**< x in pixels */
41  float y; /**< y in pixels */
43 
44 /** Orientations. */
45 typedef enum {
46  ORI_HORIZONTAL = 1, /**< horizontal */
47  ORI_VERTICAL, /**< vertical */
48  ORI_CROSS, /**< cross */
49  ORI_DEG_0, /**< 0 degrees */
50  ORI_DEG_45, /**< 45 degrees */
51  ORI_DEG_90, /**< 90 degrees */
52  ORI_DEG_135, /**< 135 degrees */
53  ORI_DEG_180, /**< 180 degrees */
54  ORI_DEG_225, /**< 225 degrees */
55  ORI_DEG_270, /**< 270 degrees */
56  ORI_DEG_315, /**< 315 degrees */
57  ORI_DEG_360 /**< 360 degrees */
58 } orientation_t;
59 
60 /** The type "color_t" enumerates all colors that are
61  of interest in the RoboCup-domain */
62 typedef enum {
63  C_ORANGE = 0, /**< Orange. */
64  C_BACKGROUND = 1, /**< Background of whatever color. */
65  C_MAGENTA = 2, /**< Magenta */
66  C_CYAN = 3, /**< Cyan */
67  C_BLUE = 4, /**< Blue */
68  C_YELLOW = 5, /**< Yellow */
69  C_GREEN = 6, /**< Green */
70  C_WHITE = 7, /**< White */
71  C_RED = 8, /**< Red */
72  C_BLACK = 9, /**< Black */
73  C_OTHER = 10 /**< Other */
74 } color_t;
75 
76 
77 /** datatype to determine the type of the used coordinate system
78  * Not that if the robot is positioned at (X=0,Y=0,Ori=0) the robot and world cartesian
79  * coordinate systems are the same. This can help to remember the robot coord sys.
80  */
81 typedef enum {
82  COORDSYS_UNKNOWN = 0, /**< Unknown */
83  COORDSYS_ROBOT_CART = 1, /**< robot-centric cartesian coordinate system. From
84  * robot forward is positive X, backward is negative X,
85  * right is positive Y, left negative Y */
86  COORDSYS_WORLD_CART = 2, /**< World cartesian coordinate system, center is at the
87  * middle of the field, from center to opponent goal is
88  * positive X, from center to own goal negative X, from
89  * own goal to opponent goal right wing is positive Y,
90  * left wing is negative Y. */
91  COORDSYS_ROBOT_POLAR = 3, /**< robot-centric polar coordinate system. Front is zero
92  * rad. */
93  COORDSYS_WORLD_POLAR = 4 /**< world polar coordinate system. Center is zero.
94  * Center to opponent goal is zero rad. */
95 } coordsys_type_t;
96 
97 
98 #pragma pack(push,4)
99 /** Structure defining a point in a CARTESIAN_3D_FLOAT buffer */
100 typedef struct {
101  float x; /**< X value */
102  float y; /**< Y value */
103  float z; /**< Z value */
104 } pcl_point_t;
105 
106 /** Structure defining a point in a CARTESIAN_3D_FLOAT_RGB buffer */
107 typedef struct {
108  float x; /**< X value */
109  float y; /**< Y value */
110  float z; /**< Z value */
111  union {
112  struct {
113  uint8_t b; /**< B color component value */
114  uint8_t g; /**< G color component value */
115  uint8_t r; /**< R color component value */
116  uint8_t _unused; /**< unused */
117  };
118  float rgb; /**< Color value as float */
119  };
121 #pragma pack(pop)
122 
123 } // end namespace firevision
124 
125 #endif
float y
Y value.
Definition: types.h:102
uint8_t b
B color component value.
Definition: types.h:113
Structure defining a point in a CARTESIAN_3D_FLOAT_RGB buffer.
Definition: types.h:107
float x
X value.
Definition: types.h:101
float x
x in pixels
Definition: types.h:40
uint8_t r
R color component value.
Definition: types.h:115
uint8_t g
G color component value.
Definition: types.h:114
float rgb
Color value as float.
Definition: types.h:118
Structure defining a point in a CARTESIAN_3D_FLOAT buffer.
Definition: types.h:100
float z
Z value.
Definition: types.h:103
Center in ROI.
Definition: types.h:39
float y
y in pixels
Definition: types.h:41
uint8_t _unused
unused
Definition: types.h:116