Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

GT2005TeamBallLocator Class Reference

A implementation which can be used with the GT2005BallLocator, particles are send from robot to robot. More...

#include <GT2005TeamBallLocator.h>

Inheritance diagram for GT2005TeamBallLocator:

Inheritance graph
[legend]
Collaboration diagram for GT2005TeamBallLocator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2005TeamBallLocator (const TeamBallLocatorInterfaces &interfaces)
virtual void execute ()
 Executes the module.

void calcRepresentativeParticleContainer (GT2005ParticleContainer &oldContainer, GT2005ParticleContainerSend &newContainer)
void timeUpdateReceived (GT2005Particle *particle, double &difference)
void timeUpdateNotReceived (GT2005Particle *particle, int &framesNotSeen)
double getTimeFactor (double &difference)
bool handleMessage (InMessage &message)
 Called from a MessageQueue to distribute messages.

void drawParticle (const GT2005Particle &particle, Drawings::Color color) const
void draw (const GT2005ParticleContainerReceived &container, const double &ballX, const double &ballY, const double &ballP, Drawings::Color particleColor, Drawings::Color estimatedBallColor) const

Public Attributes

double timeFactorThreshold
GT2005ParticleContainerReceived receivingContainer
int framesNothingReceived [3]
Pose2D lastOdometryData

Static Public Attributes

double smallestProb = 0.05
double biggestProb = 0.10
int numberOfCells = 0

Detailed Description

A implementation which can be used with the GT2005BallLocator, particles are send from robot to robot.

Author:
Christine Zarges

Thorsten Kerkhof

Definition at line 30 of file GT2005TeamBallLocator.h.


Constructor & Destructor Documentation

GT2005TeamBallLocator::GT2005TeamBallLocator const TeamBallLocatorInterfaces interfaces  ) 
 

Definition at line 22 of file GT2005TeamBallLocator.cpp.

References framesNothingReceived, and BallState::useGivenProbabilities.


Member Function Documentation

void GT2005TeamBallLocator::execute  )  [virtual]
 

Executes the module.

Reimplemented from Module.

Definition at line 35 of file GT2005TeamBallLocator.cpp.

References calcRepresentativeParticleContainer(), GT2005ParticleContainerReceived::calculateEstimatedBallPosition(), GT2005ParticleContainerReceived::current, DEBUG_RESPONSE, DEBUG_RESPONSE_NOT, decreaseProbValue, draw(), framesNothingReceived, SystemCall::getCurrentSystemTime(), GT2005ParticleContainerSend::getNumberOfSamples(), GT2005ParticleContainerReceived::getNumberOfSamples(), getPlayer(), Player::getPlayerNumber(), GameControlData::getRobot(), maxDistTimes, MODIFY, TeamMessageCollection::numberOfTeamMessages, numOfBLParticlesSend, GT2005Particle::pose, BallState::positionProb, GT2005Particle::probability, receivingContainer, TeamMessageCollection::send(), BallState::setBallDataRelativeToField(), GT2005Particle::setParameters(), timeUpdateNotReceived(), timeUpdateReceived(), CommunicatedBallState::timeWhenLastObserved, BallState::velocityProb, GT2005Particle::vprob, GT2005Particle::vx, GT2005Particle::vy, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

void GT2005TeamBallLocator::calcRepresentativeParticleContainer GT2005ParticleContainer oldContainer,
GT2005ParticleContainerSend newContainer
 

Definition at line 240 of file GT2005TeamBallLocator.cpp.

References GT2005TeamBallLocator::CompositeCell::addParticle(), biggestProb, GT2005TeamBallLocator::CompositeCell::cellDownLeft, GT2005TeamBallLocator::CompositeCell::cellDownRight, GT2005TeamBallLocator::CompositeCell::cellTopLeft, GT2005TeamBallLocator::CompositeCell::cellTopRight, DEBUG_RESPONSE, GT2005TeamBallLocator::AbstractCell::depth, GT2005TeamBallLocator::Queue::first, GT2005ParticleContainer::getNumberOfSamples(), GT2005TeamBallLocator::CompositeCell::getParticles(), GT2005TeamBallLocator::CompositeCell::getSumOfProb(), GT2005TeamBallLocator::AbstractCell::getSumOfProb(), RobotPose::getValidity(), idText, GT2005TeamBallLocator::Queue::insertCell(), max, GT2005Particle::next, GT2005TeamBallLocator::AbstractCell::next, Vector3< V >::normalize(), numberOfCells, OUTPUT, GT2005TeamBallLocator::AbstractCell::parent, GT2005Particle::pose, RobotPoseCollection::poses, GT2005Particle::probability, Geometry::relative2FieldCoord(), smallestProb, GT2005TeamBallLocator::CompositeCell::split(), GT2005TeamBallLocator::CompositeCell::violentBrutalDestruction(), GT2005TeamBallLocator::AbstractCell::violentBrutalDestruction(), Vector2< double >::x, Vector3< V >::x, Vector2< V >::x, Vector2< double >::y, Vector3< V >::y, Vector2< V >::y, and Vector3< V >::z.

Referenced by execute().

Here is the call graph for this function:

void GT2005TeamBallLocator::timeUpdateReceived GT2005Particle particle,
double &  difference
 

Definition at line 476 of file GT2005TeamBallLocator.cpp.

References getTimeFactor(), and GT2005Particle::probability.

Referenced by execute().

Here is the call graph for this function:

void GT2005TeamBallLocator::timeUpdateNotReceived GT2005Particle particle,
int &  framesNotSeen
 

Definition at line 438 of file GT2005TeamBallLocator.cpp.

References decreaseProbValue, maxDistTimes, GT2005Particle::pose, GT2005Particle::probability, random(), Vector2< double >::x, and Vector2< double >::y.

Referenced by execute().

Here is the call graph for this function:

double GT2005TeamBallLocator::getTimeFactor double &  difference  ) 
 

Definition at line 481 of file GT2005TeamBallLocator.cpp.

Referenced by timeUpdateReceived().

bool GT2005TeamBallLocator::handleMessage InMessage message  )  [virtual]
 

Called from a MessageQueue to distribute messages.

Use message.getMessageID to decide if the message is relavant for the MesssageHandler derivate. Use message.bin, message.text or message.config as In streams to get the data from.

Parameters:
message The message that can be read.
Returns:
true if the message was read (handled).

Reimplemented from Module.

Definition at line 496 of file GT2005TeamBallLocator.cpp.

References biggestProb, InMessage::bin, GenericDebugData::data, InMessage::getMessageID(), idGT2005TeamBallLocator, and smallestProb.

Here is the call graph for this function:

void GT2005TeamBallLocator::drawParticle const GT2005Particle particle,
Drawings::Color  color
const
 

Definition at line 513 of file GT2005TeamBallLocator.cpp.

References CIRCLE, NCIRCLE, GT2005Particle::pose, GT2005Particle::probability, Vector2< double >::x, and Vector2< double >::y.

Referenced by draw().

void GT2005TeamBallLocator::draw const GT2005ParticleContainerReceived container,
const double &  ballX,
const double &  ballY,
const double &  ballP,
Drawings::Color  particleColor,
Drawings::Color  estimatedBallColor
const
 

Definition at line 527 of file GT2005TeamBallLocator.cpp.

References CIRCLE, GT2005ParticleContainerReceived::current, DEBUG_DRAWING_FINISHED, drawParticle(), GT2005ParticleContainerReceived::getNumberOfSamples(), LINE, NCIRCLE, NCOLORED_LINE, NDECLARE_DEBUGDRAWING, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by execute().

Here is the call graph for this function:


Member Data Documentation

double GT2005TeamBallLocator::smallestProb = 0.05 [static]
 

Definition at line 16 of file GT2005TeamBallLocator.cpp.

Referenced by calcRepresentativeParticleContainer(), and handleMessage().

double GT2005TeamBallLocator::biggestProb = 0.10 [static]
 

Definition at line 17 of file GT2005TeamBallLocator.cpp.

Referenced by calcRepresentativeParticleContainer(), and handleMessage().

int GT2005TeamBallLocator::numberOfCells = 0 [static]
 

Definition at line 18 of file GT2005TeamBallLocator.cpp.

Referenced by calcRepresentativeParticleContainer().

double GT2005TeamBallLocator::timeFactorThreshold
 

Definition at line 42 of file GT2005TeamBallLocator.h.

GT2005ParticleContainerReceived GT2005TeamBallLocator::receivingContainer
 

Definition at line 45 of file GT2005TeamBallLocator.h.

Referenced by execute().

int GT2005TeamBallLocator::framesNothingReceived[3]
 

Definition at line 48 of file GT2005TeamBallLocator.h.

Referenced by execute(), and GT2005TeamBallLocator().

Pose2D GT2005TeamBallLocator::lastOdometryData
 

Definition at line 51 of file GT2005TeamBallLocator.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:15:35 2006 for GT2005 by doxygen 1.3.6