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

GT2005SelfLocator Class Reference

#include <GT2005SelfLocator.h>

Inheritance diagram for GT2005SelfLocator:

Inheritance graph
[legend]
Collaboration diagram for GT2005SelfLocator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GT2005SelfLocator (const SelfLocatorInterfaces &interfaces)
 Constructor.

virtual void execute ()
 The function executes the module.

virtual bool handleMessage (InMessage &message)
 Called from a MessageQueue to distribute messages.


Private Types

enum  FlagSides { LEFT_SIDE_OF_FLAG = 1, RIGHT_SIDE_OF_FLAG = -1 }
enum  {
  SAMPLES_MAX = 100, POSE_SPACE_GRID = 10, OBS_TABLE_X_FIELD_LINE = LinesPercept::field,
  OBS_TABLE_Y_FIELD_LINE = LinesPercept::numberOfLineTypes, NUM_OF_CALCULATED_POSES = 3
}

Private Member Functions

double gaussian (double d) const
 The function distributes the parameter in a Gaussian way.

void motionUpdate (const Pose2D &odometry, const Pose2D &camera, bool noise)
 The function updates the samples by the odometry offset.

void updateByFlag (const Vector2< double > &flagFieldPosition, FlagSides sideOfFlag, double measuredBearing)
 The function updates the samples by a single edge of a flag recognized.

void updateByGoalPost (const Vector2< double > &goalPost, double measuredBearing)
 The function updates the samples by a single goal post recognized.

void landmarksObservationUpdate (const LandmarksPercept &landmarksPercept)
 The function updates the samples by the recognized landmarks (goal, flag..) triggers updateByFlag and updateByGoalPost.

GT2005LineCrossingsTable::CrossingClass getCrossingClassification (const LinesPercept::LineCrossingPoint &point)
 calculates the CrossingClass out of the classification (side1..side4) in the LinesPercept

void updateByCenterCircle (const LinesPercept::CenterCircle &centerCircle)
 observationUpdate by the center circle

void updateByCrossing (const LinesPercept::LineCrossingPoint &point)
 observationUpdate using the linecrossing percept

void updateByPoint (const LinesPercept::LinePoint &point, GT2005SelfLocatorSample::PerceptType type, LinesPercept::LineType observationTableIndex)
 does an observationupdate with a point on the field (line or goal)

void lineObservationUpdate (const LinesPercept &linesPercept)
 The function updates the samples by recognized lines.

double calcAveragePerceptTypeProbabilities ()
 Calculates the average possibility for each perceptType and all samples and returns the product over all averages.

void resample ()
 redistibution of the sampleSet according to the probabilities of the samples

double calcDistributionValidityByStandardDeviation ()
 Calculates the localization validity by Standard Deviation.

double calcDistributionValidityByEntropy ()
 Calculates the localization validity by Entropy.

RobotPose calcPoseFromSubCube (Cell poseSpace[POSE_SPACE_GRID][POSE_SPACE_GRID][POSE_SPACE_GRID], int x, int y, int r)
 The function calculates a Pose by averaging the sample poses in a sub cube of the pose-room.

void calcPose (Pose2D &pose, double &validity)
 The function determines the most probable pose from the sample distribution.

void draw () const
 The function draws the current sample set to a debug drawing.

Drawings::Color getSampleColor (double probability) const
 Returns a color corresponding to the sample probability.

void draw (const Pose2D &pose, Drawings::Color color) const
 The function draws an arrow to the sample set drawing.

void drawTestSample (const Pose2D &pose, Drawings::Color color) const
 The function draws an arrow to the test sample drawing.

void updateVariancesBySpeed (double speed)
 The function calculates the variances and trust values from the current speed.

void calculateTrust ()
 The function calculates the trust values from variance and weight parameters.

void resetSamples ()
 Reset all samples to random position.

void resetSamples (const Pose2D &pose)
 Reset all samples to a given position.

void resetSamplesWhenPenalized ()
 Reset all samples when robot is penalized 25% samples are placed on each side of the field at the center line respectively 50% at random positions.


