⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soccertypes.h

📁 robocup 3d, a 3d base team similar to UvA 2d
💻 H
📖 第 1 页 / 共 2 页
字号:
/***********************************************************************************                            In the name of Almighty                            **                                                                               **          SoccerTypes.h : Robocup 3D Soccer Simulation Team Zigorat            **                     (This team was previously named Gcyrus)                   **                                                                               **  Date: 03/20/2007                                                             **  Author: Mahdi Hamdarsi                                                       **  Comments: This file contains class decleration for SoccerCommand             **            (Some materials are owned & copyrighted by Jelle Kok)              **                                                                               ***********************************************************************************//*! \file SoccerTypes.h<pre><b>File:</b>          SoccerTypes.h<b>Project:</b>       Robocup Soccer Simulation Team: Zigorat<b>Authors:</b>       Mahdi Hamdarsi<b>Created:</b>       03/20/2007<b>Last Revision:</b> $ID$<b>Contents:</b>      This file contains class decleration for SoccerCommand<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>03/20/2007       Mahdi           Initial version created</pre>*//*Copyright (c) 2000-2003, Jelle Kok, University of AmsterdamAll rights reserved.Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:1. Redistributions of source code must retain the above copyright notice, thislist of conditions and the following disclaimer.2. Redistributions in binary form must reproduce the above copyright notice,this list of conditions and the following disclaimer in the documentationand/or other materials provided with the distribution.3. Neither the name of the University of Amsterdam nor the names of itscontributors may be used to endorse or promote products derived from thissoftware without specific prior written permission.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*//*!<pre><b>File:</b>          SoccerTypes.h<b>Project:</b>       Robocup Soccer Simulation Team: UvA Trilearn<b>Authors:</b>       Jelle Kok<b>Created:</b>       28/11/2000<b>Last Revision:</b> $ID$<b>Contents:</b>      This file contains the different enumerations and               constants that are important in the Soccer Server.               Furthermore it contains the class SoccerCommand which is               used to denote the different possible soccer commands and               the class SoccerTypes that contains all kind of static               methods to translate text strings that are received from               the server into the soccer types (=enumerations) that               are defined here. Finally it contains the Time class which               holds a two-tuple that represents the time in the soccer server.<hr size=2><h2><b>Changes</b></h2><b>Date</b>             <b>Author</b>          <b>Comment</b>28/11/2000       Jelle Kok       Initial version created</pre>*/#ifndef _SOCCERTYPES_#define _SOCCERTYPES_#include "Geometry.h"     // needed for AngDeg/*****************************************************************************//********************* DEFINES ***********************************************//*****************************************************************************/#define MAX_TEAMMATES          11       /*!< Maximum number of teammates     */#define MAX_OPPONENTS          11       /*!< Maximum number of opponents     */#define MAX_MSG              4096       /*!< maximum message size from server*/#define MAX_SAY_MSG            10       /*!< maximum size of say message     */#define MAX_FLAGS               8       /*!< maximum number of flags on field*/#define MIN_FIELD_LENGTH       10       /*!< minimum length field can have   */#define MIN_FIELD_WIDTH        10       /*!< minimum width field can have    *//*! The time in Soccer Simulation 3D is a float with cycles of 0.02 second */typedef float Time;/*****************************************************************************//********************* CONSTANTS *********************************************//*****************************************************************************/const double  UnknownDoubleValue  = -1000.0; /*!< indicates unknown double   */const AngDeg  UnknownAngleValue   = -1000.0; /*!< indicates unknown angle    */const Time    UnknownTime         = -1000.0;     /*!< indicates unknown time     */const int     UnknownIntValue     = -1000;   /*!< indicates unknown int      *//*****************************************************************************//********************** ENUMERATIONS *****************************************//*****************************************************************************//*! ObjectT is an enumeration of all possible objects that are part of the    RoboCup soccer simulation. The class SoccerTypes contains different methods    to easily work with these objects and convert them to text strings and text    strings to ObjectT. */enum ObjectT { // don't change order  OBJECT_BALL,             /*!< Ball                     00 */  OBJECT_GOAL_L_T,         /*!< Left top goal post       01 */   // 4 goals  OBJECT_GOAL_L_B,         /*!< Left bottom goal post    02 */  OBJECT_GOAL_R_T,         /*!< Right top goal post      03 */  OBJECT_GOAL_R_B,         /*!< Right bottom goal post   04*/  OBJECT_GOAL_UNKNOWN,     /*!< Unknown goal             05 */  OBJECT_CORNER_L_T,       /*!< Flag corner left top     06 */   // 4 flags  OBJECT_CORNER_L_B,       /*!< Flag corner left bottom  07 */  OBJECT_CORNER_R_T,       /*!< Flag corner right top    08 */  OBJECT_CORNER_R_B,       /*!< Flag corner right bottom 09 */  OBJECT_CORNER_UNKNOWN,   /*!< Unknown corner           10 */  OBJECT_TEAMMATE_1,       /*!< Teammate nr 1            11 */   // teammates 12  OBJECT_TEAMMATE_2,       /*!< Teammate nr 2            12 */  OBJECT_TEAMMATE_3,       /*!< Teammate nr 3            13 */  OBJECT_TEAMMATE_4,       /*!< Teammate nr 4            14 */  OBJECT_TEAMMATE_5,       /*!< Teammate nr 5            15 */  OBJECT_TEAMMATE_6,       /*!< Teammate nr 6            16 */  OBJECT_TEAMMATE_7,       /*!< Teammate nr 7            17 */  OBJECT_TEAMMATE_8,       /*!< Teammate nr 8            18 */  OBJECT_TEAMMATE_9,       /*!< Teammate nr 9            19 */  OBJECT_TEAMMATE_10,      /*!< Teammate nr 10           20 */  OBJECT_TEAMMATE_11,      /*!< Teammate nr 11           21 */  OBJECT_TEAMMATE_UNKNOWN, /*!< Teammate nr unkown       22 */  OBJECT_OPPONENT_1,       /*!< Opponent nr 1            23 */   // opponents 24  OBJECT_OPPONENT_2,       /*!< Opponent nr 2            24 */  OBJECT_OPPONENT_3,       /*!< Opponent nr 3            25 */  OBJECT_OPPONENT_4,       /*!< Opponent nr 4            26 */  OBJECT_OPPONENT_5,       /*!< Opponent nr 5            27 */  OBJECT_OPPONENT_6,       /*!< Opponent nr 6            28 */  OBJECT_OPPONENT_7,       /*!< Opponent nr 7            29 */  OBJECT_OPPONENT_8,       /*!< Opponent nr 8            30 */  OBJECT_OPPONENT_9,       /*!< Opponent nr 9            31 */  OBJECT_OPPONENT_10,      /*!< Opponent nr 10           32 */  OBJECT_OPPONENT_11,      /*!< Opponent nr 11           33 */  OBJECT_OPPONENT_UNKNOWN, /*!< Opponent nr unknown      34 */  OBJECT_PLAYER_UNKNOWN,   /*!< Unknown player           35 */  OBJECT_TEAMMATE_GOALIE,  /*!< Goalie of your side      36 */  OBJECT_OPPONENT_GOALIE,  /*!< Goalie of opponent side  37 */  MAX_OBJECTS,             /*!< maximum nr of objects    39 */  OBJECT_ILLEGAL,          /*!< illegal object           38 */} ;#define hipXYL JID_LLEG_1        /*!< Human understandable joint name :) */#define hipXYR JID_RLEG_1        /*!< Human understandable joint name :) */#define hipL JID_LLEG_2_3        /*!< Human understandable joint name :) */#define hipR JID_RLEG_2_3        /*!< Human understandable joint name :) */#define kneeL JID_LLEG_4         /*!< Human understandable joint name :) */#define kneeR JID_RLEG_4         /*!< Human understandable joint name :) */#define ankleL JID_LLEG_5_6      /*!< Human understandable joint name :) */#define ankleR JID_RLEG_5_6      /*!< Human understandable joint name :) */#define shoulderL JID_LARM_1_2   /*!< Human understandable joint name :) */#define shoulderR JID_RARM_1_2   /*!< Human understandable joint name :) */#define shoulderXYL JID_LARM_3   /*!< Human understandable joint name :) */#define shoulderXYR JID_RARM_3   /*!< Human understandable joint name :) */#define elbowL JID_LARM_4        /*!< Human understandable joint name :) */#define elbowR JID_RARM_4        /*!< Human understandable joint name :) *//*! This is an enumeration of all the joints currently avalable in simulator */enum JointT{  JID_LLEG_1,                  /*!< Left hip joint - moving on XY plane */  JID_RLEG_1,                  /*!< Right hip joint - moving on XY plane */  JID_LLEG_2_3,                /*!< Left hip joint - moving front & back, open & close */  JID_RLEG_2_3,                /*!< Right hip joint - moving front & back, open & close */  JID_LLEG_4,                  /*!< Left knee joint */  JID_RLEG_4,                  /*!< Right knee joint */  JID_LLEG_5_6,                /*!< Left ankle joint */  JID_RLEG_5_6,                /*!< Right ankle joint */  JID_LARM_1_2,                /*!< Left shoulder joint - moving front & back, open & close */  JID_RARM_1_2,                /*!< Right shoulder joint - moving front & back, open & close */  JID_LARM_3,                  /*!< Left shoulder joint - moving on XY plane */  JID_RARM_3,                  /*!< Right shoulder joint - moving on XY plane */  JID_LARM_4,                  /*!< Left elbow joint */  JID_RARM_4,                  /*!< Right elbow joint */  MAX_JOINTS,                  /*!< Maximum number of joints */  JID_ILLEGAL                  /*!< unknown joint :( ! */} ;/*! This is an enumeration of the sensros available currently in the simulator */enum SensorT{  SENSE_FOOT_LEFT,             /*!< Sensor under left foot */  SENSE_FOOT_RIGHT,            /*!< Sensor under right foot */  MAX_SENSORS,                 /*!< Maximum number of sensors */  SENSE_ILLEGAL                /*!< Unknown sensor */};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -