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