Private Attributes

SampleSet< GT2005SelfLocatorSample,
SAMPLES_MAX > 
sampleSet
 the sampleSet

bool teamColorBlue
double linePointZAngleMotionDependentVariance
double linePointZAngleTrust
double linePointYAngleTrust
double crossingZAngleTrust
double crossingYAngleTrust
double centerCircleZAngleTrust
double centerCircleYAngleTrust
double centerCircleOrientationAngleTrust
double flagYAngleTrust
double goalZAngleTrust
double goalYAngleTrust
Pose2D lastOdometry
Pose2D lastOdometry2
 the last Odometry, used to calculate the delta_odometry

unsigned timeStamp
 timestap

bool observationUpdateDone
 a flag indicating if an observation update was done during the current run of execute

double speed
 current robot speed

double averagePerceptTypeProb [GT2005SelfLocatorSample::numberOfPerceptTypes]
 the average probability for each PerceptType and all Samples

GT2005SampleTemplateGenerator sampleTemplateGenerator
 this class encapsules template generation

GT2005LineCrossingsTable lineCrossingsTable
GT2005SelfLocatorSampletestSample
 testing and debugging stuff

int testSampleIndex
Vector2< double > lastModelCrossing
Vector2< double > lastSeenCrossing
GT2005LineCrossingsTable::CrossingClass lastSeenCrossingClass
Pose2D lastSeenCenterCircle
GT2005SelfLocatorParameters parameters
Vector2< double > eigenVec0
 eigenvectors of particle distribution covariance matrix

Vector2< double > eigenVec1
 eigenvectors of particle distribution covariance matrix

double varianceCovarianceMatrix [2][2]
double stdDevRot
double averageX
double averageY
double eigenVal0
double eigenVal1
double eigenSwap
double averageRot

Static Private Attributes

double const  QUASI_ZERO = 0.000001

Member Enumeration Documentation

enum GT2005SelfLocator::FlagSides [private]
 

Enumeration values:
LEFT_SIDE_OF_FLAG  flag indicating a position on the left side of a flag
RIGHT_SIDE_OF_FLAG  flag indicating a position on the right side of a flag

Definition at line 69 of file GT2005SelfLocator.h.

anonymous enum [private]
 

Enumeration values:
SAMPLES_MAX  maximum number of samples
POSE_SPACE_GRID  quantization of the pose space
OBS_TABLE_X_FIELD_LINE  in the original 04 observation table LinesPercept::field is a x directed line and LinesPercept::numberOfLineTypes is a y directed line
OBS_TABLE_Y_FIELD_LINE 
NUM_OF_CALCULATED_POSES 

Definition at line 74 of file GT2005SelfLocator.h.


Constructor & Destructor Documentation

GT2005SelfLocator::GT2005SelfLocator const SelfLocatorInterfaces interfaces  ) 
 

Constructor.

Parameters:
interfaces The paramters of the SelfLocator module.

Definition at line 47 of file GT2005SelfLocator.cpp.

References calculateTrust(), crossingYAngleTrust, crossingZAngleTrust, flagYAngleTrust, goalYAngleTrust, goalZAngleTrust, idText, linePointYAngleTrust, linePointZAngleTrust, OUTPUT, resetSamples(), testSample, and testSampleIndex.

Here is the call graph for this function:


Member Function Documentation

void GT2005SelfLocator::execute  )  [virtual]
 

The function executes the module.

Reimplemented from Module.

Definition at line 588 of file GT2005SelfLocator.cpp.

References GT2005SelfLocatorParameters::agingFactor, calcPose(), calculateTrust(), LandmarksPercept::cameraOffset, DEBUG_RESPONSE, draw(), LandmarksPercept::frameNumber, GT2005SampleTemplateGenerator::generateTemplates(), SystemCall::getCurrentSystemTime(), getPlayer(), GameControlData::getRobot(), Player::getTeamColor(), SystemCall::getTimeSince(), CameraMatrix::isValid, landmarksObservationUpdate(), lineObservationUpdate(), MODIFY, motionUpdate(), NDECLARE_DEBUGDRAWING, GT2005SelfLocatorParameters::noiseWithoutObservationUpdate, observationUpdateDone, resample(), resetSamples(), GT2005SelfLocatorParameters::resetSamplesWhenPenalized, resetSamplesWhenPenalized(), sampleTemplateGenerator, RobotPose::setFrameNumber(), RobotPose::setPose(), RobotPose::setTimestamp(), RobotPose::setValidity(), teamColorBlue, testSample, testSampleIndex, LandmarksState::update(), Vector3< double >::x, and Vector3< double >::y.

Here is the call graph for this function:

bool GT2005SelfLocator::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 1383 of file GT2005SelfLocator.cpp.

double GT2005SelfLocator::gaussian double  d  )  const [inline, private]
 

The function distributes the parameter in a Gaussian way.

Parameters:
d A value that should be distributed.
Returns:
A transformation of d according to a Gaussian curve.

Definition at line 169 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByEntropy(), calcDistributionValidityByStandardDeviation(), updateByCenterCircle(), updateByCrossing(), updateByFlag(), updateByGoalPost(), and updateByPoint().

void GT2005SelfLocator::motionUpdate const Pose2D odometry,
const Pose2D camera,
bool  noise
[private]
 

The function updates the samples by the odometry offset.

Parameters:
odometry The motion since the last call to this function.
camera The camera offset.
noise Dermines whether some additional noise is added to the sample poses.
enhance maybe by replacing bool noise by a noisefunction?

Definition at line 74 of file GT2005SelfLocator.cpp.

References Vector2< double >::abs(), GT2005SelfLocatorSample::camera, Pose2D::getAngle(), GT2005SelfLocatorSample::isUsingOdometry, GT2005SelfLocatorParameters::majorDirTransWeight, max, GT2005SelfLocatorParameters::minorDirTransWeight, GT2005SelfLocatorParameters::movedAngleWeight, GT2005SelfLocatorParameters::movedDistWeight, PoseSample::probability, random(), GT2005SelfLocatorParameters::rotationNoise, Pose2D::translation, GT2005SelfLocatorParameters::translationNoise, Vector2< double >::x, and Vector2< double >::y.

Referenced by execute().

Here is the call graph for this function:

void GT2005SelfLocator::updateByFlag const Vector2< double > &  flagFieldPosition,
FlagSides  sideOfFlag,
double  measuredBearing
[private]
 

The function updates the samples by a single edge of a flag recognized.

Parameters:
flagFieldPosition The position of the flag.
sideOfFlag The side of the flag that was seen.
measuredBearing The bearing, under which the edge was seen.

Definition at line 407 of file GT2005SelfLocator.cpp.

References Vector2< double >::abs(), GT2005SelfLocatorSample::camera, flagYAngleTrust, gaussian(), getSampleColor(), NCIRCLE, observationUpdateDone, pi, QUASI_ZERO, random(), GT2005SelfLocatorSample::setPerceptProbability(), testSampleIndex, Pose2D::translation, GT2005SelfLocatorParameters::updateProbFlag, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by landmarksObservationUpdate().

Here is the call graph for this function:

void GT2005SelfLocator::updateByGoalPost const Vector2< double > &  goalPost,
double  measuredBearing
[private]
 

The function updates the samples by a single goal post recognized.

Parameters:
goalPost The position of the goal post.
measuredBearing The bearing, under which the goal post was seen.

Definition at line 461 of file GT2005SelfLocator.cpp.

References GT2005SelfLocatorSample::camera, gaussian(), getSampleColor(), goalYAngleTrust, NCIRCLE, observationUpdateDone, pi, random(), GT2005SelfLocatorSample::setPerceptProbability(), testSampleIndex, Pose2D::translation, GT2005SelfLocatorParameters::updateProbGoalPost, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by landmarksObservationUpdate().

Here is the call graph for this function:

void GT2005SelfLocator::landmarksObservationUpdate const LandmarksPercept landmarksPercept  )  [private]
 

The function updates the samples by the recognized landmarks (goal, flag..) triggers updateByFlag and updateByGoalPost.

Parameters:
landmarksPercept The landmarksPercept

Definition at line 492 of file GT2005SelfLocator.cpp.

References Goal::color, LandmarksPercept::flags, LandmarksPercept::goals, ConditionalBoundary::isOnBorder(), Goal::leftPost, Range< double >::max, Range< double >::min, LandmarksPercept::numberOfFlags, LandmarksPercept::numberOfGoals, Flag::position, Goal::rightPost, updateByFlag(), updateByGoalPost(), and Boundary< double >::x.

Referenced by execute().

Here is the call graph for this function:

GT2005LineCrossingsTable::CrossingClass GT2005SelfLocator::getCrossingClassification const LinesPercept::LineCrossingPoint point  )  [private]
 

calculates the CrossingClass out of the classification (side1..side4) in the LinesPercept

void GT2005SelfLocator::updateByCenterCircle const LinesPercept::CenterCircle centerCircle  )  [private]
 

observationUpdate by the center circle

Definition at line 129 of file GT2005SelfLocator.cpp.

References Vector2< V >::abs(), Vector2< int >::abs(), centerCircleOrientationAngleTrust, centerCircleYAngleTrust, centerCircleZAngleTrust, gaussian(), getSampleColor(), GT2005SelfLocatorParameters::headHeightEstimation, LinesPercept::CenterCircle::location, NCIRCLE, NLINE, normalize(), LinesPercept::CenterCircle::orientation, LinesPercept::CenterCircle::orientationKnown, pi_2, point, random(), Pose2D::rotation, GT2005SelfLocatorSample::setPerceptProbability(), testSampleIndex, Pose2D::translation, GT2005SelfLocatorParameters::updateProbCenterCircle, Vector2< double >::x, Vector2< V >::x, Vector2< int >::x, Vector2< double >::y, Vector2< V >::y, and Vector2< int >::y.

Referenced by lineObservationUpdate().

Here is the call graph for this function:

void GT2005SelfLocator::updateByCrossing const LinesPercept::LineCrossingPoint point  )  [private]
 

observationUpdate using the linecrossing percept

Parameters:
relative position of the linecrossing

Definition at line 184 of file GT2005SelfLocator.cpp.

References Vector2< int >::abs(), Vector2< V >::abs(), LinesPercept::LineCrossingPoint::angleOnField, crossingYAngleTrust, crossingZAngleTrust, gaussian(), GT2005LineCrossingsTable::getClosestPoint(), getSampleColor(), GT2005SelfLocatorParameters::headHeightEstimation, lastModelCrossing, lastSeenCrossing, lastSeenCrossingClass, lineCrossingsTable, LinesPercept::LineCrossingPoint::locationOnField, NCIRCLE, NLINE, point, random(), GT2005SelfLocatorSample::setPerceptProbability(), testSampleIndex, Pose2D::translation, GT2005SelfLocatorParameters::updateProbCrossing, Vector2< V >::x, Vector2< double >::x, Vector2< int >::x, Vector2< V >::y, Vector2< double >::y, and Vector2< int >::y.

Referenced by lineObservationUpdate().

Here is the call graph for this function:

void GT2005SelfLocator::updateByPoint const LinesPercept::LinePoint point,
GT2005SelfLocatorSample::PerceptType  type,
LinesPercept::LineType  observationTableIndex
[private]
 

does an observationupdate with a point on the field (line or goal)

Parameters:
point a point on a line
type the type of the line

Definition at line 270 of file GT2005SelfLocator.cpp.

References Vector2< V >::abs(), Vector2< int >::abs(), Vector2< int >::angle(), gaussian(), Pose2D::getAngle(), getSampleColor(), GT2005SelfLocatorParameters::headHeightEstimation, linePointYAngleTrust, linePointZAngleTrust, NCIRCLE, NLINE, pi, point, QUASI_ZERO, GT2005SelfLocatorSample::setPerceptProbability(), testSampleIndex, Pose2D::translation, Vector2< double >::x, Vector2< V >::x, Vector2< int >::x, Vector2< double >::y, Vector2< V >::y, and Vector2< int >::y.

