#include <WorldModel.h>
Collaboration diagram for WorldModel:
Definition at line 72 of file WorldModel.h.
|
This constructor creates the worldmodel, all variables are initialized by default values
Definition at line 59 of file WorldModel.C. References agentObject, Ball, bNewInfo, BS_ILLEGAL, bsCheckBall, CMD_MAX_COMMANDS, SoccerCommand::commandType, cond_newInfo, Flags, SoccerTypes::getOpponentObjectFromIndex(), ServerSettings::getStaminaMax(), SoccerTypes::getTeammateObjectFromIndex(), iCommandCounters, iGoalDiff, iNrHoles, iNrOpponentsSeen, iNrTeammatesSeen, iNrUnknownPlayers, Lines, MAX_FLAGS, MAX_LINES, MAX_OPPONENTS, MAX_TEAMMATES, mutex_newInfo, OBJECT_BALL, OBJECT_ILLEGAL, Opponents, performedCommands, PM_BEFORE_KICK_OFF, PS, queuedCommands, setPlayMode(), setSide(), AgentObject::setStamina(), Object::setType(), SIDE_ILLEGAL, SS, strTeamName, Teammates, and UnknownPlayers. |
|
This method adds one goal to the goal difference. Call this method when your team has scored a goal
Definition at line 363 of file WorldModel.C. References iGoalDiff. Referenced by SenseHandler::analyzeHearMessage(). |
|
This method returns the average of the particles contained in 'posArray'.
Definition at line 1120 of file WorldModelUpdate.C. References VecPosition::getX(), VecPosition::getY(), and UnknownDoubleValue. Referenced by calculateStateAgent(), and calculateStateBall(). |
|
This method calculates the global neck angle of the agent using all available flag information and the estimation of the current global position of the agent 'pos'. For each perceived flag, the global direction is calculated using the known global position of the flag and the specified global position 'pos' of the agent. Then the global neck direction of the agent is determined using the relative direction to this flag. The average neck angle of all perceived flags is returned.
Definition at line 1212 of file WorldModelUpdate.C. References AngDeg, atan2Deg(), cosDeg(), getGlobalPosition(), getRelativeAngle(), VecPosition::getX(), VecPosition::getY(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), VecPosition::normalizeAngle(), OBJECT_ILLEGAL, OBJECT_SET_FLAGS, ObjectT, sinDeg(), and UnknownAngleValue. Referenced by calculateStateAgent(), and calculateStateAgent2(). |
|
This method calculates the global position of the agent using two flags. Using the perceived distance to the two flag, two circles are created with as center the global position of the flag. The intersection of these two circles is returned as the global position of the agent (note that the relative direction to both flags can be used to determine which of the two possible intersection points is the correct position). It is assumed that the relative information of the specified flags are from the last see message.
Definition at line 1159 of file WorldModelUpdate.C. References AngDeg, getGlobalPosition(), getRelativeAngle(), getRelativeDistance(), VecPosition::getX(), VecPosition::getY(), and ObjectT. Referenced by calculateStateAgent2(). |
|
This method calculates the different state information of the agent, that is the global position, global velocity and global neck angle using the available information in the world model. This method uses a particle filter to determine this information.
Definition at line 917 of file WorldModelUpdate.C. References agentObject, AngDeg, averageParticles(), calculateAngleAgentWithPos(), calculateStateAgent2(), checkParticlesAgent(), getAgentGlobalNeckAngle(), getFurthestRelativeInSet(), getGlobalAngle(), VecPosition::getMagnitude(), ServerSettings::getPlayerDecay(), getRelativeAngle(), AgentObject::getSpeedRelToNeck(), initParticlesAgent(), VecPosition::normalizeAngle(), OBJECT_ILLEGAL, OBJECT_SET_LINES, ObjectT, particlesPosAgent, resampleParticlesAgent(), VecPosition::rotate(), VecPosition::setMagnitude(), SS, UnknownAngleValue, and updateParticlesAgent(). Referenced by updateAgentObjectAfterSee(). |
|
This method calculates the different state information of the agent, that is the global position, global velocity and global neck angle using the available information in the world model. This method uses a weighted average of all currently perceived flags.
Definition at line 1874 of file WorldModelUpdate.C. References agentObject, AngDeg, calculateAngleAgentWithPos(), calculatePosAgentWith2Flags(), getMinMaxDistQuantizeValue(), ServerSettings::getQuantizeStepL(), getRelativeDistance(), AgentObject::getSpeedRelToNeck(), VecPosition::getX(), VecPosition::getY(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, OBJECT_SET_FLAGS, ObjectT, VecPosition::rotate(), VecPosition::setVecPosition(), SS, and UnknownDoubleValue. Referenced by calculateStateAgent(). |
|
|
This method calculates the global position and velocity of the ball using only the newest visual information. It is much faster than the particles, so can be used when performance is an issue. Results are a little bit worse.
Definition at line 1947 of file WorldModelUpdate.C. References agentObject, Ball, calculateVelocityDynamicObject(), getAgentGlobalNeckAngle(), getAgentGlobalPosition(), ServerSettings::getBallDecay(), ServerSettings::getBallRand(), getBallSpeed(), ServerSettings::getBallSpeedMax(), Object::getGlobalPositionLastSee(), getGlobalVelocity(), VecPosition::getMagnitude(), ServerSettings::getMaximalKickDist(), getNrInSetInCircle(), getPlayMode(), AgentObject::getPositionDifference(), getRelativeAngle(), getRelativeDistance(), DynamicObject::getTimeChangeInformation(), Object::getTimeGlobalPosDerivedFromSee(), getTimeLastSeeMessage(), getTimeLastSeen(), getTimeSinceLastCatch(), ServerSettings::getVisibleDistance(), VecPosition::getX(), VecPosition::getY(), isBeforeKickOff(), OBJECT_BALL, OBJECT_SET_OPPONENTS, PM_PLAY_ON, VecPosition::setMagnitude(), VecPosition::setVecPosition(), and SS. |
|
This method determines the current state of a player and is called after a see message has arrived.
Definition at line 1558 of file WorldModelUpdate.C. References agentObject, calculateVelocityDynamicObject(), getAgentGlobalPosition(), PlayerObject::getGlobalNeckAngle(), VecPosition::getMagnitude(), getObjectPtrFromType(), ServerSettings::getPlayerRand(), ServerSettings::getPlayerSpeedMax(), getRelativeAngle(), getRelativeDistance(), DynamicObject::getTimeChangeInformation(), getTimeLastSeen(), ObjectT, VecPosition::setMagnitude(), VecPosition::setVecPosition(), and SS. Referenced by updateDynamicObjectAfterSee(). |
|
This method returns the velocity from the object o given the perceptions from the see message. It uses the soccer server formula directly (thus assuming no noise).
Definition at line 1533 of file WorldModelUpdate.C. References cosDeg(), Deg2Rad(), getAgentGlobalNeckAngle(), getAgentGlobalVelocity(), getObjectPtrFromType(), getRelativeAngle(), DynamicObject::getRelativeAngleChange(), getRelativeDistance(), DynamicObject::getRelativeDistanceChange(), ObjectT, VecPosition::relativeToGlobal(), sinDeg(), and UnknownDoubleValue. Referenced by calculateStateBall2(), and calculateStatePlayer(). |
|
This method checks all the particles that represent the global position of the agent using the flags in the last perceived see message. The global neck angle of the agent is used to make the perceived information global. Particles that are not possible are deleted and all legal particles will be shifted to the beginning of the array. The number of legal particles is returned.
Definition at line 1047 of file WorldModelUpdate.C. References AngDeg, VecPosition::getDistanceTo(), getGlobalPosition(), getMinMaxDistQuantizeValue(), ServerSettings::getQuantizeStepL(), getRelativeAngle(), getRelativeDistance(), iNrParticlesAgent, iterateObjectNext(), iterateObjectStart(), VecPosition::normalizeAngle(), OBJECT_ILLEGAL, OBJECT_SET_FLAGS, ObjectT, particlesPosAgent, and SS. Referenced by calculateStateAgent(). |
|
This method checks all particles that represent the global position and global velocity of the ball. This is done by using the last perceived information. Using the possible ranges from which these values coule originate from, it can be checked which particles are legal. These particles are moved to the beginning of the array. Afterwards the number of legal particles is stored in 'iNrParticlesLeft'.
Definition at line 1386 of file WorldModelUpdate.C. References AngDeg, Ball, getAgentGlobalNeckAngle(), getAgentGlobalPosition(), getAgentGlobalVelocity(), VecPosition::getDirection(), VecPosition::getMagnitude(), getMinMaxDirChange(), getMinMaxDistChange(), getMinMaxDistQuantizeValue(), getRelativeAngle(), DynamicObject::getRelativeAngleChange(), getRelativeDistance(), DynamicObject::getRelativeDistanceChange(), DynamicObject::getTimeChangeInformation(), getTimeLastSeeMessage(), getTimeLastSeen(), VecPosition::getX(), VecPosition::getY(), VecPosition::globalToRelative(), VecPosition::normalizeAngle(), OBJECT_BALL, Rad2Deg(), UnknownAngleValue, and UnknownDoubleValue. Referenced by calculateStateBall(). |
|
The actual power with which the ball is kicked depends on the relative location of the ball to the player. The kick is more powerful when the ball is very close to and in front of the player. The actual kickpowerrate with which the power of the kick command is multiplied is equal to
Definition at line 994 of file WorldModelHighLevel.C. References ServerSettings::getBallSize(), ServerSettings::getKickableMargin(), ServerSettings::getKickPowerRate(), ServerSettings::getPlayerSize(), getRelativeAngle(), getRelativeDistance(), OBJECT_BALL, and SS. Referenced by BasicPlayer::accelerateBallToVelocity(), getKickPowerForSpeed(), BasicPlayer::kickTo(), updateBallAfterKick(), and updateParticlesBall(). |
|
This method determines the actual angle that is used when 'angTurn' is sent to the SoccerServer. This value depends on the current velocity and the inertia moment of the player
Definition at line 1111 of file WorldModelHighLevel.C. References AngDeg, ServerSettings::getInertiaMoment(), and SS. Referenced by predictStateAfterTurn(). |
|
This method returns the body angle relative to the neck of the agent.
Definition at line 519 of file WorldModel.C. References agentObject, AngDeg, and AgentObject::getBodyAngleRelToNeck(). Referenced by BasicPlayer::alignNeckWithBody(), and getRelativeAngle(). |
|
This method returns the effort information of the agent
Definition at line 547 of file WorldModel.C. References agentObject, Stamina::getEffort(), and AgentObject::getStamina(). Referenced by BasicPlayer::dashToPoint(). |
|
This method returns the global body angle of the agent in the world.
Definition at line 533 of file WorldModel.C. References agentObject, AngDeg, and PlayerObject::getGlobalBodyAngle(). Referenced by BasicPlayer::accelerateBallToVelocity(), BasicPlayer::dashToPoint(), BasicPlayer::defendGoalLine(), Player::deMeer5_goalie(), BasicPlayer::dribble(), BasicPlayer::freezeBall(), BasicPlayer::getInterceptionPointBall(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), BasicPlayer::moveToPos(), BasicPlayer::moveToPosAlongLine(), BasicPlayer::outplayOpponent(), predictAgentStateAfterCommand(), predictNrCyclesToPoint(), predictPosAfterNrCycles(), BasicPlayer::searchBall(), BasicPlayer::turnBackToPoint(), BasicPlayer::turnBodyToPoint(), BasicPlayer::turnWithBallTo(), updateAgentAndBallAfterSense(), updateBallAfterKick(), and updateParticlesBall(). |
|
This method returns the global neck angle of the agent in the world.
Definition at line 526 of file WorldModel.C. References agentObject, AngDeg, and PlayerObject::getGlobalNeckAngle(). Referenced by calculateStateAgent(), calculateStateBall2(), calculateVelocityDynamicObject(), checkParticlesBall(), Player::executeStringCommand(), BasicPlayer::getInterceptionPointBall(), initParticlesBall(), BasicPlayer::kickTo(), predictAgentStateAfterCommand(), updateAgentAndBallAfterSense(), updateDynamicObjectAfterSee(), and updateObjectRelativeFromGlobal(). |
|
This method returns the global position of the agent
Definition at line 568 of file WorldModel.C. References agentObject, and Object::getGlobalPosition(). Referenced by calculateStateBall2(), calculateStatePlayer(), checkParticlesBall(), BasicPlayer::dashToPoint(), BasicPlayer::defendGoalLine(), Player::deMeer5(), Player::deMeer5_goalie(), BasicPlayer::dribble(), Player::executeStringCommand(), BasicPlayer::getInterceptionPointBall(), getRelAngleOpponentGoal(), getRelDistanceOpponentGoal(), initParticlesBall(), BasicPlayer::interceptClose(), isOpponentAtAngle(), BasicPlayer::kickTo(), BasicPlayer::moveToPos(), BasicPlayer::moveToPosAlongLine(), BasicPlayer::outplayOpponent(), predictAgentStateAfterCommand(), processUnsureHearInfo(), Player::sayWorldStatus(), BasicPlayer::searchBall(), BasicPlayer::turnWithBallTo(), updateAgentAndBallAfterSense(), updateAll(), updateBallForCollision(), and updateObjectRelativeFromGlobal(). |
|
This method returns the global velocity information of the agent
Definition at line 554 of file WorldModel.C. References agentObject, and DynamicObject::getGlobalVelocity(). Referenced by calculateVelocityDynamicObject(), checkParticlesBall(), BasicPlayer::dashToPoint(), BasicPlayer::getInterceptionPointBall(), initParticlesBall(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), predictAgentStateAfterCommand(), and Player::sayWorldStatus(). |
|
This method returns the ObjectType of the agent. This is an ObjectT between OBJECT_TEAMMATE_1 and OBJECT_TEAMMATE_11
Definition at line 502 of file WorldModel.C. References agentObject, Object::getType(), and ObjectT. Referenced by Player::deMeer5(), Player::deMeer5_goalie(), Player::executeStringCommand(), getFirstEmptySpotInSet(), isConfidenceGood(), isConfidenceVeryGood(), predictAgentPos(), predictNrCyclesToPoint(), predictPosAfterNrCycles(), processPerfectHearInfo(), processUnsureHearInfo(), BasicPlayer::turnWithBallTo(), updateAfterSeeMessage(), updateAfterSenseMessage(), updateAll(), and updateRelativeFromGlobal(). |
|
This method returns the speed of the agent
Definition at line 561 of file WorldModel.C. References agentObject, and DynamicObject::getSpeed(). Referenced by BasicPlayer::getInterceptionPointBall(), BasicPlayer::searchBall(), BasicPlayer::turnBackToPoint(), and BasicPlayer::turnBodyToPoint(). |
|
This method returns the stamina information of the agent
Definition at line 540 of file WorldModel.C. References agentObject, and AgentObject::getStamina(). Referenced by Player::deMeer5(), BasicPlayer::getInterceptionPointBall(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), predictAgentStateAfterCommand(), predictPosAfterNrCycles(), and updateAgentAndBallAfterSense(). |
|
This method returns the view angle of the agent.
Definition at line 575 of file WorldModel.C. References agentObject, AgentObject::getViewAngle(), and ViewAngleT. Referenced by getAgentViewFrequency(), and BasicPlayer::searchBall(). |
|
This method returns the view frequency of see messages for the agent relative to the time of the sense_body interval. So 0.5 means a see message arrives twice in every simulation cycle.
Definition at line 591 of file WorldModel.C. References getAgentViewAngle(), getAgentViewQuality(), VA_ILLEGAL, VA_NARROW, VA_NORMAL, VA_WIDE, VQ_HIGH, VQ_ILLEGAL, and VQ_LOW. Referenced by SenseHandler::analyzeSeeMessage(), and SenseHandler::setTimeSignal(). |
|
This method returns the view quality of the agent
Definition at line 582 of file WorldModel.C. References agentObject, AgentObject::getViewQuality(), and ViewQualityT. Referenced by getAgentViewFrequency(). |
|
This method determines the angle that should be sent to the soccerserver when the player wants to turn angDesiredAngle. This value depends on the current velocity and the inertia moment of the player
Definition at line 1094 of file WorldModelHighLevel.C. References AngDeg, ServerSettings::getInertiaMoment(), ServerSettings::getMaxMoment(), ServerSettings::getMinMoment(), and SS. Referenced by BasicPlayer::getInterceptionPointBall(), BasicPlayer::searchBall(), BasicPlayer::turnBackToPoint(), and BasicPlayer::turnBodyToPoint(). |
|
This method returns the global direction of the ball velocity.
Definition at line 634 of file WorldModel.C. References AngDeg, Ball, VecPosition::getDirection(), and DynamicObject::getGlobalVelocity(). Referenced by BasicPlayer::freezeBall(), and isBallHeadingToGoal(). |
|
This method returns the global position of the ball. The method getConfidence with as argument OBJECT_BALL should be called to check the confidence of this global position.
Definition at line 620 of file WorldModel.C. References getGlobalPosition(), and OBJECT_BALL. Referenced by Player::amIAgentToSaySomething(), BasicPlayer::clearBall(), BasicPlayer::defendGoalLine(), Player::deMeer5(), Player::deMeer5_goalie(), BasicPlayer::getEndSpeedForPass(), BasicPlayer::getShootPositionOnLine(), Player::getStrategicPosition(), isBallCatchable(), isBallHeadingToGoal(), isBallInOwnPenaltyArea(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), BasicPlayer::moveToPosAlongLine(), Player::sayWorldStatus(), BasicPlayer::searchBall(), and BasicPlayer::turnWithBallTo(). |
|
This method returns the current estimate of the speed of the ball.
Definition at line 627 of file WorldModel.C. References Ball, DynamicObject::getGlobalVelocity(), and VecPosition::getMagnitude(). Referenced by calculateStateBall2(), BasicPlayer::freezeBall(), and BasicPlayer::turnWithBallTo(). |
|
This method returns the status of the ball. This value is derived from the check_ball command that can only be used by the coach. The status of the ball corresponds to the server time returned by getTimeCheckBall.
Definition at line 426 of file WorldModel.C. References BallStatusT, and bsCheckBall. |
|
This method returns the closest object in 'set' to the line 'l'. The projection p of the global position of this object on the line 'l' should lie between pos1 and pos2. After the method is finished, it returns this object and the last two arguments of this method are set to the the distance between the object and p and the distance from pos1 to p respectively.
Definition at line 227 of file WorldModelHighLevel.C. References VecPosition::getDistanceTo(), getGlobalPosition(), PlayerSettings::getPlayerConfThr(), Line::getPointOnLineClosestTo(), Line::isInBetween(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. |
|
This method returns the ojbect type of the closest object to the specified position and that is part of the object set 'set' with a confidence higher than the supplied threshold. If no threshold is supplied, the threshold defined in PlayerSettings is used.
Definition at line 188 of file WorldModelHighLevel.C. References getGlobalPosition(), VecPosition::getMagnitude(), PlayerSettings::getPlayerConfThr(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. |
|
This method returns the object type of the closest object to the ObjectT that is supplied as the second argument. Only objects are taken into account that are part of the set 'set' and have a confidence higher than the supplied threshold. If no threshold is supplied, the threshold defined in PlayerSettings is used.
Definition at line 148 of file WorldModelHighLevel.C. References getGlobalPosition(), VecPosition::getMagnitude(), PlayerSettings::getPlayerConfThr(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. Referenced by processUnsureHearInfo(), and BasicPlayer::turnWithBallTo(). |
|
This method returns the object type of the closest object relative to the agent. Only objects are taken into account that are part of the set 'set'.
Definition at line 269 of file WorldModelHighLevel.C. References getRelativeDistance(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, and ObjectT. Referenced by initParticlesAgent(). |
|
This method returns the confidence value of the object supplied as the first argument. The confidence is calculated using the current server cycle and the time the object was last seen.
Definition at line 803 of file WorldModel.C. References Object::getConfidence(), getCurrentTime(), getObjectPtrFromType(), and ObjectT. Referenced by BasicPlayer::defendGoalLine(), Player::deMeer5(), Player::deMeer5_goalie(), getFirstEmptySpotInSet(), Player::getStrategicPosition(), isConfidenceGood(), isConfidenceVeryGood(), iterateObjectNext(), logObjectInformation(), Player::sayWorldStatus(), and showObjects(). |
|
This method returns the current cycle number. In case of a player this is the cycle of the last sense message, in case of the coach this is the cycle of the last see_global message.
Definition at line 189 of file WorldModel.C. References getPlayerNumber(), Time::getTime(), getTimeLastSeeGlobalMessage(), and getTimeLastSenseMessage(). Referenced by SenseHandler::analyzePlayerMessage(), Player::deMeer5(), BasicPlayer::freezeBall(), logObjectInformation(), Player::mainLoop(), Player::sayWorldStatus(), and Player::shallISaySomething(). |
|
This method returns the current time. In case of a player this is the time of the last sense message, in case of the coach this is the time of the last see_global message.
Definition at line 177 of file WorldModel.C. References getPlayerNumber(), getTimeLastSeeGlobalMessage(), and getTimeLastSenseMessage(). Referenced by SenseHandler::analyzeHearMessage(), SenseHandler::analyzeSeeGlobalMessage(), SenseHandler::analyzeSenseMessage(), getConfidence(), getTimeFromConfidence(), isTimeStopped(), logObjectInformation(), Player::mainLoop(), predictNrCyclesToPoint(), predictPosAfterNrCycles(), processCatchedBall(), processPerfectHearInfo(), processPerfectHearInfoBall(), processQueuedCommands(), BasicPlayer::searchBall(), ActHandler::sendCommands(), show(), showObjects(), updateAfterSeeMessage(), updateAfterSenseMessage(), updateAgentAndBallAfterSense(), updateAll(), updateBallAfterKick(), updateBallForCollision(), and updateDynamicObjectForNextCycle(). |
|
This method determines the (global) direction which has the largest angle between the opponents and is located in the interval angMin.. angMax.
Definition at line 874 of file WorldModelHighLevel.C. References AngDeg, getBisectorTwoAngles(), getGlobalPosition(), PlayerSettings::getPlayerConfThr(), getRelativeDistance(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), MAX_OPPONENTS, VecPosition::normalizeAngle(), OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, ObjectT, PS, and UnknownAngleValue. Referenced by BasicPlayer::clearBall(), and BasicPlayer::getShootPositionOnLine(). |
|
This method returns the speed the ball will have after 'dCycles' cycles when it is given an initial speed of 'dFirstSpeed'. This can be calculated using a geometric series.
Definition at line 1081 of file WorldModelHighLevel.C. References ServerSettings::getBallDecay(), and SS. Referenced by BasicPlayer::getEndSpeedForPass(). |
|
This method returns the fastest object to another object that is currently located at position 'pos' and has velocity 'vel' that decays with a value 'dDecay'. The last argument will be filled with the predicted amount of cycles needed to reach this object.
Definition at line 507 of file WorldModelHighLevel.C. References VecPosition::getDistanceTo(), getGlobalPosition(), PlayerSettings::getPlayerConfThr(), ServerSettings::getPlayerSpeedMax(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, PS, and SS. |
|
This method returns the fastest object to a specified object and fills the last argument with the predicted amount of cycles needed to intercept this object. Only objects within the set 'set' are taken into consideration and the objects have to have a confidence higher than the player confidence threshold defined in PlayerSettings.
Definition at line 459 of file WorldModelHighLevel.C. References VecPosition::getDistanceTo(), getGlobalPosition(), PlayerSettings::getPlayerConfThr(), ServerSettings::getPlayerSpeedMax(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, predictPosAfterNrCycles(), PS, and SS. Referenced by Player::deMeer5(), Player::deMeer5_goalie(), and isBallInOurPossesion(). |
|
This method returns the first empty spot in the set 'set'. The first empty spot is returned as the object which has a lower confidence than the threshold player_conf_thr defined in the PlayerSettings. This can be used when information of an unknown object is perceived. It is set on the first position where there is currently no information stored.
Definition at line 552 of file WorldModelHighLevel.C. References getAgentObjectType(), getConfidence(), PlayerSettings::getPlayerConfThr(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. Referenced by mapUnknownPlayers(), and processUnsureHearInfo(). |
|
This method returns the speed that has to be given to the ball when it should have travelled a distance 'dDist' after 'dCycles' number of cycles. This can be calculated using a geometric series.
Definition at line 1070 of file WorldModelHighLevel.C. References ServerSettings::getBallDecay(), Geometry::getFirstGeomSeries(), and SS. Referenced by BasicPlayer::getEndSpeedForPass(). |
|
This method returns the speed that has to be given to the ball when it should have an endspeed of 'dEndSpeed' after 'dCycles' number of cycles. This can be calculated using a geometric series.
Definition at line 1056 of file WorldModelHighLevel.C. References ServerSettings::getBallDecay(), and SS. Referenced by getKickSpeedToTravel(). |
|
This method returns the object type of the furthest object to the ObjectT that is supplied as the second argument. Only objects are taken into account that are part of the set 'set' and have a confidence higher than the supplied threshold. If no threshold is supplied, the threshold defined in PlayerSettings is used.
Definition at line 391 of file WorldModelHighLevel.C. References getGlobalPosition(), VecPosition::getMagnitude(), PlayerSettings::getPlayerConfThr(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. |
|
This method returns the type of the object that is located furthest relative to the agent. Only objects are taken into account that are part of the set 'set'.
Definition at line 427 of file WorldModelHighLevel.C. References getRelativeDistance(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, and ObjectT. Referenced by calculateStateAgent(). |
|
This method returns the global angle of the specified object (this object is normally a line).
Definition at line 790 of file WorldModel.C. References AngDeg, SoccerTypes::getGlobalAngleLine(), getSide(), SoccerTypes::isLine(), ObjectT, and UnknownAngleValue. Referenced by calculateStateAgent(). |
|
This method returns the global body angle of the specified object. No check is made whether this information is up to date (use getTimeGlobalAngles).
Definition at line 765 of file WorldModel.C. References AngDeg, PlayerObject::getGlobalBodyAngle(), getObjectPtrFromType(), ObjectT, and UnknownAngleValue. Referenced by logObjectInformation(), predictNrCyclesToPoint(), and predictPosAfterNrCycles(). |
|
This method returns the global neck angle of the specified object. No check is made whether this information is up to date (use getTimeGlobalAngles).
Definition at line 778 of file WorldModel.C. References AngDeg, PlayerObject::getGlobalNeckAngle(), getObjectPtrFromType(), ObjectT, and UnknownAngleValue. Referenced by logObjectInformation(). |
|
This method returns the global position of an objectType. This method is normally used for the objects on the field (player, opponents and the ball). When the global position cannot be determined, a VecPosition with both the x and y coordinate are set to 'UnknownDoubleValue'.
Definition at line 658 of file WorldModel.C. References Object::getGlobalPosition(), SoccerTypes::getGlobalPositionFlag(), ServerSettings::getGoalWidth(), getObjectPtrFromType(), getSide(), SoccerTypes::isFlag(), SoccerTypes::isGoal(), ObjectT, SS, and UnknownDoubleValue. Referenced by calculateAngleAgentWithPos(), calculatePosAgentWith2Flags(), checkParticlesAgent(), BasicPlayer::directPass(), getBallPos(), getClosestInSetTo(), getDirectionOfWidestAngle(), getFastestInSetTo(), getFurthestInSetTo(), BasicPlayer::getMarkingPosition(), getNrInSetInCircle(), getNrInSetInCone(), getNrInSetInRectangle(), getSecondClosestInSetTo(), initParticlesAgent(), isOnside(), isOpponentAtAngle(), BasicPlayer::leadingPass(), logObjectInformation(), BasicPlayer::outplayOpponent(), predictNrCyclesToObject(), predictNrCyclesToPoint(), predictPosAfterNrCycles(), Player::sayWorldStatus(), BasicPlayer::throughPass(), BasicPlayer::turnWithBallTo(), updateBallAfterKick(), updateBallForCollision(), and updateDynamicObjectForNextCycle(). |
|
This method returns the global velocity of an objectType. When the global position cannot be determined, a VecPosition is returned with both the x and y coordinate set to 'UnknownDoubleValue'.
Definition at line 689 of file WorldModel.C. References DynamicObject::getGlobalVelocity(), getObjectPtrFromType(), ObjectT, and UnknownDoubleValue. Referenced by BasicPlayer::accelerateBallToVelocity(), calculateStateBall2(), BasicPlayer::defendGoalLine(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::kickTo(), logObjectInformation(), predictPosAfterNrCycles(), Player::sayWorldStatus(), updateBallAfterKick(), updateBallForCollision(), and updateDynamicObjectForNextCycle(). |
|
This method returns the goal difference. When this value is below zero, the team of agent is behind, 0 means that the score is currently the same for both teams and a value higher than zero means that you're winning!.
Definition at line 355 of file WorldModel.C. References iGoalDiff. |
|
This method returns information about the heterogeneous player at index 'iIndex'. This information consists of a subset of the ServerSettings values that fully specify the information of the heterogeneous player. Definition at line 979 of file WorldModel.C. References pt. |
|
The actual power with which the ball must be kicked depends on the relative location of the ball to the player. The kick is more powerful when the ball is very close to and in front of the player. The actual power with which the ball must be kicked is equal to
Definition at line 1018 of file WorldModelHighLevel.C. References getActualKickPowerRate(). Referenced by BasicPlayer::accelerateBallToVelocity(), BasicPlayer::freezeBall(), BasicPlayer::kickBallCloseToBody(), and BasicPlayer::kickTo(). |
|
This method determines the power with which the ball must be kicked in order to travel a given distance and still have a speed after that distance
Definition at line 1032 of file WorldModelHighLevel.C. References ServerSettings::getBallDecay(), Geometry::getFirstInfGeomSeries(), getFirstSpeedFromEndSpeed(), Geometry::getLengthGeomSeries(), and SS. Referenced by BasicPlayer::kickTo(). |
|
This method determines the minimum and maximum input values that will produce a quantized (noise used in the soccer server) for the direction change of 'dOutput'. See the soccer server manual for details.
Definition at line 1630 of file WorldModelUpdate.C. References invQuantizeMax(), and invQuantizeMin(). Referenced by checkParticlesBall(), and initParticlesBall(). |
|
This method determines the minimum and maximum input values that will produce a quantized (noise used in the soccer server) for the distance change of 'dOutput'. See the soccer server manual for details.
Definition at line 1652 of file WorldModelUpdate.C. References getMinMaxDistQuantizeValue(), invQuantizeMax(), invQuantizeMin(), max(), and min(). Referenced by checkParticlesBall(), and initParticlesBall(). |
|
This method determines the minimum and maximum input values that will produce a quantized (noise used in the soccer server) distance of 'dOutput'. With other words, this is the range of values that will have the same quantized value 'dOutput'. The quantized steps are defined by x1 and x2. See the soccer server manual for details.
Definition at line 1604 of file WorldModelUpdate.C. References invQuantizeMax(), and invQuantizeMin(). Referenced by calculateStateAgent2(), checkParticlesAgent(), checkParticlesBall(), getMinMaxDistChange(), initParticlesAgent(), and initParticlesBall(). |
|
This method returns the number of objects that are within the circle 'c' Only objects are taken into account that are part of the set 'set' and have a confidence higher than the threshold defined in PlayerSettings.
Definition at line 80 of file WorldModelHighLevel.C. References getGlobalPosition(), PlayerSettings::getPlayerConfThr(), Circle::isInside(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. Referenced by calculateStateBall(), calculateStateBall2(), and Player::deMeer5_goalie(). |
|
This method returns the number of objects in the specified cone. A cone is like a piece of a pie, in which 'start' is the center of the pie, 'end' is the edge of the pie and 'dWidth' is the half width of the piece after distance 1. Only objects are taken into consideration that are within the set 'set' and have a confidence higher than the threshold defined in PlayerSettings.
Definition at line 109 of file WorldModelHighLevel.C. References VecPosition::getDistanceTo(), getGlobalPosition(), PlayerSettings::getPlayerConfThr(), Line::getPointOnLineClosestTo(), Line::isInBetween(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), Line::makeLineFromTwoPoints(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. Referenced by Player::executeStringCommand(), and BasicPlayer::outplayOpponent(). |
|
This method returns the number of visible objects that are part of the object set 'set' and located in the rectangle 'rect'. When no rectangle is defined (rect=NULL) the whole field is taken into account. Only objects with a confidence value higher than the threshold defined in PlayerSettings are taken into consideration.
Definition at line 57 of file WorldModelHighLevel.C. References getGlobalPosition(), PlayerSettings::getPlayerConfThr(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. Referenced by updateAll(). |
|
This method returns the amount of commands c performed by the agent. This is supplied in the sense_body message.
Definition at line 380 of file WorldModel.C. References CommandT, and iCommandCounters. Referenced by show(). |
|
This method returns a pointer to the Object information of the object type that is passed as the first argument.
Definition at line 110 of file WorldModel.C. References agentObject, Ball, Flags, SoccerTypes::getIndex(), getOppGoalieType(), getOwnGoalieType(), Object::getType(), SoccerTypes::isBall(), SoccerTypes::isFlag(), SoccerTypes::isKnownPlayer(), SoccerTypes::isLine(), SoccerTypes::isTeammate(), Lines, OBJECT_ILLEGAL, OBJECT_OPPONENT_GOALIE, OBJECT_TEAMMATE_GOALIE, ObjectT, Opponents, and Teammates. Referenced by calculateStatePlayer(), calculateVelocityDynamicObject(), getConfidence(), getGlobalBodyAngle(), getGlobalNeckAngle(), getGlobalPosition(), getGlobalVelocity(), getRelativeAngle(), getRelativeDistance(), getRelativePosition(), getTimeGlobalAngles(), getTimeGlobalPosition(), getTimeGlobalVelocity(), getTimeLastSeen(), isKnownPlayer(), isVisible(), processNewObjectInfo(), processPerfectHearInfo(), processSeeGlobalInfo(), setIsKnownPlayer(), show(), updateDynamicObjectAfterSee(), updateDynamicObjectForNextCycle(), and updateObjectRelativeFromGlobal(). |
|
This method returns the x coordinate of the offside line using the known information in the WorldModel. If a player moves beyond this line, he stands offside. First the opponent with the second highest x coordinate is located, then the maximum of this x coordinate and the ball x coordinate is returned.
Definition at line 786 of file WorldModelHighLevel.C. References Ball, Object::getGlobalPosition(), Object::getType(), VecPosition::getX(), isConfidenceGood(), max(), MAX_OPPONENTS, ObjectT, and Opponents. Referenced by Player::getStrategicPosition(), and isOnside(). |
|
This method returns the object type of the opponent goalkeeper. Which object type is the actual goalkeeper is checked in different ways. First of all this information is can be available in a see message. When no player is stored in the world model of which this is is perceived, the opponent goalkeeper is assumed the player with the highest x coordinate, but only if this player stands very close in front of the goal
Definition at line 835 of file WorldModel.C. References Object::getGlobalPosition(), ServerSettings::getGoalWidth(), PlayerObject::getIsGoalie(), Object::getType(), VecPosition::getX(), VecPosition::getY(), isConfidenceGood(), MAX_OPPONENTS, OBJECT_ILLEGAL, OBJECT_OPPONENT_1, ObjectT, Opponents, PENALTY_X, PITCH_LENGTH, SS, and UnknownDoubleValue. Referenced by getObjectPtrFromType(), and Player::sayWorldStatus(). |
|
This method returns the outer position on the field given a position 'pos' and a global angle 'ang'. The outer position is defined as the point on the field where the line created from this position and angle crosses either a side line, goal line or penalty line. To be on the safe side a small value is specified, which denotes the distance from the side line that should be returned.
Definition at line 825 of file WorldModelHighLevel.C. References AngDeg, Line::getIntersection(), VecPosition::getY(), Line::makeLineFromPositionAndAngle(), PENALTY_AREA_WIDTH, PENALTY_X, PITCH_LENGTH, and PITCH_WIDTH. Referenced by BasicPlayer::dribble(). |
|
This method returns the object type of the own goalkeeper. Which object type is the actual goalkeeper is checked in different ways. First of all this information is available in the see, when (goalie) is behind the perceived object. When no player is stored in the world model of which this is perceived, the own goalkeeper is assumed the player with the lowest x coordinate, but only if this player stands close in front of the goal.
Definition at line 873 of file WorldModel.C. References Object::getGlobalPosition(), ServerSettings::getGoalWidth(), PlayerObject::getIsGoalie(), Object::getType(), VecPosition::getX(), VecPosition::getY(), isConfidenceGood(), MAX_TEAMMATES, OBJECT_ILLEGAL, OBJECT_TEAMMATE_1, ObjectT, PENALTY_X, PITCH_LENGTH, SS, Teammates, and UnknownDoubleValue. Referenced by getObjectPtrFromType(). |
|
This method returns the player number of the agent. The player number is the fixed number which is given by the server after initialization.
Definition at line 282 of file WorldModel.C. References iPlayerNumber. Referenced by Player::amIAgentToSaySomething(), SenseHandler::analyzeChangePlayerTypeMessage(), getCurrentCycle(), getCurrentTime(), Player::mainLoop(), Player::sayWorldStatus(), and updateAll(). |
|
This method returns the current playmode. This playmode is passed through by the referee.
Definition at line 334 of file WorldModel.C. References playMode, and PlayModeT. Referenced by calculateStateBall(), calculateStateBall2(), and Player::deMeer5_goalie(). |
|
This method returns the global position of the opponent goal.
Definition at line 928 of file WorldModel.C. References SoccerTypes::getGlobalPositionFlag(), SoccerTypes::getGoalOpponent(), ServerSettings::getGoalWidth(), getSide(), and SS. |
|
This method returns the global position of the own goal.
Definition at line 938 of file WorldModel.C. References SoccerTypes::getGlobalPositionFlag(), ServerSettings::getGoalWidth(), SoccerTypes::getOwnGoal(), getSide(), and SS. Referenced by BasicPlayer::getMarkingPosition(), and isBallHeadingToGoal(). |
|
This method determines the optimal dash power to mantain an optimal speed When the current speed is too high and the distance is very small, a negative dash is performed. Otherwise the difference with the maximal speed is determined and the dash power rate is set to compensate for this difference.
Definition at line 1126 of file WorldModelHighLevel.C. References AngDeg, ServerSettings::getDashPowerRate(), ServerSettings::getMaxPower(), ServerSettings::getMinPower(), ServerSettings::getPlayerSpeedMax(), VecPosition::getX(), VecPosition::rotate(), and SS. Referenced by BasicPlayer::dashToPoint(), BasicPlayer::interceptClose(), and BasicPlayer::interceptCloseGoalie(). |
|
This method returns the relative angle to the opponent goal. This relative angle is the relative angle between the opponent goal position and the agent position. The neck and body angle of the agent are NOT taken into account.
Definition at line 964 of file WorldModel.C. References getAgentGlobalPosition(), SoccerTypes::getGlobalPositionFlag(), OBJECT_GOAL_L, OBJECT_GOAL_R, SIDE_LEFT, and sideSide. |
|
This method returns the relative angle between the agent and the object supplied as the first argument. No check is made whether this information is up to date (use isVisible or getConfidence for that). By default the returned angle is relative to the neck of the agent. When the second argument 'bWithBody' is set to true, the returned angle is relative to the body of the agent.
Definition at line 734 of file WorldModel.C. References AngDeg, getAgentBodyAngleRelToNeck(), getObjectPtrFromType(), Object::getRelativeAngle(), VecPosition::normalizeAngle(), ObjectT, and UnknownDoubleValue. Referenced by calculateAngleAgentWithPos(), calculatePosAgentWith2Flags(), calculateStateAgent(), calculateStateBall2(), calculateStatePlayer(), calculateVelocityDynamicObject(), BasicPlayer::catchBall(), checkParticlesAgent(), checkParticlesBall(), Player::deMeer5(), getActualKickPowerRate(), initParticlesAgent(), initParticlesBall(), BasicPlayer::kickTo(), mapUnknownPlayers(), and removeGhosts(). |
|
This method returns the relative distance between the agent and the object supplied as the first argument. No check is made whether this information is up to date (use isVisible or getConfidence for that).
Definition at line 703 of file WorldModel.C. References getObjectPtrFromType(), Object::getRelativeDistance(), ObjectT, and UnknownDoubleValue. Referenced by calculatePosAgentWith2Flags(), calculateStateAgent2(), calculateStateBall(), calculateStateBall2(), calculateStatePlayer(), calculateVelocityDynamicObject(), checkParticlesAgent(), checkParticlesBall(), getActualKickPowerRate(), getClosestRelativeInSet(), getDirectionOfWidestAngle(), getFurthestRelativeInSet(), getSecondClosestRelativeInSet(), initParticlesAgent(), initParticlesBall(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), isBallCatchable(), isBallKickable(), BasicPlayer::kickTo(), logObjectInformation(), mapUnknownPlayers(), and updateBallAfterKick(). |
|
This method returns the relative position of the object to the agent. No check is made whether this information is up to date (use isVisible or getConfidence for that).
Definition at line 716 of file WorldModel.C. References getObjectPtrFromType(), Object::getRelativePosition(), ObjectT, and UnknownDoubleValue. Referenced by mapUnknownPlayers(). |
|
This method returns the relative distance to the opponent goal
Definition at line 948 of file WorldModel.C. References getAgentGlobalPosition(), VecPosition::getDistanceTo(), SoccerTypes::getGlobalPositionFlag(), OBJECT_GOAL_L, OBJECT_GOAL_R, SIDE_LEFT, and sideSide. |
|
This method returns the object type of the second closest object to the object type that is supplied as the second argument. Only objects are taken into account within set 'set' and with a confidence higher than the supplied threshold. If no threshold is supplied, the threshold defined in PlayerSettings is used.
Definition at line 302 of file WorldModelHighLevel.C. References getGlobalPosition(), VecPosition::getMagnitude(), PlayerSettings::getPlayerConfThr(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, ObjectT, and PS. |
|
This method returns the object type of the second closest object relative to the agent. Only objects are taken into account within set 'set' and which where seen in the last see message.
Definition at line 347 of file WorldModelHighLevel.C. References getRelativeDistance(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, ObjectSetT, and ObjectT. |
|
This method returns the side of the agent. Note that the side of the agent does not change after half time.
Definition at line 300 of file WorldModel.C. References sideSide, and SideT. Referenced by SenseHandler::analyzeHearMessage(), SenseHandler::analyzePlayerMessage(), Player::deMeer5_goalie(), getGlobalAngle(), getGlobalPosition(), getPosOpponentGoal(), getPosOwnGoal(), isInOwnPenaltyArea(), isInTheirPenaltyArea(), Player::sayWorldStatus(), setPlayMode(), and show(). |
|
This method returns the teamname of the agent in this worldmodel
Definition at line 316 of file WorldModel.C. References strTeamName. Referenced by SenseHandler::analyzeSeeGlobalMessage(), SenseHandler::analyzeSeeMessage(), and show(). |
|
This method returns the time the status of the ball was last checked (coach only).
Definition at line 407 of file WorldModel.C. References timeCheckBall. |
|
This method returns the inverse confidence, i.e. the time that belongs to the specified confidence. This can be used to determine the time the object was last seen when the confidence is given. Herefore the current time is used.
Definition at line 775 of file WorldModelHighLevel.C. References getCurrentTime(). Referenced by logObjectInformation(), processPerfectHearInfo(), and processPerfectHearInfoBall(). |
|
This method returns the time of the global angles (both body and neck angle) of the specified object.
Definition at line 752 of file WorldModel.C. References getObjectPtrFromType(), PlayerObject::getTimeGlobalAngles(), and ObjectT. Referenced by predictNrCyclesToPoint(), and predictPosAfterNrCycles(). |
|
This method returns the time of the global position of the specified object.
Definition at line 643 of file WorldModel.C. References getObjectPtrFromType(), Object::getTimeGlobalPosition(), ObjectT, and UnknownTime. Referenced by updateAfterSenseMessage(). |
|
This method returns the time of the global velocity of the specified object.
Definition at line 675 of file WorldModel.C. References getObjectPtrFromType(), DynamicObject::getTimeGlobalVelocity(), ObjectT, and UnknownTime. Referenced by logObjectInformation(). |
|
This method returns the time of the last received referee message.
Definition at line 168 of file WorldModel.C. References timeLastRefMessage. |
|
This method returns the time of the last see global message. This message can only be received by the coach.
Definition at line 216 of file WorldModel.C. References getTimeLastSeeMessage(). Referenced by getCurrentCycle(), and getCurrentTime(). |
|
This method returns the time of the last see message
Definition at line 234 of file WorldModel.C. References timeLastSeeMessage. Referenced by SenseHandler::analyzeSeeMessage(), calculateStateBall(), calculateStateBall2(), checkParticlesBall(), getTimeLastSeeGlobalMessage(), initParticlesBall(), isLastMessageSee(), isVisible(), iterateObjectNext(), Player::mainLoop(), removeGhosts(), BasicPlayer::searchBall(), updateAfterSeeMessage(), updateAgentObjectAfterSee(), updateAll(), and updateDynamicObjectAfterSee(). |
|
This method returns the last server cycle the specified object has been seen.
Definition at line 903 of file WorldModel.C. References getObjectPtrFromType(), Object::getTimeLastSeen(), and ObjectT. Referenced by calculateStateBall(), calculateStateBall2(), calculateStatePlayer(), checkParticlesBall(), iterateObjectNext(), removeGhosts(), and updateAfterSeeMessage(). |
|
This method returns the time of the last sense message
Definition at line 257 of file WorldModel.C. References timeLastSenseMessage. Referenced by SenseHandler::analyzeSeeMessage(), getCurrentCycle(), getCurrentTime(), isLastMessageSee(), isQueuedActionPerformed(), setPlayMode(), and updateAll(). |
|
This method returns the number of cycles since the last catch.
Definition at line 150 of file WorldModel.C. References Time::getTime(), timeLastCatch, and timeLastSenseMessage. Referenced by calculateStateBall(), calculateStateBall2(), Player::deMeer5_goalie(), and isBallCatchable(). |
|
This method initializes all particles that represent the global position of the agent. All points are initialized with the position 'posInitial'. This method can be used when you are completely sure of the position of the agent (for example after a 'move' command).
Definition at line 1033 of file WorldModelUpdate.C. References iNrParticlesAgent, and particlesPosAgent. |
|
This method initializes all particles that represent the global position of the agent. This is done using the closest perceived flag. Points are generated from the area that could generate the perceived information. The global neck angle of the agent 'angGlobal' is used to determine the global position of the agent based on the perceived relative information to the closest flag.
Definition at line 988 of file WorldModelUpdate.C. References AngDeg, getClosestRelativeInSet(), getGlobalPosition(), getMinMaxDistQuantizeValue(), ServerSettings::getQuantizeStepL(), getRelativeAngle(), getRelativeDistance(), iNrParticlesAgent, VecPosition::normalizeAngle(), OBJECT_ILLEGAL, OBJECT_SET_FLAGS, ObjectT, particlesPosAgent, and SS. Referenced by calculateStateAgent(), and updateAgentAndBallAfterSense(). |
|
This method initializes all particles that represent the global position and global velocity of the ball. This is done by taking the last perceived information and generate particles within the range that can produce the perceived values. Note that each position is related to the velocity with the same index. The state of the ball is implicitly represented as a 4-tuple (pos_x, pos_y, vel_x, vel_y).
Definition at line 1319 of file WorldModelUpdate.C. References AngDeg, Ball, cosDeg(), Deg2Rad(), getAgentGlobalNeckAngle(), getAgentGlobalPosition(), getAgentGlobalVelocity(), getMinMaxDirChange(), getMinMaxDistChange(), getMinMaxDistQuantizeValue(), getRelativeAngle(), DynamicObject::getRelativeAngleChange(), getRelativeDistance(), DynamicObject::getRelativeDistanceChange(), DynamicObject::getTimeChangeInformation(), getTimeLastSeeMessage(), Object::getTimeRelativePosition(), OBJECT_BALL, VecPosition::relativeToGlobal(), VecPosition::setVecPosition(), sinDeg(), UnknownAngleValue, and UnknownDoubleValue. Referenced by calculateStateBall(). |
|
This method returns the maximum value that generates dOutput as a quantized value when 'dQuantizeStep' is used as the quantized step.
Definition at line 1687 of file WorldModelUpdate.C. Referenced by getMinMaxDirChange(), getMinMaxDistChange(), and getMinMaxDistQuantizeValue(). |
|
This method returns the minimum value that generates dOutput as a quantized value when 'dQuantizeStep' is used as the quantized step.
Definition at line 1675 of file WorldModelUpdate.C. Referenced by getMinMaxDirChange(), getMinMaxDistChange(), and getMinMaxDistQuantizeValue(). |
|
This method determines whether the ball is catchable. This only applies to a goalie. Three things are tested:
Definition at line 603 of file WorldModelHighLevel.C. References getBallPos(), ServerSettings::getCatchableAreaL(), ServerSettings::getCatchBanCycle(), getRelativeDistance(), getTimeSinceLastCatch(), isInOwnPenaltyArea(), OBJECT_BALL, and SS. Referenced by Player::deMeer5_goalie(). |
|
This method checks whether the ball is currently heading towards our own goal. For the ball to be heading to our goal a few constraints must be met:
Definition at line 619 of file WorldModelHighLevel.C. References getBallDirection(), getBallPos(), ServerSettings::getGoalWidth(), Line::getIntersection(), getPosOwnGoal(), VecPosition::getX(), VecPosition::getY(), isConfidenceGood(), Line::makeLineFromPositionAndAngle(), Line::makeLineFromTwoPoints(), OBJECT_BALL, PENALTY_X, PITCH_LENGTH, predictPosAfterNrCycles(), and SS. |
|
This method returns whether the ball is in our possesion. This is defined by the fact if the fastest player to the ball is a teammate or not.
Definition at line 651 of file WorldModelHighLevel.C. References getFastestInSetTo(), SoccerTypes::isTeammate(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_PLAYERS, and ObjectT. |
|
This method returns whether the ball lies in the own penalty area.
Definition at line 666 of file WorldModelHighLevel.C. References getBallPos(), and isInOwnPenaltyArea(). |
|
This method determines whether the ball is kicakble, i.e. the ball is in the kickable range of the agent (see ServerSettings). This value can be different for the different heterogeneous player types.
Definition at line 589 of file WorldModelHighLevel.C. References ServerSettings::getMaximalKickDist(), getRelativeDistance(), OBJECT_BALL, and SS. Referenced by Player::deMeer5(), and Player::deMeer5_goalie(). |
|
This method checks whether the current play mode indicates that there is (or will be) a before kick off situation. This is the case when the play mode equals PM_BEFORE_KICK_OFF or either PM_GOAL_LEFT or PM_GOAL_RIGHT since after the goal the play mode will go to PM_BEFORE_KICK_OFF
Definition at line 1028 of file WorldModel.C. References playMode, PM_BEFORE_KICK_OFF, PM_GOAL_LEFT, and PM_GOAL_RIGHT. Referenced by calculateStateBall(), calculateStateBall2(), Player::deMeer5(), and Player::deMeer5_goalie(). |
|
This method determines whether a dash command (supplied as the first argument) will result in collision with another player. This is checked by determing the global position after the command and then check whether the positions of one of the other players lies with the player size. Since it cannot be known what kind of action the other player takes in this cycle, it is also difficult to predict what the global position of the player will be in the next cycle. This method therefore assumes the other players have issued a dash with maximum power in the last cycle.
Definition at line 372 of file WorldModelPredict.C. References CMD_DASH, SoccerCommand::commandType, VecPosition::getDistanceTo(), ServerSettings::getPlayerSize(), isConfidenceGood(), MAX_OPPONENTS, MAX_TEAMMATES, Opponents, predictAgentPosAfterCommand(), predictPosAfterNrCycles(), SS, and Teammates. |
|
This method determines whether the confidence for 'o' is good. The confidence of the object is compared to the player_conf_thr defined in PlayerSettings. When the confidence is higher than this value and the object does not equal the agent object type true is returned, otherwise false.
Definition at line 712 of file WorldModelHighLevel.C. References getAgentObjectType(), getConfidence(), PlayerSettings::getPlayerConfThr(), ObjectT, and PS. Referenced by getOffsideX(), getOppGoalieType(), getOwnGoalieType(), isBallHeadingToGoal(), isCollisionAfterDash(), mapUnknownPlayers(), Player::sayWorldStatus(), show(), showObjects(), and updateRelativeFromGlobal(). |
|
This method determines whether the confidence for 'o' is very good. The confidence of the object is compared to the player_high_conf_thr defined in PlayerSettings. When the confidence is higher than this value and the object does not equal the agent object type true is returned, otherwise false.
Definition at line 724 of file WorldModelHighLevel.C. References getAgentObjectType(), getConfidence(), PlayerSettings::getPlayerHighConfThr(), ObjectT, and PS. |
|
This method checks whether the current play mode indicates that the other team has a corner kick.
Definition at line 1067 of file WorldModel.C. References playMode, PM_CORNER_KICK_LEFT, PM_CORNER_KICK_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by Player::deMeer5_goalie(), and isDeadBallThem(). |
|
This method checks whether the current play mode indicates that we have a corner kick.
Definition at line 1058 of file WorldModel.C. References playMode, PM_CORNER_KICK_LEFT, PM_CORNER_KICK_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by isDeadBallUs(). |
|
This method checks whether the current play mode indicates that there is a dead ball situation and their team is allowed to perform the action. That is their team has either a free kick, kick in, corner kick or a kick in.
Definition at line 1049 of file WorldModel.C. References isCornerKickThem(), isFreeKickThem(), isKickInThem(), and isKickOffThem(). Referenced by Player::deMeer5(). |
|
This method checks whether the current play mode indicates that there is a dead ball situation and our team is allowed to perform the action. That is our team has either a free kick, kick in, corner kick or a kick in.
Definition at line 1038 of file WorldModel.C. References isCornerKickUs(), isFreeKickUs(), isKickInUs(), and isKickOffUs(). |
|
This method checks whether the current play mode indicates that the other team has a free kick.
Definition at line 1017 of file WorldModel.C. References playMode, PM_FREE_KICK_LEFT, PM_FREE_KICK_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by Player::deMeer5_goalie(), and isDeadBallThem(). |
|
This method checks whether the current play mode indicates that we have a free kick.
Definition at line 1008 of file WorldModel.C. References playMode, PM_FREE_KICK_LEFT, PM_FREE_KICK_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by Player::deMeer5_goalie(), and isDeadBallUs(). |
|
This method checks whether the current play mode indicates that the other team has a kick off.
Definition at line 1139 of file WorldModel.C. References playMode, PM_GOAL_KICK_LEFT, PM_GOAL_KICK_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by Player::getStrategicPosition(). |
|
This method checks whether the current play mode indicates that we have a goal kick.
Definition at line 1130 of file WorldModel.C. References playMode, PM_GOAL_KICK_LEFT, PM_GOAL_KICK_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by Player::deMeer5_goalie(). |
|
This method returns whether the specified position lies in the own penalty area.
Definition at line 675 of file WorldModelHighLevel.C. References SoccerTypes::getGlobalPositionFlag(), getSide(), VecPosition::getX(), VecPosition::getY(), OBJECT_FLAG_P_L_C, OBJECT_FLAG_P_R_C, ObjectT, PENALTY_AREA_WIDTH, and SIDE_LEFT. Referenced by BasicPlayer::defendGoalLine(), Player::deMeer5_goalie(), isBallCatchable(), and isBallInOwnPenaltyArea(). |
|
This method returns whether the specified position lies in the opponent penalty area.
Definition at line 692 of file WorldModelHighLevel.C. References SoccerTypes::getGlobalPositionFlag(), getSide(), VecPosition::getX(), VecPosition::getY(), OBJECT_FLAG_P_L_C, OBJECT_FLAG_P_R_C, ObjectT, PENALTY_AREA_WIDTH, and SIDE_LEFT. |
|
This method checks whether the current play mode indicates that the other team has a kick in.
Definition at line 1103 of file WorldModel.C. References playMode, PM_KICK_IN_LEFT, PM_KICK_IN_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by isDeadBallThem(). |
|
This method checks whether the current play mode indicates that we have a kick in.
Definition at line 1094 of file WorldModel.C. References playMode, PM_KICK_IN_LEFT, PM_KICK_IN_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by isDeadBallUs(). |
|
This method checks whether the current play mode indicates that the other team has a kick off.
Definition at line 1121 of file WorldModel.C. References playMode, PM_KICK_OFF_LEFT, PM_KICK_OFF_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by isDeadBallThem(). |
|
This method checks whether the current play mode indicates that we have a kick off.
Definition at line 1112 of file WorldModel.C. References playMode, PM_KICK_OFF_LEFT, PM_KICK_OFF_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by isDeadBallUs(). |
|
This method returns wheter the specified object type is a known player. A known player is a player of which we know for certain that the player number is correct. If a player is seen without a number and it cannot be mapped to a player, it is put on the first empty position in the player list and the status of known player is set to false.
Definition at line 818 of file WorldModel.C. References PlayerObject::getIsKnownPlayer(), getObjectPtrFromType(), and ObjectT. Referenced by logObjectInformation(), Player::sayWorldStatus(), and setIsKnownPlayer(). |
|
This method returns whether the last received message was a see or not.
Definition at line 208 of file WorldModel.C. References getTimeLastSeeMessage(), and getTimeLastSenseMessage(). Referenced by updateAll(). |
|
This method checks whether the current play mode indicates that the other team stood offside.
Definition at line 1085 of file WorldModel.C. References playMode, PM_OFFSIDE_LEFT, PM_OFFSIDE_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. |
|
This method checks whether the current play mode indicates that we stood offside.
Definition at line 1076 of file WorldModel.C. References playMode, PM_OFFSIDE_LEFT, PM_OFFSIDE_RIGHT, SIDE_LEFT, SIDE_RIGHT, and sideSide. Referenced by Player::getStrategicPosition(). |
|
This method checks whether the specified object stands onside. This is done by comparing the x coordinate of the object to the offside line.
Definition at line 733 of file WorldModelHighLevel.C. References getGlobalPosition(), getOffsideX(), VecPosition::getX(), and ObjectT. |
|
This method determines whether there stands an opponent in the global direction of the specified angle and in distance 'dDist'. An opponent is considered to stand in the global direction when the angle difference with the specified angle is smaller than 60 degrees.
Definition at line 745 of file WorldModelHighLevel.C. References AngDeg, getAgentGlobalPosition(), VecPosition::getDistanceTo(), getGlobalPosition(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, OBJECT_SET_OPPONENTS, and ObjectT. |
|
This method checks whether a queued action is performed. The commands in QueuedCommands are the commands that are sent to the server by the ActHandler. The performedCommands array contains the commands that are performed in the last cycle (using the count information in the sense_body message). Using these two array it is possible to check whether a command is actually performed by the server. When there is an action that is sent to the server and not performed, this method returns false, true otherwise.
Definition at line 992 of file WorldModel.C. References getTimeLastSenseMessage(), MAX_COMMANDS, performedCommands, queuedCommands, and SoccerCommand::time. Referenced by ActHandler::sendCommands(). |
|
This method returns whether the time of the server stands still. This occurs during non play-on modes (kick_in, kick_off, etc.).
Definition at line 201 of file WorldModel.C. References getCurrentTime(), and Time::isStopped(). Referenced by updateAll(). |
|
This method returns a truth value that represents whether the object supplied as the first argument was seen in the last see message. If "touch" information was received, i.e. the object was very close to the agent but not in its view cone, false is also returned.
Definition at line 574 of file WorldModelHighLevel.C. References getObjectPtrFromType(), getTimeLastSeeMessage(), Object::getTimeLastSeen(), and ObjectT. |
|
This method finsished the iteration. It should be called after iterateObjectNext has returned OBJECT_ILLEGAL indicating no more objects are available that satisfy the constraints.
Definition at line 494 of file WorldModel.C. Referenced by calculateAngleAgentWithPos(), calculateStateAgent2(), getClosestInSetTo(), getClosestRelativeInSet(), getDirectionOfWidestAngle(), getFastestInSetTo(), getFurthestInSetTo(), getFurthestRelativeInSet(), getNrInSetInCircle(), getNrInSetInCone(), getNrInSetInRectangle(), getSecondClosestInSetTo(), getSecondClosestRelativeInSet(), isOpponentAtAngle(), updateAfterSeeMessage(), updateAfterSenseMessage(), and updateRelativeFromGlobal(). |
|
This method gets the next object in the iteration over an object set g. iterateObjectStart should have been called first. Only ObjectT with a confidence higher than dConf will be returned. When no more objects are available OBJECT_ILLEGAL is returned.
Definition at line 463 of file WorldModel.C. References getConfidence(), getTimeLastSeeMessage(), getTimeLastSeen(), SoccerTypes::isInSet(), OBJECT_ILLEGAL, OBJECT_MAX_OBJECTS, ObjectSetT, and ObjectT. Referenced by calculateAngleAgentWithPos(), calculateStateAgent2(), checkParticlesAgent(), getClosestInSetTo(), getClosestRelativeInSet(), getDirectionOfWidestAngle(), getFastestInSetTo(), getFirstEmptySpotInSet(), getFurthestInSetTo(), getFurthestRelativeInSet(), getNrInSetInCircle(), getNrInSetInCone(), getNrInSetInRectangle(), getSecondClosestInSetTo(), getSecondClosestRelativeInSet(), isOpponentAtAngle(), iterateObjectStart(), logObjectInformation(), updateAfterSeeMessage(), updateAfterSenseMessage(), and updateRelativeFromGlobal(). |
|
This method starts an iteration over an object set g. This method will return the first ObjectT in an ObjectSetT that has a confidence higher than dConf. After this call use the method iterateObjectNext with the same argument to get the other objects that belong to this set.
Definition at line 449 of file WorldModel.C. References iterateObjectNext(), ObjectSetT, and ObjectT. Referenced by calculateAngleAgentWithPos(), calculateStateAgent2(), checkParticlesAgent(), getClosestInSetTo(), getClosestRelativeInSet(), getDirectionOfWidestAngle(), getFastestInSetTo(), getFirstEmptySpotInSet(), getFurthestInSetTo(), getFurthestRelativeInSet(), getNrInSetInCircle(), getNrInSetInCone(), getNrInSetInRectangle(), getSecondClosestInSetTo(), getSecondClosestRelativeInSet(), isOpponentAtAngle(), logObjectInformation(), updateAfterSeeMessage(), updateAfterSenseMessage(), and updateRelativeFromGlobal(). |
|
This method logs all object information that is currently stored in the World Model. The output is formatted as follows. First the current time (cycle_nr,cycle_stopped) is printed, followed by the object information of the specified object 'obj'. The global x and global y position are first printed, followed by the global x and global y velocity. Finally the body and the neck angle are printed. Then the information of the ball "pos_x pos_y vel_x vel_y conf" is printed, followed by the information of all eleven teammates "nr pos_x pos_y vel_x vel_y conf" and the same information about the eleven opponents. Values that are currently not known are replaced by the value -10.0000. This method is normally used by a player to log every cycle all its information contained in the world model to a file. If the coach (with perfect information) does the same, these two files can be analyzed to calculate the error for the different values.
Definition at line 1279 of file WorldModel.C. References getConfidence(), getCurrentCycle(), getCurrentTime(), getGlobalBodyAngle(), getGlobalNeckAngle(), getGlobalPosition(), getGlobalVelocity(), SoccerTypes::getIndex(), PlayerSettings::getPlayerConfThr(), getRelativeDistance(), getTimeFromConfidence(), getTimeGlobalVelocity(), VecPosition::getX(), VecPosition::getY(), isKnownPlayer(), SoccerTypes::isTeammate(), iterateObjectNext(), iterateObjectStart(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_PLAYERS, ObjectT, and PS. Referenced by updateAll(). |
|
This method maps the information in the array of unknown players (players of which we do not know the number and/or team) to the player information located in the WorldModel. This is done by comparing the predicted position of players we haven't seen this cycle and the information of players of which we do not have the number and/or teamname.If this difference in the distance is smaller than tolerated (see PlayerSettings::getPlayerDistTolerance()), this player information is updated with the specified information.
Definition at line 1702 of file WorldModelUpdate.C. References VecPosition::getDistanceTo(), getFirstEmptySpotInSet(), SoccerTypes::getIndex(), VecPosition::getMagnitude(), PlayerSettings::getPlayerDistTolerance(), getRelativeAngle(), Object::getRelativeDistance(), getRelativeDistance(), getRelativePosition(), Object::getTimeLastSeen(), Object::getType(), ServerSettings::getVisibleDistance(), iNrUnknownPlayers, isConfidenceGood(), SoccerTypes::isKnownPlayer(), SoccerTypes::isOpponent(), SoccerTypes::isTeammate(), MAX_OPPONENTS, MAX_TEAMMATES, OBJECT_ILLEGAL, OBJECT_OPPONENT_UNKNOWN, OBJECT_PLAYER_UNKNOWN, OBJECT_SET_OPPONENTS, OBJECT_SET_TEAMMATES, OBJECT_TEAMMATE_UNKNOWN, ObjectT, Opponents, PS, Object::setType(), VecPosition::setVecPosition(), SS, Teammates, and UnknownPlayers. Referenced by SenseHandler::analyzeSeeMessage(). |
|
This method predicts the position of the agent after 'iCycles' when every cycle is dashed with 'iDashPower'. The method 'predictGlobalPosAfterNrCycles' is used to calculate this position.
Definition at line 243 of file WorldModelPredict.C. References getAgentObjectType(), and predictPosAfterNrCycles(). Referenced by BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), BasicPlayer::kickBallCloseToBody(), BasicPlayer::moveToPos(), BasicPlayer::turnBackToPoint(), and BasicPlayer::turnBodyToPoint(). |
|
This method returns the global position of the agent after the specified command is performed. This method makes use of the method 'predictAgentInfoAfterCommand'
Definition at line 125 of file WorldModelPredict.C. References AngDeg, and predictAgentStateAfterCommand(). Referenced by isCollisionAfterDash(). |
|
This method predicts the state of the agent after it performs a specific SoccerCommand. This method makes use of the method predictInfoAfterCommand. All arguments are initialized with the current values of the agent.
Definition at line 106 of file WorldModelPredict.C. References AngDeg, getAgentGlobalBodyAngle(), getAgentGlobalNeckAngle(), getAgentGlobalPosition(), getAgentGlobalVelocity(), getAgentStamina(), and predictStateAfterCommand(). Referenced by BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), predictAgentPosAfterCommand(), and BasicPlayer::turnNeckToPoint(). |
|
This method returns the number of cycles it will take the object 'objFrom' to reach the object 'objTo' (usually respectively the player and the ball).
Definition at line 291 of file WorldModelPredict.C. References VecPosition::getDistanceTo(), getGlobalPosition(), PlayerSettings::getPlayerWhenToTurnAngle(), OBJECT_ILLEGAL, ObjectT, predictNrCyclesToPoint(), predictPosAfterNrCycles(), and PS. |
|
This method gives an estimate for the number of cycles it will a player to reach a specific position. A position is reached when the player is located in the maximal kick distance of this position. When this is not the case a dash (or turn) is performed until the player is in the kickable distance.
Definition at line 256 of file WorldModelPredict.C. References AngDeg, getAgentGlobalBodyAngle(), getAgentObjectType(), getCurrentTime(), VecPosition::getDistanceTo(), getGlobalBodyAngle(), getGlobalPosition(), ServerSettings::getMaximalKickDist(), ServerSettings::getPlayerSpeedMax(), getTimeGlobalAngles(), ObjectT, and SS. Referenced by Player::executeStringCommand(), BasicPlayer::getEndSpeedForPass(), and predictNrCyclesToObject(). |
|
This method determines the global position of the object o after iCycles When the object is the ball, only the decay of the ball is taken into account. When the object is a player it is assumed that the player dashes with 'iDashPower' every cycle.
Definition at line 200 of file WorldModelPredict.C. References getAgentGlobalBodyAngle(), getAgentObjectType(), getAgentStamina(), ServerSettings::getBallDecay(), getCurrentTime(), VecPosition::getDirection(), getGlobalBodyAngle(), getGlobalPosition(), getGlobalVelocity(), VecPosition::getMagnitude(), Geometry::getSumGeomSeries(), getTimeGlobalAngles(), SoccerTypes::isKnownPlayer(), OBJECT_BALL, ObjectT, predictStateAfterDash(), and SS. Referenced by getFastestInSetTo(), BasicPlayer::getInterceptionPointBall(), BasicPlayer::getMarkingPosition(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), isBallHeadingToGoal(), isCollisionAfterDash(), predictAgentPos(), predictNrCyclesToObject(), BasicPlayer::turnBodyToObject(), and BasicPlayer::turnNeckToObject(). |
|
This method updates all the stamina variables using the calculations from the soccer manual. It is not really important since stamina is read from sense_body every cycle. That information is more up to date.
Definition at line 323 of file WorldModelPredict.C. References Stamina::getEffort(), ServerSettings::getEffortDec(), ServerSettings::getEffortDecThr(), ServerSettings::getEffortInc(), ServerSettings::getEffortIncThr(), ServerSettings::getEffortMin(), ServerSettings::getRecoverDec(), ServerSettings::getRecoverDecThr(), ServerSettings::getRecoverMin(), Stamina::getRecovery(), Stamina::getStamina(), ServerSettings::getStaminaIncMax(), ServerSettings::getStaminaMax(), Stamina::setEffort(), Stamina::setRecovery(), Stamina::setStamina(), and SS. Referenced by predictStateAfterDash(). |
|
This method predicts the state of an player after it performs a specific SoccerCommand. The current state of the agent is passed by giving the position, velocity and body and neck direction. These arguments are updated and after return of this method will contain the new values as if the command was performed.
Definition at line 62 of file WorldModelPredict.C. References AngDeg, CMD_CATCH, CMD_DASH, CMD_ILLEGAL, CMD_KICK, CMD_MOVE, CMD_TURN, CMD_TURNNECK, SoccerCommand::commandType, SoccerCommand::dAngle, SoccerCommand::dPower, SoccerCommand::dX, SoccerCommand::dY, VecPosition::normalizeAngle(), playMode, PM_BEFORE_KICK_OFF, predictStateAfterDash(), predictStateAfterTurn(), VecPosition::setMagnitude(), and VecPosition::setVecPosition(). Referenced by BasicPlayer::interceptClose(), predictAgentStateAfterCommand(), and updateAgentAndBallAfterSense(). |
|
This method determines the state of a player after a dash command is performed. The current state of the player is specified by the passed arguments. After this method returns, all arguments are updated.
Definition at line 142 of file WorldModelPredict.C. References ServerSettings::getDashPowerRate(), Stamina::getEffort(), VecPosition::getMagnitude(), ServerSettings::getPlayerDecay(), ServerSettings::getPlayerSpeedMax(), VecPosition::getVecPositionFromPolar(), VecPosition::normalizeAngle(), predictStaminaAfterDash(), VecPosition::setMagnitude(), and SS. Referenced by BasicPlayer::getInterceptionPointBall(), BasicPlayer::interceptClose(), BasicPlayer::interceptCloseGoalie(), predictPosAfterNrCycles(), predictStateAfterCommand(), predictStateAfterTurn(), and updateAgentAndBallAfterSense(). |
|
This method determines the state of a player after a turn command is performed. The global position is updated with the velocity and the velocity is updated. Then the actual turn angle is calculated taken the inertia into account. This actual turn angle is used to update both the global body and global neck direction.
Definition at line 178 of file WorldModelPredict.C. References AngDeg, getActualTurnAngle(), VecPosition::getMagnitude(), VecPosition::normalizeAngle(), and predictStateAfterDash(). Referenced by BasicPlayer::getInterceptionPointBall(), and predictStateAfterCommand(). |
|
This method sets the catch cycle time for the goalie. This is the cycle time that the ball is catched by the goalie. This information is said by the referee by indicating the side that catched the ball. This method checks whether our side catched the ball. If this is the case, the time is set and the goalie cannot catch the ball for a certain cycles (see ServerSettings).
Definition at line 369 of file WorldModelUpdate.C. References Ball, getCurrentTime(), REFC_GOALIE_CATCH_BALL_LEFT, REFC_GOALIE_CATCH_BALL_RIGHT, RefereeMessageT, DynamicObject::setGlobalVelocity(), SIDE_LEFT, SIDE_RIGHT, sideSide, and timeLastCatch. Referenced by SenseHandler::analyzeHearMessage(). |
|
This method is called when new visual information about the agent is received. It updates the information of the AgentObject stored in the WorldModel.
Definition at line 102 of file WorldModelUpdate.C. References agentObject, AngDeg, AgentObject::getStamina(), AgentObject::setBodyAngleRelToNeck(), Stamina::setEffort(), AgentObject::setSpeedRelToNeck(), AgentObject::setStamina(), Stamina::setStamina(), AgentObject::setViewAngle(), AgentObject::setViewQuality(), ViewAngleT, and ViewQualityT. Referenced by SenseHandler::analyzeSenseMessage(). |
|
This methods fills the heterogeneous player array (stored as 'pt') with the specified information. This information is directly parsed from the player_type message received from the server. This method is therefore only called from the SenseHandler. The information in this array can later be used (by the coach) to determine the best heterogeneous player for a specific position on the field and to update the parameters in the ServerSettings when the player type of the agent is changed.
Definition at line 341 of file WorldModelUpdate.C. References HeteroPlayerSettings::dDashPowerRate, HeteroPlayerSettings::dEffortMax, HeteroPlayerSettings::dEffortMin, HeteroPlayerSettings::dExtraStamina, HeteroPlayerSettings::dInertiaMoment, HeteroPlayerSettings::dKickableMargin, HeteroPlayerSettings::dKickRand, HeteroPlayerSettings::dPlayerDecay, HeteroPlayerSettings::dPlayerSize, HeteroPlayerSettings::dPlayerSpeedMax, HeteroPlayerSettings::dStaminaIncMax, and pt. Referenced by SenseHandler::analyzePlayerTypeMessage(). |
|
This method is called when new visual information about other objects on the field is received. It updates the information of the Object that corresponds to the ObjectT that is supplied as the first argument. If some of the arguments are not received with the visual information, they are passed with the value 'UnknownDoubleValue'. Note that the objects are only updated with the (relative) information passed as arguments. To make sure all global information in the objects is synchronized with the relative information, the method updateAll() has to be called after all (relative) object information is updated.
Definition at line 138 of file WorldModelUpdate.C. References AngDeg, Flags, SoccerTypes::getIndex(), getObjectPtrFromType(), iNrUnknownPlayers, SoccerTypes::isBall(), SoccerTypes::isFlag(), SoccerTypes::isKnownPlayer(), SoccerTypes::isLine(), SoccerTypes::isPlayer(), Lines, OBJECT_ILLEGAL, ObjectT, DynamicObject::setRelativeAngleChange(), DynamicObject::setRelativeDistanceChange(), Object::setRelativePosition(), Object::setTimeLastSeen(), Object::setType(), UnknownAngleValue, UnknownDoubleValue, and UnknownPlayers. Referenced by SenseHandler::analyzeSeeMessage(). |
|
This method is called when new information about an object is heard. But only when the player who said the message was completely sure about the object type (it would not give information about a player it does not know the player number of, then it would call processUnsureHearInfo). It updates the information of the specified object only when the confidence is higher than the information already available in the WorldModel.
Definition at line 232 of file WorldModelUpdate.C. References getAgentObjectType(), Object::getConfidence(), getCurrentTime(), PlayerObject::getIsKnownPlayer(), getObjectPtrFromType(), getTimeFromConfidence(), SoccerTypes::isBall(), SoccerTypes::isKnownPlayer(), ObjectT, processUnsureHearInfo(), Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), PlayerObject::setIsGoalie(), PlayerObject::setIsKnownPlayer(), Object::setTimeLastSeen(), and updateObjectRelativeFromGlobal(). Referenced by SenseHandler::analyzePlayerMessage(), and processUnsureHearInfo(). |
|
This method is called when new information about the ball is heard. It updates the information of the ball only when the confidence is higher than the information already available in the WorldModel.
Definition at line 207 of file WorldModelUpdate.C. References Ball, Object::getConfidence(), getCurrentTime(), getTimeFromConfidence(), OBJECT_BALL, Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), and updateObjectRelativeFromGlobal(). Referenced by SenseHandler::analyzePlayerMessage(). |
|
This method sets the performed commands by the agent object. Using this information, the future world states can be calculated when an update is performed. In this method a timestamp of the current time cycle is added to the commands structure for later usage. This method is called by the ActHandler when it has sent these commands to the server.
Definition at line 386 of file WorldModelUpdate.C. References SoccerCommand::commandType, getCurrentTime(), MAX_COMMANDS, queuedCommands, and SoccerCommand::time. Referenced by ActHandler::sendCommands(). |
|
This method is called when new visual information about objects on the field is received from the see_global message (only the coach receives these messages). This method updates the information of the Object that corresponds to the ObjectT that is supplied as the first argument.
Definition at line 63 of file WorldModelUpdate.C. References AngDeg, getObjectPtrFromType(), SoccerTypes::isBall(), SoccerTypes::isPlayer(), VecPosition::normalizeAngle(), OBJECT_ILLEGAL, ObjectT, PlayerObject::setGlobalBodyAngle(), PlayerObject::setGlobalNeckAngle(), Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), PlayerObject::setIsKnownPlayer(), and Object::setTimeLastSeen(). Referenced by SenseHandler::analyzeHearMessage(), and SenseHandler::analyzeSeeGlobalMessage(). |
|
This method is called when new information about an object is heard. But only when the player who said the message was not sure about the object type. It is tried to map the given information to an object already in the WorldModel. If we cannot find such a player, we add the player info at the position of the first player who we don't have information about. The information of the specified object is only updated when the confidence is higher than the information already available in the WorldModel.
Definition at line 276 of file WorldModelUpdate.C. References getAgentGlobalPosition(), getAgentObjectType(), getClosestInSetTo(), VecPosition::getDistanceTo(), getFirstEmptySpotInSet(), PlayerSettings::getPlayerDistTolerance(), SoccerTypes::isKnownPlayer(), SoccerTypes::isOpponent(), SoccerTypes::isTeammate(), OBJECT_ILLEGAL, OBJECT_OPPONENT_UNKNOWN, OBJECT_SET_OPPONENTS, OBJECT_SET_TEAMMATES, OBJECT_TEAMMATE_UNKNOWN, ObjectT, processPerfectHearInfo(), PS, and setIsKnownPlayer(). Referenced by processPerfectHearInfo(). |
|
This method removes ghosts from the WorldModel. Ghosts are objects that should have been seen in the last see message but aren't. Currently only the ball is removed from the WorldMOdel. Definition at line 1850 of file WorldModelUpdate.C. References agentObject, AngDeg, Ball, SoccerTypes::getHalfViewAngleValue(), getRelativeAngle(), getTimeLastSeeMessage(), getTimeLastSeen(), AgentObject::getViewAngle(), OBJECT_BALL, and Object::setTimeLastSeen(). Referenced by updateAfterSeeMessage(). |
|
This method resamples the particles that represent the global position of the agent. 'iLength' denotes the number of particles contained in 'posArray' and 'iLeft' the points that do do not have to be resampled. A particle is resampled by taking a random particle from the first part of the array.
Definition at line 1142 of file WorldModelUpdate.C. References iNrParticlesAgent, and particlesPosAgent. Referenced by calculateStateAgent(). |
|
This method resamples all particles that represent the global position and global velocity of the ball. This is by copying existing legal particles at random. Since noise will be added to each particle, they will blur each time the particles are updated. The first 'iLeft' particles are legal particles and copied to the position at the end of the array.
Definition at line 1516 of file WorldModelUpdate.C. Referenced by calculateStateBall(). |
|
This methods resets all the object information stored in the worldmodel. This means that the last see time of these objects are set to UnknownTime.
Definition at line 1832 of file WorldModelUpdate.C. References agentObject, Ball, Flags, Lines, MAX_FLAGS, MAX_LINES, MAX_OPPONENTS, MAX_TEAMMATES, Opponents, Object::setTimeLastSeen(), and Teammates. |
|
This method sets the ObjectType of the agent. This is an objectT between OBJECT_TEAMMATE_1 and OBJECT_TEAMMATE_11
Definition at line 511 of file WorldModel.C. References agentObject, ObjectT, and Object::setType(). Referenced by SenseHandler::analyzeInitMessage(). |
|
This method sets the status of the ball. The status of the ball corresponds to the server time returned by getTimeCheckBall. This method is only useful for the coach, since only he can sent a check_ball message.
Definition at line 435 of file WorldModel.C. References BallStatusT, and bsCheckBall. Referenced by SenseHandler::analyzeCheckBall(). |
|
This method sets the value of the specified object to a known player or not. A known player is a player of which the exact team name and player number are known. If the player number is not known, information about the object is stored at an empty position in the player array and the value of isKnownPlayer is set to 'false'.
Definition at line 920 of file WorldModel.C. References getObjectPtrFromType(), isKnownPlayer(), ObjectT, and PlayerObject::setIsKnownPlayer(). Referenced by processUnsureHearInfo(). |
|
This method sets the number of commands c that were performed by the agent. This is supplied in the sense_body message and can be used to check whether an action is actually performed by the soccer server, since the corresponding counter should be one higher than the previous sense_body message. When this is the case the corresponding index of the PerformedCommands array is set to true.
Definition at line 394 of file WorldModel.C. References CommandT, iCommandCounters, and performedCommands. Referenced by SenseHandler::analyzeSenseMessage(). |
|
This method sets the player number of the agent. This value is available in the conformation message sent by the soccerserver after the initialization.
Definition at line 291 of file WorldModel.C. References iPlayerNumber. Referenced by SenseHandler::analyzeInitMessage(). |
|
This method sets the play mode of the agent in this worldmodel
Definition at line 342 of file WorldModel.C. References getSide(), getTimeLastSenseMessage(), playMode, PlayModeT, PM_GOAL_KICK_LEFT, PM_GOAL_KICK_RIGHT, setTimeLastCatch(), SIDE_LEFT, and SIDE_RIGHT. Referenced by SenseHandler::analyzeHearMessage(), SenseHandler::analyzeInitMessage(), and WorldModel(). |
|
This method sets the side of the agent
Definition at line 308 of file WorldModel.C. References sideSide, and SideT. Referenced by SenseHandler::analyzeInitMessage(), and WorldModel(). |
|
This method sets the teamname of the agent. The maximum team name is MAX_TEAM_NAME_LENGTH as defined in Soccertypes.h.
Definition at line 325 of file WorldModel.C. References strTeamName. Referenced by Player::Player(). |
|
This method sets the time the ball was checked for the last time (coach only).
Definition at line 416 of file WorldModel.C. References timeCheckBall. Referenced by SenseHandler::analyzeCheckBall(). |
|
This method sets the time of the last catch cycle. This information is received by the SenseHandler when the referee has sent this message. After a catch, the goalie is not allowed to catch the ball for catch_ban_cycles (defined in ServerSettings).
Definition at line 143 of file WorldModel.C. References timeLastCatch. Referenced by setPlayMode(). |
|
This method sets the time of the last received referee message. This information is received by the SenseHandler.
Definition at line 160 of file WorldModel.C. References timeLastRefMessage. Referenced by SenseHandler::analyzeHearMessage(). |
|
This method sets the time of the last see_global message. It also sends a condition signal to indicate that variable bNewInfo has changed. When main thread is stopped in waitForNewInformation, it is unblocked.
Definition at line 227 of file WorldModel.C. References setTimeLastSeeMessage(). Referenced by SenseHandler::analyzeSeeGlobalMessage(). |
|
This method sets the time of the last see message. It also sends a condition signal to indicate that variable bNewInfo has changed. When main thread is stopped in waitForNewInformation, it is unblocked.
Definition at line 244 of file WorldModel.C. References bNewInfo, cond_newInfo, mutex_newInfo, and timeLastSeeMessage. Referenced by SenseHandler::analyzeSeeMessage(), and setTimeLastSeeGlobalMessage(). |
|
This method sets the time of the last sense message. It also send a condition signal to indicate that variable bNewInfo has changed. When main thread is stopped in waitForNewInformation, it is unblocked.
Definition at line 268 of file WorldModel.C. References bNewInfo, cond_newInfo, mutex_newInfo, and timeLastSenseMessage. Referenced by SenseHandler::analyzeSenseMessage(). |
|
This method prints the information about the Object o to the output stream os.
Definition at line 1222 of file WorldModel.C. References getObjectPtrFromType(), ObjectT, and Object::show(). |
|
This method prints all the objects and information of the agent to the specified outputstream. Only the information of the objects that are seen recently are printed.
Definition at line 1150 of file WorldModel.C. References agentObject, Ball, CMD_DASH, CMD_KICK, CMD_SAY, CMD_TURN, CMD_TURNNECK, DEFAULT_OPPONENT_NAME, getCurrentTime(), getNrOfCommands(), SoccerTypes::getPlayModeStr(), getSide(), SoccerTypes::getSideStr(), getTeamName(), Time::getTime(), Object::getTimeLastSeen(), isConfidenceGood(), MAX_OPPONENTS, MAX_TEAMMATES, Opponents, playMode, AgentObject::show(), PlayerObject::show(), BallObject::show(), and Teammates. Referenced by Player::executeStringCommand(). |
|
This method prints all the objects and information of the agent to the specified outputstream. Only the information of the objects that are seen recently are printed.
Definition at line 1185 of file WorldModel.C. References Ball, getConfidence(), getCurrentTime(), Object::getGlobalPosition(), Time::getTime(), Object::getTimeLastSeen(), isConfidenceGood(), MAX_OPPONENTS, MAX_TEAMMATES, Opponents, and Teammates. |
|
This method prints the queued commands - commands that are sent by the ActHandler to the server - to the specified output stream.
Definition at line 1210 of file WorldModel.C. References CMD_ILLEGAL, SoccerCommand::commandType, MAX_COMMANDS, queuedCommands, and SoccerCommand::show(). Referenced by Player::executeStringCommand(). |
|
This method subtracts one from the goal difference. Call this method when you're team has conceided a goal
Definition at line 371 of file WorldModel.C. References iGoalDiff. Referenced by SenseHandler::analyzeHearMessage(). |
|
This method is called to update the WorldModel after a see message. The update methods for the agent, all teammates, all opponents and the ball are called. But only when the last see message of these objects equals the time of the last received see message.
Definition at line 511 of file WorldModelUpdate.C. References getAgentObjectType(), getCurrentTime(), PlayerSettings::getPlayerConfThr(), Time::getTime(), getTimeLastSeeMessage(), getTimeLastSeen(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_PLAYERS, ObjectT, PS, removeGhosts(), updateAgentObjectAfterSee(), updateDynamicObjectAfterSee(), and updateObjectRelativeFromGlobal(). Referenced by updateAll(). |
|
This method is called to update the WorldModel after a sense message. The current information for the agent, all teammates, all opponents and the ball are calculated using the associated methods. This is done by updating the objects till the time of the information matches the current time of the sense message. After all global positions are determined, the relative information is updated using the new global information using the method determineRelativeFromGlobal().
Definition at line 629 of file WorldModelUpdate.C. References getAgentObjectType(), getCurrentTime(), PlayerSettings::getPlayerConfThr(), getTimeGlobalPosition(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_ILLEGAL, OBJECT_SET_PLAYERS, ObjectT, PS, updateAgentAndBallAfterSense(), updateBallForCollision(), and updateDynamicObjectForNextCycle(). Referenced by updateAll(). |
|
This method updates the agent and ball information after a sense message. This is done using the current known information and the action that is performed in the last server cycle as indicated by the attribute 'PerformedCommands'
Definition at line 659 of file WorldModelUpdate.C. References agentObject, AngDeg, CMD_DASH, CMD_KICK, CMD_MOVE, CMD_TURN, CMD_TURNNECK, SoccerCommand::commandType, getAgentGlobalBodyAngle(), getAgentGlobalNeckAngle(), getAgentGlobalPosition(), getAgentStamina(), getCurrentTime(), VecPosition::getMagnitude(), ServerSettings::getPlayerDecay(), AgentObject::getSpeedRelToNeck(), Time::getTime(), initParticlesAgent(), iNrHoles, iNrParticlesBall, MAX_COMMANDS, OBJECT_BALL, particlesPosBall, particlesVelBall, performedCommands, predictStateAfterCommand(), predictStateAfterDash(), queuedCommands, VecPosition::rotate(), AgentObject::setGlobalNeckAngle(), Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), VecPosition::setMagnitude(), VecPosition::setVecPosition(), SS, SoccerCommand::time, updateBallAfterKick(), updateDynamicObjectForNextCycle(), updateParticlesAgent(), updateParticlesBall(), and Time::updateTime(). Referenced by updateAfterSenseMessage(). |
|
This method updates an agent after a see message. The global position and the global neck angle are calculated using the visual information using the method calculateStateAgent.
Definition at line 552 of file WorldModelUpdate.C. References agentObject, AngDeg, calculateStateAgent(), Object::getGlobalPosition(), getTimeLastSeeMessage(), AgentObject::setGlobalNeckAngle(), Object::setGlobalPosition(), Object::setGlobalPositionLastSee(), DynamicObject::setGlobalVelocity(), AgentObject::setPositionDifference(), and Object::setTimeLastSeen(). Referenced by updateAfterSeeMessage(). |
|
This is called to update the WorldModel. It determines the the last message (see or sense) and updates the worlmodel accordingly. When see information is received ("perfect" information) all objects are updated with this received information. After sense message the information of the object is calculated for the new cycle using the last visual information.
Definition at line 410 of file WorldModelUpdate.C. References agentObject, getAgentGlobalPosition(), getAgentObjectType(), getCurrentTime(), PlayerSettings::getFractionWaitSeeEnd(), getNrInSetInRectangle(), getPlayerNumber(), Object::getTimeGlobalPosition(), getTimeLastSeeMessage(), getTimeLastSenseMessage(), iNrHoles, iNrOpponentsSeen, iNrTeammatesSeen, isLastMessageSee(), isTimeStopped(), logObjectInformation(), OBJECT_SET_OPPONENTS, OBJECT_SET_TEAMMATES, PS, PlayerSettings::setFractionWaitSeeEnd(), updateAfterSeeMessage(), updateAfterSenseMessage(), and updateRelativeFromGlobal(). Referenced by Player::mainLoop(), and Player::test_only_update(). |
|
This methods updates the ball after a kick command. First it is checked whether the ball is indeed in the kickable range. If this is the case the accelaration of the ball is calculated and added to the current velocity. With this information the new global position of the ball is set.
Definition at line 781 of file WorldModelUpdate.C. References AngDeg, Ball, getActualKickPowerRate(), getAgentGlobalBodyAngle(), ServerSettings::getBallDecay(), ServerSettings::getBallSpeedMax(), getCurrentTime(), getGlobalPosition(), getGlobalVelocity(), VecPosition::getMagnitude(), ServerSettings::getMaximalKickDist(), getRelativeDistance(), iNrParticlesBall, VecPosition::normalizeAngle(), OBJECT_BALL, particlesPosBall, particlesVelBall, Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), VecPosition::setMagnitude(), SS, updateDynamicObjectForNextCycle(), and updateParticlesBall(). Referenced by updateAgentAndBallAfterSense(). |
|
This method checks whether the ball overlaps with a player. If this is the case the player and the ball are moved to a position where they do not overlap any more. Both velocities are multiplied with 0.1
Definition at line 839 of file WorldModelUpdate.C. References Ball, getAgentGlobalPosition(), ServerSettings::getBallDecay(), ServerSettings::getBallSize(), getCurrentTime(), VecPosition::getDistanceTo(), getGlobalPosition(), getGlobalVelocity(), ServerSettings::getPlayerSize(), OBJECT_BALL, Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), and SS. Referenced by updateAfterSenseMessage(). |
|
This method updates a dynamic object after a see message. The global position and the velocity are calculated using the visual information. For the ball the method 'calculateStateBall' is called, for players the method 'calculateStatePlayer' is called.
Definition at line 579 of file WorldModelUpdate.C. References AngDeg, Ball, calculateStateBall(), calculateStatePlayer(), getAgentGlobalNeckAngle(), getObjectPtrFromType(), PlayerObject::getRelativeBodyAngle(), PlayerObject::getRelativeNeckAngle(), getTimeLastSeeMessage(), PlayerObject::getTimeRelativeAngles(), SoccerTypes::isKnownPlayer(), VecPosition::normalizeAngle(), OBJECT_BALL, ObjectT, PlayerObject::setGlobalBodyAngle(), PlayerObject::setGlobalNeckAngle(), Object::setGlobalPosition(), Object::setGlobalPositionLastSee(), and DynamicObject::setGlobalVelocity(). Referenced by updateAfterSeeMessage(). |
|
This methods updates a dynamic object for 'iCycles' cycle. This is done by updating the global position with the velocity vector. After this the velocity vector is decreased with the associated decay.
Definition at line 813 of file WorldModelUpdate.C. References ServerSettings::getBallDecay(), getCurrentTime(), getGlobalPosition(), getGlobalVelocity(), getObjectPtrFromType(), ServerSettings::getPlayerDecay(), OBJECT_BALL, ObjectT, Object::setGlobalPosition(), DynamicObject::setGlobalVelocity(), and SS. Referenced by updateAfterSenseMessage(), updateAgentAndBallAfterSense(), and updateBallAfterKick(). |
|
This method updates the relative information for one object using the global information of this object and the global information of the agent.
Definition at line 896 of file WorldModelUpdate.C. References getAgentGlobalNeckAngle(), getAgentGlobalPosition(), Object::getGlobalPosition(), getObjectPtrFromType(), Object::getTimeGlobalPosition(), VecPosition::globalToRelative(), ObjectT, and Object::setRelativePosition(). Referenced by processPerfectHearInfo(), processPerfectHearInfoBall(), updateAfterSeeMessage(), and updateRelativeFromGlobal(). |
|
This method updates all the particles that represent the global position of the agent.The velocity 'vel' is added to each particle to move to the next location. When the last boolean argument is true, the velocity is simple added. If this value equals true the previously added velocity is subtracted before the specified velocity 'vel' is added. This for instance occurs when a better velocity estimate (after a see message) is determined with which the particles should be updated.
Definition at line 1096 of file WorldModelUpdate.C. References VecPosition::getX(), VecPosition::getY(), iNrParticlesAgent, particlesPosAgent, VecPosition::setX(), and VecPosition::setY(). Referenced by calculateStateAgent(), and updateAgentAndBallAfterSense(). |
|
This method updates all particles that represent the global position and global velocity of the ball to the next cycle. This is done using the same formula as the soccer server.
Definition at line 1481 of file WorldModelUpdate.C. References AngDeg, EPSILON, getActualKickPowerRate(), getAgentGlobalBodyAngle(), ServerSettings::getBallDecay(), ServerSettings::getBallRand(), ServerSettings::getBallSpeedMax(), VecPosition::getMagnitude(), VecPosition::normalizeAngle(), VecPosition::setMagnitude(), and SS. Referenced by updateAgentAndBallAfterSense(), and updateBallAfterKick(). |
|
This method uses the global position of the agent and the global position of all objects to update their relative information. When the new global position of the objects is updated after a sense message, their relative information is not up to date.
Definition at line 866 of file WorldModelUpdate.C. References getAgentObjectType(), PlayerSettings::getPlayerConfThr(), isConfidenceGood(), iterateObjectDone(), iterateObjectNext(), iterateObjectStart(), OBJECT_BALL, OBJECT_ILLEGAL, OBJECT_SET_PLAYERS, ObjectT, PS, and updateObjectRelativeFromGlobal(). Referenced by updateAll(). |
|
This method updates the ServerSettings of this agent using the player type information of the heterogeneous player at index 'iIndex'. This method is usually called when the player type of the agent is changed by the coach. It updates its parameters, such that all calculations to determine the next action are based on the correct parameters.
Definition at line 1812 of file WorldModelUpdate.C. References pt, ServerSettings::setDashPowerRate(), ServerSettings::setEffortMax(), ServerSettings::setEffortMin(), ServerSettings::setExtraStamina(), ServerSettings::setInertiaMoment(), ServerSettings::setKickableMargin(), ServerSettings::setKickRand(), ServerSettings::setPlayerDecay(), ServerSettings::setPlayerSize(), ServerSettings::setPlayerSpeedMax(), ServerSettings::setStaminaIncMax(), and SS. Referenced by SenseHandler::analyzeChangePlayerTypeMessage(). |
|
This method blocks till new information has arrived. Information is either a sense_body message or a see message. If there isn't received information from the server for longer than 3 seconds, server is assumed dead and false is returned.
Definition at line 1234 of file WorldModel.C. References bNewInfo, cond_newInfo, PlayerSettings::getServerTimeOut(), mutex_newInfo, and PS. Referenced by Player::mainLoop(), and Player::test_only_update(). |
|
information of the agent itself Definition at line 110 of file WorldModel.h. Referenced by calculateStateAgent(), calculateStateAgent2(), calculateStateBall(), calculateStateBall2(), calculateStatePlayer(), getAgentBodyAngleRelToNeck(), getAgentEffort(), getAgentGlobalBodyAngle(), getAgentGlobalNeckAngle(), getAgentGlobalPosition(), getAgentGlobalVelocity(), getAgentObjectType(), getAgentSpeed(), getAgentStamina(), getAgentViewAngle(), getAgentViewQuality(), getObjectPtrFromType(), processNewAgentInfo(), removeGhosts(), resetTimeObjects(), setAgentObjectType(), show(), updateAgentAndBallAfterSense(), updateAgentObjectAfterSee(), updateAll(), and WorldModel(). |
|
information of the ball Definition at line 109 of file WorldModel.h. Referenced by calculateStateBall(), calculateStateBall2(), checkParticlesBall(), getBallDirection(), getBallSpeed(), getObjectPtrFromType(), getOffsideX(), initParticlesBall(), processCatchedBall(), processPerfectHearInfoBall(), removeGhosts(), resetTimeObjects(), show(), showObjects(), updateBallAfterKick(), updateBallForCollision(), updateDynamicObjectAfterSee(), and WorldModel(). |
|
indicates new info from server Definition at line 92 of file WorldModel.h. Referenced by setTimeLastSeeMessage(), setTimeLastSenseMessage(), waitForNewInformation(), and WorldModel(). |
|
state of the ball Definition at line 151 of file WorldModel.h. Referenced by getCheckBallStatus(), setCheckBallStatus(), and WorldModel(). |
|
cond variable for bNewInfo Definition at line 155 of file WorldModel.h. Referenced by setTimeLastSeeMessage(), setTimeLastSenseMessage(), waitForNewInformation(), and WorldModel(). |
|
all flag information Definition at line 119 of file WorldModel.h. Referenced by getObjectPtrFromType(), processNewObjectInfo(), resetTimeObjects(), and WorldModel(). |
|
counters for all performed commands Definition at line 143 of file WorldModel.h. Referenced by getNrOfCommands(), setNrOfCommands(), and WorldModel(). |
|
goal difference Definition at line 103 of file WorldModel.h. Referenced by addOneToGoalDiff(), getGoalDiff(), subtractOneFromGoalDiff(), and WorldModel(). |
|
nr of holes recorded Definition at line 160 of file WorldModel.h. Referenced by Player::mainLoop(), updateAgentAndBallAfterSense(), updateAll(), and WorldModel(). |
|
total nr of opponents seen Definition at line 161 of file WorldModel.h. Referenced by Player::mainLoop(), updateAll(), and WorldModel(). |
|
nr of particles used to store agent position Definition at line 124 of file WorldModel.h. Referenced by checkParticlesAgent(), initParticlesAgent(), resampleParticlesAgent(), and updateParticlesAgent(). |
|
nr of particles used to store ball position and velocity Definition at line 126 of file WorldModel.h. Referenced by calculateStateBall(), updateAgentAndBallAfterSense(), and updateBallAfterKick(). |
|
total nr of teammates seen Definition at line 162 of file WorldModel.h. Referenced by Player::mainLoop(), updateAll(), and WorldModel(). |
|
number of unknown players Definition at line 116 of file WorldModel.h. Referenced by mapUnknownPlayers(), processNewObjectInfo(), and WorldModel(). |
|
player number in soccerserver Definition at line 98 of file WorldModel.h. Referenced by getPlayerNumber(), and setPlayerNumber(). |
|
all line information Definition at line 120 of file WorldModel.h. Referenced by getObjectPtrFromType(), processNewObjectInfo(), resetTimeObjects(), and WorldModel(). |
|
mutex to protect bNewInfo Definition at line 154 of file WorldModel.h. Referenced by setTimeLastSeeMessage(), setTimeLastSenseMessage(), waitForNewInformation(), and WorldModel(). |
|
information of all opponents Definition at line 112 of file WorldModel.h. Referenced by getObjectPtrFromType(), getOffsideX(), getOppGoalieType(), isCollisionAfterDash(), mapUnknownPlayers(), resetTimeObjects(), show(), showObjects(), and WorldModel(). |
|
particles to store agent position Definition at line 128 of file WorldModel.h. Referenced by calculateStateAgent(), checkParticlesAgent(), initParticlesAgent(), resampleParticlesAgent(), and updateParticlesAgent(). |
|
particles to store ball position Definition at line 130 of file WorldModel.h. Referenced by calculateStateBall(), updateAgentAndBallAfterSense(), and updateBallAfterKick(). |
|
particles to store ball velocity Definition at line 132 of file WorldModel.h. Referenced by calculateStateBall(), updateAgentAndBallAfterSense(), and updateBallAfterKick(). |
|
commands performed in last cycle, index is CommandT Definition at line 140 of file WorldModel.h. Referenced by isQueuedActionPerformed(), setNrOfCommands(), updateAgentAndBallAfterSense(), and WorldModel(). |
|
current play mode in the game Definition at line 102 of file WorldModel.h. Referenced by getPlayMode(), isBeforeKickOff(), isCornerKickThem(), isCornerKickUs(), isFreeKickThem(), isFreeKickUs(), isGoalKickThem(), isGoalKickUs(), isKickInThem(), isKickInUs(), isKickOffThem(), isKickOffUs(), isOffsideThem(), isOffsideUs(), predictStateAfterCommand(), setPlayMode(), and show(). |
|
Reference to all client params Definition at line 83 of file WorldModel.h. Referenced by getClosestInSetTo(), getDirectionOfWidestAngle(), getFastestInSetTo(), getFirstEmptySpotInSet(), getFurthestInSetTo(), getNrInSetInCircle(), getNrInSetInCone(), getNrInSetInRectangle(), getSecondClosestInSetTo(), isConfidenceGood(), isConfidenceVeryGood(), logObjectInformation(), mapUnknownPlayers(), predictNrCyclesToObject(), processUnsureHearInfo(), updateAfterSeeMessage(), updateAfterSenseMessage(), updateAll(), updateRelativeFromGlobal(), waitForNewInformation(), and WorldModel(). |
|
info hetero player types Definition at line 84 of file WorldModel.h. Referenced by getInfoHeteroPlayer(), processNewHeteroPlayer(), and updateSSToHeteroPlayerType(). |
|
all performed commands, set by ActHandler Definition at line 138 of file WorldModel.h. Referenced by isQueuedActionPerformed(), processQueuedCommands(), showQueuedCommands(), updateAgentAndBallAfterSense(), and WorldModel(). |
|
side where the agent started Definition at line 99 of file WorldModel.h. Referenced by getRelAngleOpponentGoal(), getRelDistanceOpponentGoal(), getSide(), isCornerKickThem(), isCornerKickUs(), isFreeKickThem(), isFreeKickUs(), isGoalKickThem(), isGoalKickUs(), isKickInThem(), isKickInUs(), isKickOffThem(), isKickOffUs(), isOffsideThem(), isOffsideUs(), processCatchedBall(), and setSide(). |
|
Reference to all server params Definition at line 82 of file WorldModel.h. Referenced by calculateStateAgent(), calculateStateAgent2(), calculateStateBall(), calculateStateBall2(), calculateStatePlayer(), checkParticlesAgent(), getActualKickPowerRate(), getActualTurnAngle(), getAngleForTurn(), getEndSpeedFromFirstSpeed(), getFastestInSetTo(), getFirstSpeedFromDist(), getFirstSpeedFromEndSpeed(), getGlobalPosition(), getKickSpeedToTravel(), getOppGoalieType(), getOwnGoalieType(), getPosOpponentGoal(), getPosOwnGoal(), getPowerForDash(), initParticlesAgent(), isBallCatchable(), isBallHeadingToGoal(), isBallKickable(), isCollisionAfterDash(), mapUnknownPlayers(), predictNrCyclesToPoint(), predictPosAfterNrCycles(), predictStaminaAfterDash(), predictStateAfterDash(), updateAgentAndBallAfterSense(), updateBallAfterKick(), updateBallForCollision(), updateDynamicObjectForNextCycle(), updateParticlesBall(), updateSSToHeteroPlayerType(), and WorldModel(). |
|
Last hear message Definition at line 167 of file WorldModel.h. Referenced by SenseHandler::analyzeHearMessage(), and SenseHandler::analyzePlayerMessage(). |
|
Last see message Definition at line 165 of file WorldModel.h. Referenced by SenseHandler::analyzeSeeGlobalMessage(), SenseHandler::analyzeSeeMessage(), and BasicPlayer::defendGoalLine(). |
|
Last sense_body message Definition at line 166 of file WorldModel.h. Referenced by SenseHandler::analyzeSenseMessage(). |
|
Team name Definition at line 97 of file WorldModel.h. Referenced by getTeamName(), setTeamName(), and WorldModel(). |
|
information of all teammates Definition at line 111 of file WorldModel.h. Referenced by getObjectPtrFromType(), getOwnGoalieType(), isCollisionAfterDash(), mapUnknownPlayers(), resetTimeObjects(), show(), showObjects(), and WorldModel(). |
|
time bsCheckBall applies to Definition at line 150 of file WorldModel.h. Referenced by getTimeCheckBall(), and setTimeCheckBall(). |
|
time of last catch by goalie Definition at line 93 of file WorldModel.h. Referenced by getTimeSinceLastCatch(), processCatchedBall(), and setTimeLastCatch(). |
|
time of last referee message Definition at line 94 of file WorldModel.h. Referenced by getTimeLastRefereeMessage(), and setTimeLastRefereeMessage(). |
|
server time of last see msg Definition at line 90 of file WorldModel.h. Referenced by getTimeLastSeeMessage(), and setTimeLastSeeMessage(). |
|
server time of last sense msg Definition at line 91 of file WorldModel.h. Referenced by getTimeLastSenseMessage(), getTimeSinceLastCatch(), and setTimeLastSenseMessage(). |
|
info unknown players are stored here til mapped to known player Definition at line 114 of file WorldModel.h. Referenced by mapUnknownPlayers(), processNewObjectInfo(), and WorldModel(). |