#include <iostream>
#include "Geometry.h"
#include "ServerSettings.h"
Include dependency graph for SoccerTypes.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
File: SenseHandler.h Project: Robocup Soccer Simulation Team: UvA Trilearn Authors: Jelle Kok Created: 28/11/2000 Last Revision: $ID$ Contents: 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.
Changes
Date Author Comment 28/11/2000 Jelle Kok Initial version created
Definition in file SoccerTypes.h.
#define DEFAULT_OPPONENT_NAME "Team_R" |
default teamname for opponent
Definition at line 76 of file SoccerTypes.h.
Referenced by WorldModel::show().
#define DEFAULT_TEAM_NAME "Team_L" |
default teamname for own team
Definition at line 75 of file SoccerTypes.h.
Referenced by AgentObject::show(), BallObject::show(), PlayerObject::show(), and FixedObject::show().
#define KICK_RAYS_NR 40 |
number of rays to determine ball passing
Definition at line 84 of file SoccerTypes.h.
Referenced by Player::circleKickToPass().
#define MAX_FLAGS 55 |
maximum number of flags on field
Definition at line 73 of file SoccerTypes.h.
Referenced by WorldModel::resetTimeObjects(), and WorldModel::WorldModel().
#define MAX_HETERO_PLAYERS 7 |
Maximum number of hetero players
Definition at line 69 of file SoccerTypes.h.
Referenced by BasicCoach::mainLoopNormal(), and SoccerCommand::makeChangePlayerCommand().
#define MAX_LINES 4 |
maximum number of lines on field
Definition at line 74 of file SoccerTypes.h.
Referenced by WorldModel::resetTimeObjects(), and WorldModel::WorldModel().
#define MAX_MSG 4096 |
maximum message size from server
Definition at line 70 of file SoccerTypes.h.
Referenced by BasicCoach::BasicCoach(), SenseHandler::handleMessagesFromServer(), Player::handleStdin(), BasicCoach::handleStdin(), WorldModel::logCoordInfo(), WorldModel::logDrawBallInfo(), WorldModel::logDrawInfo(), main(), Player::mainLoop(), Player::Player(), WorldModel::processLastSeeMessage(), WorldModel::processPlayerMessage(), ActHandler::sendCommand(), ActHandler::sendCommandDirect(), and ActHandler::sendCommands().
#define MAX_OPPONENTS 11 |
Maximum number of opponents
Definition at line 67 of file SoccerTypes.h.
Referenced by WorldModel::getDirectionOfWidestAngle(), WorldModel::getLastOpponentDefender(), WorldModel::getOppGoalieType(), WorldModel::mapUnknownPlayers(), WorldModel::resetTimeObjects(), WorldModel::show(), and WorldModel::WorldModel().
#define MAX_PLAYERS MAX_TEAMMATES + MAX_OPPONENTS |
maximum number of players
Definition at line 68 of file SoccerTypes.h.
#define MAX_SAY_MSG 10 |
maximum size of say message
Definition at line 71 of file SoccerTypes.h.
Referenced by Player::mainLoop(), Player::makeBallInfo(), Player::sayOppAttackerStatus(), ActHandler::sendCommands(), and WorldModel::setCommunicationString().
#define MAX_TEAM_NAME_LENGTH 64 |
maximum length of teamname
Definition at line 72 of file SoccerTypes.h.
Referenced by main(), AgentObject::show(), BallObject::show(), PlayerObject::show(), and FixedObject::show().
#define MAX_TEAMMATES 11 |
Maximum number of teammates
Definition at line 66 of file SoccerTypes.h.
Referenced by WorldModel::getClosestPlayerInFormationTo(), WorldModel::getOwnGoalieType(), WorldModel::getStrategicPosition(), SoccerCommand::makeAttentionToCommand(), SoccerCommand::makeChangePlayerCommand(), WorldModel::mapUnknownPlayers(), Formations::readFormations(), WorldModel::resetTimeObjects(), WorldModel::show(), FormationTypeInfo::show(), and WorldModel::WorldModel().
#define PENALTY_AREA_LENGTH 16.5 |
length of the penalty area
Definition at line 80 of file SoccerTypes.h.
Referenced by Player::deMeer5_goalie(), and SoccerTypes::getGlobalPositionFlag().
#define PENALTY_AREA_WIDTH 40.32 |
width of the penalty area
Definition at line 81 of file SoccerTypes.h.
Referenced by WorldModel::calculateStateBall(), Player::deMeer5_goalie(), SoccerTypes::getGlobalPositionFlag(), WorldModel::getOuterPositionInField(), Player::isInFrontOfGoalCG(), WorldModel::isInOwnPenaltyArea(), and WorldModel::isInTheirPenaltyArea().
#define PENALTY_X (PITCH_LENGTH/2.0-PENALTY_AREA_LENGTH) |
penalty line of the opponent team
Definition at line 82 of file SoccerTypes.h.
Referenced by Player::amIAgentToSaySomething(), WorldModel::calculateStateBall(), BasicPlayer::clearBall(), WorldModel::getLastOpponentDefender(), WorldModel::getOppGoalieType(), WorldModel::getOuterPositionInField(), WorldModel::getOwnGoalieType(), WorldModel::getStrategicPosition(), BasicPlayer::interceptClose(), WorldModel::isBallHeadingToGoal(), WorldModel::isBeforeGoal(), Player::mainLoop(), BasicPlayer::outplayOpponent(), and WorldModel::updateDynamicObjectForNextCycle().
#define PITCH_LENGTH 105.0 |
length of the pitch
Definition at line 77 of file SoccerTypes.h.
Referenced by BasicPlayer::clearBall(), Player::deMeer5(), Player::deMeer5_goalie(), BasicPlayer::dribble(), WorldModel::getClosestPlayerInFormationTo(), WorldModel::getDirectionOfWidestAngle(), BasicPlayer::getDribblePoint(), SoccerTypes::getGlobalPositionFlag(), BasicPlayer::getInterceptionPointBall(), WorldModel::getMarkingPosition(), BasicPlayer::getMarkingPosition(), WorldModel::getOppGoalieType(), WorldModel::getOuterPositionInField(), WorldModel::getOwnGoalieType(), WorldModel::getStrategicPosition(), BasicPlayer::interceptScoringAttempt(), WorldModel::isBallHeadingToGoal(), WorldModel::isBeforeGoal(), WorldModel::isInField(), BasicPlayer::kickBallCloseToBody(), Player::kickToDrible(), Player::kickToScore(), SoccerCommand::makeMoveCommand(), Player::passToTeammateFitness(), Player::performPenalty(), Player::Player(), and Player::sayOppAttackerStatus().
#define PITCH_MARGIN 5.0 |
margin next to the pitch
Definition at line 79 of file SoccerTypes.h.
Referenced by SoccerTypes::getGlobalPositionFlag(), and SoccerCommand::makeMoveCommand().
#define PITCH_WIDTH 68.0 |
width of the pitch
Definition at line 78 of file SoccerTypes.h.
Referenced by WorldModel::calculateStateBall(), BasicPlayer::clearBall(), BasicPlayer::dribble(), BasicPlayer::getDribblePoint(), SoccerTypes::getGlobalPositionFlag(), WorldModel::getOuterPositionInField(), Formations::getStrategicPosition(), WorldModel::isInField(), BasicPlayer::kickBallCloseToBody(), SoccerCommand::makeMoveCommand(), and WorldModel::updateAll().
#define RAY_LENGTH 60.0 |
ray length - where player can pass ball to
Definition at line 86 of file SoccerTypes.h.
Referenced by Player::passTo(), and Player::passToFitness().
enum ActionT |
The ActionT enumeration contains different (high-level) actions.
Definition at line 405 of file SoccerTypes.h.
enum BallStatusT |
The BallStatus enumeration contains the status of the ball. This is returned when the coach has issued the check_ball message.
BS_ILLEGAL | illegal ball status |
BS_IN_FIELD | ball is in the field |
BS_GOAL_LEFT | ball is in left goal |
BS_GOAL_RIGHT | ball is in right goal |
BS_OUT_OF_FIELD | ball is not in the field |
Definition at line 396 of file SoccerTypes.h.
enum ClearBallT |
The ClearBallT enumeration contains different clear ball possibilities.
Definition at line 450 of file SoccerTypes.h.
enum CommandT |
The CommandT enumeration contains the different types for the SoccerCommand that are possible.
Definition at line 336 of file SoccerTypes.h.
enum DirectionT |
The DirectionT enumeration contains the different directions
Definition at line 489 of file SoccerTypes.h.
enum DribbleT |
The DribbleT enumeration contains different dribble possibilities.
DRIBBLE_ILLEGAL | illegal dribbling |
DRIBBLE_WITHBALL | dribble with ball very close |
DRIBBLE_SLOW | dribble slowly but kicking ball slightly ahead |
DRIBBLE_FAST | dribble fast by kicking ball up front |
Definition at line 435 of file SoccerTypes.h.
enum FeatureT |
The FeaturesT enumeration contains different features that can be saved. In this case, features represent specific information concerning the current state. When specific information is calculated once (e.g., the fastest opponent to the ball). This information can be stored. In the next request for this information, the stored result is immediately returned.
Definition at line 475 of file SoccerTypes.h.
enum FormationT |
The FormationT enumeration contains the different formation types that are defined.
Definition at line 383 of file SoccerTypes.h.
enum MarkT |
The MarkT enumeration contains different marking techniques.
MARK_ILLEGAL | illegal marking |
MARK_GOAL | mark goal (stand on obj-goal line) |
MARK_BISECTOR | mark bisector stand between goal,obj and ball,obj |
MARK_BALL | mark ball (stand on obj-ball line) |
Definition at line 427 of file SoccerTypes.h.
enum ObjectSetT |
The ObjectSetT enumerations holds the different object sets, which consists of one or multiple ObjectT types.
Definition at line 203 of file SoccerTypes.h.
enum ObjectT |
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.
Definition at line 106 of file SoccerTypes.h.
enum PassT |
The PassT enumeration contains different passing possibilities.
PASS_ILLEGAL | illegal pass |
PASS_FAST | pass fast to a teammate |
PASS_NORMAL | pass normal to a teammate |
Definition at line 443 of file SoccerTypes.h.
enum PlayerSetT |
The PlayerSetT enumeration contains different sets of playertypes that are defined in a formation. Possible sets are all midfielders, etc.
PS_DEFENDERS | all defenders |
PS_MIDFIELDERS | all midfielders |
PS_ATTACKERS | all attackers |
PS_ALL | all players |
Definition at line 374 of file SoccerTypes.h.
enum PlayerT |
The PlayerT enumeration contains the different playertypes that are defined in a formation. This should not be confused with the later introducted player_types in soccerserver 7.xx that denotes the different possible heterogeneous players. A player type in the context PlayerT denotes the kind of player (midfielder, attacker) on the field. Its role on the pitch.
Definition at line 359 of file SoccerTypes.h.
enum PlayModeT |
The PlayModeT enumeration contains all playmodes of the soccer playmode. The associated string values can be returned using the methods in the SoccerTypes class
Definition at line 217 of file SoccerTypes.h.
enum RefereeMessageT |
The RefereeT enumeration contains all messages that the referee can sent. The SoccerTypes class contains different methods to convert these messages to the corresponding playmode.
Definition at line 255 of file SoccerTypes.h.
enum SideT |
The SideT enumeration contains the two sides
Definition at line 328 of file SoccerTypes.h.
enum SucceedT |
The SucceedT enumeration contains the different succeed rate probabilites
SUCCEED_ILLEGAL | illegal message |
SUCCEED_ALWAYS | wil always succeed |
SUCCEED_DOUBTFUL | in some occassions it may succeed |
SUCCEED_NEVER | this will never succeed |
Definition at line 504 of file SoccerTypes.h.
enum TiredNessT |
The TiredNessT enumeration contains different values that indicate how tired an agent is.
Definition at line 460 of file SoccerTypes.h.
enum ViewAngleT |
The ViewAngleT enumeration contains the different view angles that are possible for a player
VA_NARROW | view angle narrow |
VA_NORMAL | view angle normal |
VA_WIDE | view angle wide |
VA_ILLEGAL | illegal view angle |
Definition at line 312 of file SoccerTypes.h.
enum ViewQualityT |
The ViewQualityT enumeration contains the different view qualities possible for a player.
Definition at line 321 of file SoccerTypes.h.
const AngDeg UnknownAngleValue = -1000.0 |
indicates unknown angle
Definition at line 93 of file SoccerTypes.h.
Referenced by AgentObject::AgentObject(), SenseHandler::analyzeFullStateMessage(), SenseHandler::analyzeSeeGlobalMessage(), WorldModel::calculateAngleAgentWithPos(), WorldModel::calculateStateAgent(), WorldModel::getDirectionOfWidestAngle(), WorldModel::getGlobalAngle(), SoccerTypes::getGlobalAngleLine(), WorldModel::getGlobalArmDirection(), WorldModel::getGlobalBodyAngle(), WorldModel::getGlobalBodyAngleLastSee(), WorldModel::getGlobalNeckAngle(), WorldModel::initParticlesBall(), PlayerObject::PlayerObject(), WorldModel::processLastSeeMessage(), and WorldModel::processNewObjectInfo().
const double UnknownDoubleValue = -1000.0 |
indicates unknown double
Definition at line 92 of file SoccerTypes.h.
Referenced by SenseHandler::analyzeFullStateMessage(), SenseHandler::analyzeSeeGlobalMessage(), WorldModel::averageParticles(), WorldModel::calculateStateAgent2(), WorldModel::calculateVelocityDynamicObject(), WorldModel::checkParticlesBall(), DynamicObject::DynamicObject(), Feature::Feature(), Player::getDeadBallPosition(), WorldModel::getGlobalPosition(), SoccerTypes::getGlobalPositionFlag(), WorldModel::getGlobalPositionLastSee(), WorldModel::getGlobalVelocity(), WorldModel::getGlobalVelocityLastSee(), WorldModel::getOppGoalieType(), WorldModel::getOwnGoalieType(), WorldModel::getPosClosestOpponentTo(), WorldModel::getRelativeAngle(), WorldModel::getRelativeDistance(), WorldModel::getRelativePosition(), WorldModel::initParticlesBall(), SoccerCommand::makeCommand(), PlayerTypeInfo::PlayerTypeInfo(), WorldModel::predictCommandToInterceptBall(), WorldModel::predictNrCyclesToObject(), WorldModel::processLastSeeMessage(), WorldModel::processNewObjectInfo(), and SoccerCommand::SoccerCommand().
const int UnknownIntValue = -1000 |
indicates unknown int
Definition at line 94 of file SoccerTypes.h.
Referenced by WorldModel::predictCommandToInterceptBall().
const long UnknownMessageNr = -30 |
indicates unknown messagenr
Definition at line 96 of file SoccerTypes.h.
const int UnknownTime = -20 |
indicates unknown time
Definition at line 95 of file SoccerTypes.h.
Referenced by Feature::Feature(), WorldModel::getTimeGlobalPosition(), WorldModel::getTimeGlobalPositionLastSee(), WorldModel::getTimeGlobalVelocity(), and WorldModel::WorldModel().