Referenced by lineObservationUpdate().

Here is the call graph for this function:

void GT2005SelfLocator::lineObservationUpdate const LinesPercept linesPercept  )  [private]
 

The function updates the samples by recognized lines.

Parameters:
linesPercept The LinesPercept

Definition at line 344 of file GT2005SelfLocator.cpp.

References LinesPercept::centerCircle, LinesPercept::centerCircleFound, GT2005SelfLocatorParameters::centerCircleWeight, GT2005SelfLocatorParameters::crossingWeight, e, getPlayer(), Player::getTeamColor(), LinesPercept::lineCrossings, GT2005SelfLocatorParameters::maxBorderpoints, GT2005SelfLocatorParameters::maxCrossings, GT2005SelfLocatorParameters::maxGoalpoints, GT2005SelfLocatorParameters::maxLinepoints, LinesPercept::numberOfLineCrossings, observationUpdateDone, LinesPercept::points, random(), updateByCenterCircle(), updateByCrossing(), and updateByPoint().

Referenced by execute().

Here is the call graph for this function:

double GT2005SelfLocator::calcAveragePerceptTypeProbabilities  )  [private]
 

Calculates the average possibility for each perceptType and all samples and returns the product over all averages.

contains the part of the gt04 resampling method that calculates

Returns:
product over all average percepttype-probabilities

Definition at line 707 of file GT2005SelfLocator.cpp.

References averagePerceptTypeProb, and GT2005SelfLocatorSample::perceptProbabilities.

Referenced by resample().

void GT2005SelfLocator::resample  )  [private]
 

redistibution of the sampleSet according to the probabilities of the samples

TODO: template generation

Definition at line 748 of file GT2005SelfLocator.cpp.

References GT2005SelfLocatorParameters::applyConstantResampling, averagePerceptTypeProb, calcAveragePerceptTypeProbabilities(), GT2005SelfLocatorParameters::constantResamplingRate, CollisionPercept::getCollisionAggregate(), GT2005SampleTemplateGenerator::getNumberOfTemplates(), GT2005SelfLocatorSample::getProbability(), GT2005SampleTemplateGenerator::getTemplate(), GT2005SelfLocatorSample::isUsingOdometry, GT2005SelfLocatorParameters::odometryProbCollision, GT2005SelfLocatorParameters::odometryProbNoCollision, random(), Field::randomPose(), sampleTemplateGenerator, SampleSet< GT2005SelfLocatorSample, SAMPLES_MAX >::swap(), testSample, and testSampleIndex.

Referenced by execute().

Here is the call graph for this function:

double GT2005SelfLocator::calcDistributionValidityByStandardDeviation  )  [private]
 

Calculates the localization validity by Standard Deviation.

Definition at line 871 of file GT2005SelfLocator.cpp.

References alpha, averageRot, averageX, DEBUG_RESPONSE, RobotPose::directionOfGreatestUncertaintyExists, eigenSwap, eigenVal0, eigenVal1, eigenVec0, eigenVec1, gaussian(), RobotPose::greatestUncertainty, idText, max, min, NCOMPLEX_DRAWING, NLINE, normalize(), OUTPUT, Pose2D::rotation, RobotPose::setPositionVariance(), sqr, stdDevRot, Pose2D::translation, varianceCovarianceMatrix, Vector2< double >::x, Vector2< V >::x, Vector2< double >::y, and Vector2< V >::y.

Referenced by calcPose().

Here is the call graph for this function:

double GT2005SelfLocator::calcDistributionValidityByEntropy  )  [private]
 

Calculates the localization validity by Entropy.

Definition at line 1108 of file GT2005SelfLocator.cpp.

References gaussian(), and pi.

Referenced by calcPose().

Here is the call graph for this function:

