types.h
00001 00002 /*************************************************************************** 00003 * types.h - Definition of simple types 00004 * 00005 * Generated: Sun May 08 22:29:34 2005 00006 * Copyright 2005-2006 Tim Niemueller [www.niemueller.de] 00007 * 2005 Martin Heracles 00008 * 00009 ****************************************************************************/ 00010 00011 /* This program is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version. A runtime exception applies to 00015 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00016 * 00017 * This program is distributed in the hope that it will be useful, 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 * GNU Library General Public License for more details. 00021 * 00022 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00023 */ 00024 00025 #ifndef __FIREVISION_UTILS_TYPE_H_ 00026 #define __FIREVISION_UTILS_TYPE_H_ 00027 00028 #include <utils/math/types.h> 00029 00030 /** Center in ROI. 00031 * Must be signed since the center of a ball may be out of the ROI. 00032 */ 00033 typedef struct { 00034 float x; /**< x in pixels */ 00035 float y; /**< y in pixels */ 00036 } center_in_roi_t; 00037 00038 /** Orientations. */ 00039 typedef enum { 00040 ORI_HORIZONTAL = 1, /**< horizontal */ 00041 ORI_VERTICAL, /**< vertical */ 00042 ORI_CROSS, /**< cross */ 00043 ORI_DEG_0, /**< 0 degrees */ 00044 ORI_DEG_45, /**< 45 degrees */ 00045 ORI_DEG_90, /**< 90 degrees */ 00046 ORI_DEG_135, /**< 135 degrees */ 00047 ORI_DEG_180, /**< 180 degrees */ 00048 ORI_DEG_225, /**< 225 degrees */ 00049 ORI_DEG_270, /**< 270 degrees */ 00050 ORI_DEG_315, /**< 315 degrees */ 00051 ORI_DEG_360 /**< 360 degrees */ 00052 } orientation_t; 00053 00054 /** The type "color_t" enumerates all colors that are 00055 of interest in the RoboCup-domain */ 00056 typedef enum { 00057 C_ORANGE = 0, /**< Orange. */ 00058 C_BACKGROUND = 1, /**< Background of whatever color. */ 00059 C_MAGENTA = 2, /**< Magenta */ 00060 C_CYAN = 3, /**< Cyan */ 00061 C_BLUE = 4, /**< Blue */ 00062 C_YELLOW = 5, /**< Yellow */ 00063 C_GREEN = 6, /**< Green */ 00064 C_WHITE = 7, /**< White */ 00065 C_RED = 8, /**< Red */ 00066 C_BLACK = 9, /**< Black */ 00067 C_OTHER = 10 /**< Other */ 00068 } color_t; 00069 00070 00071 /** datatype to determine the type of the used coordinate system 00072 * Not that if the robot is positioned at (X=0,Y=0,Ori=0) the robot and world cartesian 00073 * coordinate systems are the same. This can help to remember the robot coord sys. 00074 */ 00075 typedef enum { 00076 COORDSYS_UNKNOWN = 0, /**< Unknown */ 00077 COORDSYS_ROBOT_CART = 1, /**< robot-centric cartesian coordinate system. From 00078 * robot forward is positive X, backward is negative X, 00079 * right is positive Y, left negative Y */ 00080 COORDSYS_WORLD_CART = 2, /**< World cartesian coordinate system, center is at the 00081 * middle of the field, from center to opponent goal is 00082 * positive X, from center to own goal negative X, from 00083 * own goal to opponent goal right wing is positive Y, 00084 * left wing is negative Y. */ 00085 COORDSYS_ROBOT_POLAR = 3, /**< robot-centric polar coordinate system. Front is zero 00086 * rad. */ 00087 COORDSYS_WORLD_POLAR = 4 /**< world polar coordinate system. Center is zero. 00088 * Center to opponent goal is zero rad. */ 00089 } coordsys_type_t; 00090 00091 #endif

