Fawkes API  Fawkes Development Version
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 #include <stdint.h>
00030 
00031 namespace firevision {
00032 #if 0 /* just to make Emacs auto-indent happy */
00033 }
00034 #endif
00035 
00036 /** Center in ROI.
00037  * Must be signed since the center of a ball may be out of the ROI.
00038  */
00039 typedef struct {
00040   float x;      /**< x in pixels */
00041   float y;      /**< y in pixels */
00042 } center_in_roi_t;
00043 
00044 /** Orientations. */
00045 typedef enum {
00046   ORI_HORIZONTAL = 1,   /**< horizontal */
00047   ORI_VERTICAL,         /**< vertical */
00048   ORI_CROSS,            /**< cross */
00049   ORI_DEG_0,            /**< 0 degrees */
00050   ORI_DEG_45,           /**< 45 degrees */
00051   ORI_DEG_90,           /**< 90 degrees */
00052   ORI_DEG_135,          /**< 135 degrees */
00053   ORI_DEG_180,          /**< 180 degrees */
00054   ORI_DEG_225,          /**< 225 degrees */
00055   ORI_DEG_270,          /**< 270 degrees */
00056   ORI_DEG_315,          /**< 315 degrees */
00057   ORI_DEG_360           /**< 360 degrees */
00058 } orientation_t;
00059 
00060 /** The type "color_t" enumerates all colors that are
00061    of interest in the RoboCup-domain */
00062 typedef enum {
00063   C_ORANGE = 0,         /**< Orange. */
00064   C_BACKGROUND = 1,     /**< Background of whatever color. */
00065   C_MAGENTA = 2,        /**< Magenta */
00066   C_CYAN = 3,           /**< Cyan */
00067   C_BLUE = 4,           /**< Blue */
00068   C_YELLOW = 5,         /**< Yellow */
00069   C_GREEN = 6,          /**< Green */
00070   C_WHITE = 7,          /**< White */
00071   C_RED = 8,            /**< Red */
00072   C_BLACK = 9,          /**< Black */
00073   C_OTHER = 10          /**< Other */
00074 } color_t;
00075 
00076 
00077 /** datatype to determine the type of the used coordinate system
00078  * Not that if the robot is positioned at (X=0,Y=0,Ori=0) the robot and world cartesian
00079  * coordinate systems are the same. This can help to remember the robot coord sys.
00080  */
00081 typedef enum {
00082   COORDSYS_UNKNOWN      = 0,    /**< Unknown */
00083   COORDSYS_ROBOT_CART   = 1,    /**< robot-centric cartesian coordinate system. From
00084                                  * robot forward is positive X, backward is negative X,
00085                                  * right is positive Y, left negative Y */
00086   COORDSYS_WORLD_CART   = 2,    /**< World cartesian coordinate system, center is at the
00087                                  * middle of the field, from center to opponent goal is
00088                                  * positive X, from center to own goal negative X, from
00089                                  * own goal to opponent goal right wing is positive Y,
00090                                  * left wing is negative Y. */
00091   COORDSYS_ROBOT_POLAR  = 3,    /**< robot-centric polar coordinate system. Front is zero
00092                                  * rad. */
00093   COORDSYS_WORLD_POLAR  = 4     /**< world polar coordinate system. Center is zero.
00094                                  * Center to opponent goal is zero rad. */
00095 } coordsys_type_t;
00096 
00097 
00098 #pragma pack(push,4)
00099 /** Structure defining a point in a CARTESIAN_3D_FLOAT buffer */
00100 typedef struct {
00101   float x;      /**< X value */
00102   float y;      /**< Y value */
00103   float z;      /**< Z value */
00104 } pcl_point_t;
00105 
00106 /** Structure defining a point in a CARTESIAN_3D_FLOAT_RGB buffer */
00107 typedef struct {
00108   float x;      /**< X value */
00109   float y;      /**< Y value */
00110   float z;      /**< Z value */
00111   union {
00112     struct {
00113       uint8_t b;        /**< B color component value */
00114       uint8_t g;        /**< G color component value */
00115       uint8_t r;        /**< R color component value */
00116       uint8_t _unused;  /**< unused */
00117     };
00118     float rgb;          /**< Color value as float */
00119   };
00120 } pcl_point_xyzrgb_t;
00121 #pragma pack(pop)
00122 
00123 } // end namespace firevision
00124 
00125 #endif