RobotPose GT2005SelfLocator::calcPoseFromSubCube Cell  poseSpace[POSE_SPACE_GRID][POSE_SPACE_GRID][POSE_SPACE_GRID],
int  x,
int  y,
int  r
[private]
 

The function calculates a Pose by averaging the sample poses in a sub cube of the pose-room.

Definition at line 1164 of file GT2005SelfLocator.cpp.

References Field::clip(), GT2005SelfLocatorParameters::clipRobotPose, Pose2D::getCos(), GT2005SelfLocatorSample::getProbability(), Pose2D::getSin(), RobotPose::getValidity(), GT2005SelfLocatorSample::isValid(), GT2005SelfLocatorSample::next, RobotPose::setPose(), RobotPose::setValidity(), Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by calcPose().

Here is the call graph for this function:

void GT2005SelfLocator::calcPose Pose2D pose,
double &  validity
[private]
 

The function determines the most probable pose from the sample distribution.

Parameters:
pose The pose is returned to this variable.
validity The validity of the pose is returned to this variable.

Definition at line 1231 of file GT2005SelfLocator.cpp.

References calcDistributionValidityByEntropy(), calcDistributionValidityByStandardDeviation(), calcPoseFromSubCube(), CIRCLE, GT2005SelfLocator::Cell::count, DEBUG_RESPONSE, GT2005SelfLocator::Cell::first, Pose2D::getAngle(), RobotPose::getPose(), Range< double >::getSize(), RobotPose::getValidity(), GT2005SelfLocatorSample::isValid(), GT2005SelfLocatorSample::next, NUM_OF_CALCULATED_POSES, RobotPoseCollection::numberOfPoses, pi2, POSE_SPACE_GRID, RobotPoseCollection::poses, RobotPose::setValidity(), Pose2D::translation, Vector2< double >::x, Boundary< double >::x, Vector2< double >::y, and Boundary< double >::y.

Referenced by execute().

Here is the call graph for this function:

void GT2005SelfLocator::draw  )  const [private]
 

The function draws the current sample set to a debug drawing.

Definition at line 1467 of file GT2005SelfLocator.cpp.

References drawTestSample(), getSampleColor(), NCIRCLE, NCOMPLEX_DRAWING, NLINE, PoseSample::probability, and testSample.

Referenced by execute().

Here is the call graph for this function:

Drawings::Color GT2005SelfLocator::getSampleColor double  probability  )  const [private]
 

Returns a color corresponding to the sample probability.

Definition at line 1570 of file GT2005SelfLocator.cpp.

References QUASI_ZERO.

Referenced by draw(), updateByCenterCircle(), updateByCrossing(), updateByFlag(), updateByGoalPost(), and updateByPoint().

void GT2005SelfLocator::draw const Pose2D pose,
Drawings::Color  color
const [private]
 

The function draws an arrow to the sample set drawing.

Parameters:
pose The position and direction of the arrow.
color The color of the arrow.

Definition at line 1588 of file GT2005SelfLocator.cpp.

References NLINE, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

void GT2005SelfLocator::drawTestSample const Pose2D pose,
Drawings::Color  color
const [private]
 

The function draws an arrow to the test sample drawing.

Parameters:
pose The position and direction of the arrow.
color The color of the arrow.

Definition at line 1619 of file GT2005SelfLocator.cpp.

References NLINE, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by draw().

void GT2005SelfLocator::updateVariancesBySpeed double  speed  )  [private]
 

The function calculates the variances and trust values from the current speed.

Definition at line 550 of file GT2005SelfLocator.cpp.

References GT2005SelfLocatorParameters::linePointWeight, GT2005SelfLocatorParameters::linePointZAngleMotionDependency, linePointZAngleMotionDependentVariance, linePointZAngleTrust, GT2005SelfLocatorParameters::linePointZAngleVariance, and QUASI_ZERO.

void GT2005SelfLocator::calculateTrust  )  [private]
 

The function calculates the trust values from variance and weight parameters.

Definition at line 557 of file GT2005SelfLocator.cpp.

References centerCircleOrientationAngleTrust, GT2005SelfLocatorParameters::centerCircleOrientationAngleVariance, GT2005SelfLocatorParameters::centerCircleWeight, centerCircleYAngleTrust, GT2005SelfLocatorParameters::centerCircleYAngleVariance, centerCircleZAngleTrust, GT2005SelfLocatorParameters::centerCircleZAngleVariance, GT2005SelfLocatorParameters::crossingWeight, crossingYAngleTrust, GT2005SelfLocatorParameters::crossingYAngleVariance, crossingZAngleTrust, GT2005SelfLocatorParameters::crossingZAngleVariance, GT2005SelfLocatorParameters::flagWeight, flagYAngleTrust, GT2005SelfLocatorParameters::flagYAngleVariance, GT2005SelfLocatorParameters::goalWeight, goalYAngleTrust, GT2005SelfLocatorParameters::goalYAngleVariance, goalZAngleTrust, GT2005SelfLocatorParameters::goalZAngleVariance, GT2005SelfLocatorParameters::linePointWeight, linePointYAngleTrust, GT2005SelfLocatorParameters::linePointYAngleVariance, linePointZAngleTrust, GT2005SelfLocatorParameters::linePointZAngleVariance, and QUASI_ZERO.

Referenced by execute(), and GT2005SelfLocator().

void GT2005SelfLocator::resetSamples  )  [private]
 

Reset all samples to random position.

Definition at line 1403 of file GT2005SelfLocator.cpp.

References Field::randomPose().

Referenced by execute(), and GT2005SelfLocator().

Here is the call graph for this function:

void GT2005SelfLocator::resetSamples const Pose2D pose  )  [private]
 

Reset all samples to a given position.

Definition at line 1412 of file GT2005SelfLocator.cpp.

void GT2005SelfLocator::resetSamplesWhenPenalized  )  [private]
 

Reset all samples when robot is penalized 25% samples are placed on each side of the field at the center line respectively 50% at random positions.

Definition at line 1421 of file GT2005SelfLocator.cpp.

References Pose2D::getAngle(), pi_2, Pose2D::random(), Field::randomPose(), Pose2D::rotation, Pose2D::translation, Vector2< double >::x, and Vector2< double >::y.

Referenced by execute().

Here is the call graph for this function:


Member Data Documentation

const double GT2005SelfLocator::QUASI_ZERO = 0.000001 [static, private]
 

Definition at line 42 of file GT2005SelfLocator.cpp.

Referenced by calculateTrust(), getSampleColor(), updateByFlag(), updateByPoint(), and updateVariancesBySpeed().

SampleSet<GT2005SelfLocatorSample, SAMPLES_MAX> GT2005SelfLocator::sampleSet [private]
 

the sampleSet

Definition at line 92 of file GT2005SelfLocator.h.

bool GT2005SelfLocator::teamColorBlue [private]
 

Definition at line 93 of file GT2005SelfLocator.h.

Referenced by execute().

double GT2005SelfLocator::linePointZAngleMotionDependentVariance [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by updateVariancesBySpeed().

double GT2005SelfLocator::linePointZAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), GT2005SelfLocator(), updateByPoint(), and updateVariancesBySpeed().

double GT2005SelfLocator::linePointYAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), GT2005SelfLocator(), and updateByPoint().

double GT2005SelfLocator::crossingZAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), GT2005SelfLocator(), and updateByCrossing().

double GT2005SelfLocator::crossingYAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), GT2005SelfLocator(), and updateByCrossing().

double GT2005SelfLocator::centerCircleZAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), and updateByCenterCircle().

double GT2005SelfLocator::centerCircleYAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), and updateByCenterCircle().

double GT2005SelfLocator::centerCircleOrientationAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), and updateByCenterCircle().

double GT2005SelfLocator::flagYAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), GT2005SelfLocator(), and updateByFlag().

double GT2005SelfLocator::goalZAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), and GT2005SelfLocator().

double GT2005SelfLocator::goalYAngleTrust [private]
 

Definition at line 97 of file GT2005SelfLocator.h.

Referenced by calculateTrust(), GT2005SelfLocator(), and updateByGoalPost().

Pose2D GT2005SelfLocator::lastOdometry [private]
 

Definition at line 129 of file GT2005SelfLocator.h.

Pose2D GT2005SelfLocator::lastOdometry2 [private]
 

the last Odometry, used to calculate the delta_odometry

Definition at line 129 of file GT2005SelfLocator.h.

unsigned GT2005SelfLocator::timeStamp [private]
 

timestap

Definition at line 130 of file GT2005SelfLocator.h.

bool GT2005SelfLocator::observationUpdateDone [private]
 

a flag indicating if an observation update was done during the current run of execute

Definition at line 131 of file GT2005SelfLocator.h.

Referenced by execute(), lineObservationUpdate(), updateByFlag(), and updateByGoalPost().

double GT2005SelfLocator::speed [private]
 

current robot speed

Definition at line 132 of file GT2005SelfLocator.h.

double GT2005SelfLocator::averagePerceptTypeProb[GT2005SelfLocatorSample::numberOfPerceptTypes] [private]
 

the average probability for each PerceptType and all Samples

Definition at line 134 of file GT2005SelfLocator.h.

Referenced by calcAveragePerceptTypeProbabilities(), and resample().

GT2005SampleTemplateGenerator GT2005SelfLocator::sampleTemplateGenerator [private]
 

this class encapsules template generation

Definition at line 136 of file GT2005SelfLocator.h.

Referenced by execute(), and resample().

GT2005LineCrossingsTable GT2005SelfLocator::lineCrossingsTable [private]
 

Definition at line 138 of file GT2005SelfLocator.h.

Referenced by updateByCrossing().

GT2005SelfLocatorSample* GT2005SelfLocator::testSample [private]
 

testing and debugging stuff

Definition at line 143 of file GT2005SelfLocator.h.

Referenced by draw(), execute(), GT2005SelfLocator(), and resample().

int GT2005SelfLocator::testSampleIndex [private]
 

Definition at line 144 of file GT2005SelfLocator.h.

Referenced by execute(), GT2005SelfLocator(), resample(), updateByCenterCircle(), updateByCrossing(), updateByFlag(), updateByGoalPost(), and updateByPoint().

Vector2<double> GT2005SelfLocator::lastModelCrossing [private]
 

Definition at line 145 of file GT2005SelfLocator.h.

Referenced by updateByCrossing().

Vector2<double> GT2005SelfLocator::lastSeenCrossing [private]
 

Definition at line 145 of file GT2005SelfLocator.h.

Referenced by updateByCrossing().

GT2005LineCrossingsTable::CrossingClass GT2005SelfLocator::lastSeenCrossingClass [private]
 

Definition at line 146 of file GT2005SelfLocator.h.

Referenced by updateByCrossing().

Pose2D GT2005SelfLocator::lastSeenCenterCircle [private]
 

Definition at line 147 of file GT2005SelfLocator.h.

GT2005SelfLocatorParameters GT2005SelfLocator::parameters [private]
 

Definition at line 149 of file GT2005SelfLocator.h.

Vector2<double> GT2005SelfLocator::eigenVec0 [private]
 

eigenvectors of particle distribution covariance matrix

Definition at line 152 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

Vector2<double> GT2005SelfLocator::eigenVec1 [private]
 

eigenvectors of particle distribution covariance matrix

Definition at line 152 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::varianceCovarianceMatrix[2][2] [private]
 

Definition at line 154 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::stdDevRot [private]
 

Definition at line 155 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::averageX [private]
 

Definition at line 156 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::averageY [private]
 

Definition at line 157 of file GT2005SelfLocator.h.

double GT2005SelfLocator::eigenVal0 [private]
 

Definition at line 158 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::eigenVal1 [private]
 

Definition at line 158 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::eigenSwap [private]
 

Definition at line 158 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().

double GT2005SelfLocator::averageRot [private]
 

Definition at line 159 of file GT2005SelfLocator.h.

Referenced by calcDistributionValidityByStandardDeviation().


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