📄 soccertypes.h
字号:
/*************************************************************************** * Copyright (C) 2004 - 2006 by ZJUBase *
* National Lab of Industrial Control Tech. * * Zhejiang University, China * * * * Achievements of ZJUBase in RoboCup Soccer 3D Simulation League: *
* In RoboCup championship, *
* - June 2006 - 3rd place in RoboCup 2006, Bremen, Germany (lost * * the semi-final with a coin toss) *
* - July 2005 - 3rd place in RoboCup 2005, Osaka, Japan (share the * * 3rd place with team Caspian) *
* In RoboCup local events, *
* - April 2006 - 2nd place in RoboCup Iran Open 2006, Tehran, Iran * * (lost the final with a coin toss) *
* - December 2005 - 2nd place in AI Games 2005, Isfahan, Iran *
* - July 2005 - champion in China Robot Competition 2005, Changzhou, * * China *
* - October 2004 - champion in China Soccer Robot Competition 2004, * * Guangzhou, China *
* * * Team members: *
* Currently the team leader is, * * Hao JIANG (jianghao@iipc.zju.edu.cn; riveria@gmail.com) *
* In the next season, the leader will be * * Yifeng ZHANG (yfzhang@iipc.zju.edu.cn) *
* ZJUBase 3D agent is created by * * Dijun LUO (djluo@iipc.zju.edu.cn) *
* All the members who has ever contributed: * * Jun JIANG *
* Xinfeng DU (xfdu@iipc.zju.edu.cn) *
* Yang ZHOU (yzhou@iipc.zju.edu.cn) *
* Zhipeng YANG *
* Xiang FAN *
* *
* Team Manager: *
* Ms. Rong XIONG (rxiong@iipc.zju.edu.cn) *
* *
* If you met any problems or you have something to discuss about * * ZJUBase. Please feel free to contact us through EMails given below. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/#ifndef SOCCERTYPES_H
#define SOCCERTYPES_H
/** this file contains types common to all plugins in the soccer
simulation
*/
#include <string>
#include <map>
using namespace std;
//==============================
#define ACTION_MAX 20
#define COMMAND_MAX 20
#define BallPos global.wm.ballPos
#define POINT_MAX 10
//===============================
typedef int Cycle;
typedef double _Time;
typedef double Dist;
typedef double Angle;
typedef int Unum;
//==============================
enum TPlayMode
{
// the order of the first 3 play modes should not be changed.
PM_BeforeKickOff = 0, /*!< before_kick_off: before the match */
PM_KickOff_Our = 1, /*!< kick_off_left: kick off for the left team */
PM_KickOff_Opp = 2, /*!< kick_off_right: kick off for the right team */
PM_PlayOn, /*!< play_on: regular game play */
PM_KickIn_Our,
PM_KickIn_Opp,
PM_CORNER_KICK_Our, /*!< corner_kick_l: corner kick left team */
PM_CORNER_KICK_Opp, /*!< corner_kick_r: corner kick right team */
PM_GOAL_KICK_Our, /*!< goal_kick_l: goal kick for left team */
PM_GOAL_KICK_Opp, /*!< goal_kick_r: goal kick for right team*/
PM_OFFSIDE_Our, /*!< offside_l: offside for left team */
PM_OFFSIDE_Opp, /*!< offside_r: offside for right team */
PM_GameOver,
PM_Goal_Our,
PM_Goal_Opp,
PM_FREE_KICK_Our, /*!< free_kick_l: free kick for left team */
PM_FREE_KICK_Opp, /*!< free_kick_r: free kick for right team*/
PM_NONE /*!< no play mode, this must be the last entry */
};
/** mapping from TPlayMode to string constants */
#define STR_PM_BeforeKickOff "BeforeKickOff"
#define STR_PM_KickOff_Left "KickOff_Left"
#define STR_PM_KickOff_Right "KickOff_Right"
#define STR_PM_PlayOn "PlayOn"
#define STR_PM_KickIn_Left "KickIn_Left"
#define STR_PM_KickIn_Right "KickIn_Right"
#define STR_PM_CORNER_KICK_LEFT "corner_kick_left"
#define STR_PM_CORNER_KICK_RIGHT "corner_kick_right"
#define STR_PM_GOAL_KICK_LEFT "goal_kick_left"
#define STR_PM_GOAL_KICK_RIGHT "goal_kick_right"
#define STR_PM_OFFSIDE_LEFT "offside_left"
#define STR_PM_OFFSIDE_RIGHT "offside_right"
#define STR_PM_GameOver "GameOver"
#define STR_PM_Goal_Left "Goal_Left"
#define STR_PM_Goal_Right "Goal_Right"
#define STR_PM_FREE_KICK_LEFT "free_kick_left"
#define STR_PM_FREE_KICK_RIGHT "free_kick_right"
#define STR_PM_Unknown "unknown"
enum TTeamIndex
{
TI_NONE = 0,
TI_LEFT = 1,
TI_RIGHT = 2
};
typedef double TTime;
enum TGameHalf
{
GH_NONE = 0,
GH_FIRST = 1,
GH_SECOND = 2
};
enum ActionType{
AT_NONE,
AT_CREATE_AGENT,
AT_INIT_AGENT,
AT_DRIVE,
AT_KICK,
AT_BEAM,
AT_RUNTO,
AT_RUNTO_INTERCEPT,
AT_GOTO_WITH_ZERO_END_VEL,
AT_INTERCEPT_FASTEST,
AT_DRIBBLE,
AT_BEFORE_KICK_OFF,
AT_BASIC_POSITIONING,
AT_POSITION_BEFORE_KICK_OFF,
AT_SHOOT
};
typedef map<string,ActionType> ActionMap;
enum CMDType{
CT_NONE,
CT_CREATE_AGENT,
CT_INIT_AGENT,
CT_DRIVE,
CT_KICK,
CT_BEAM,
CT_CATCH,
CT_PANTILT,
CT_SAY
};
#endif // SOCCERTYPES_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -