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

LandmarksPercept Class Reference

The class represents all detected landmark percepts. More...

#include <LandmarksPercept.h>

Inheritance diagram for LandmarksPercept:

Inheritance graph
[legend]
Collaboration diagram for LandmarksPercept:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LandmarksPercept ()
 Constructor.

void reset (unsigned long frameNumber)
 The function resets the object, i.e.

void addFlag (Flag::FlagType type, const Vector2< double > &position, const ConditionalBoundary &boundary, const Vector2< int > &topLeft, const Vector2< int > &topRight, const Vector2< int > &bottomLeft, const Vector2< int > &bottomRight)
 The function adds a flag to the flag array.

void addFlag (Flag::FlagType type, bool ownTeamColorIsBlue, const ConditionalBoundary &boundary, const Vector2< int > &topLeft, const Vector2< int > &topRight, const Vector2< int > &bottomLeft, const Vector2< int > &bottomRight)
 The function adds a flag to the flag array.

void estimateOffsetForFlags (const Vector2< double > &cameraOffset)
 Calculates distance and angle for each flag.

void addGoal (colorClass color, const ConditionalBoundary &boundary, const Vector2< int > &topLeft, const Vector2< int > &topRight, const Vector2< int > &bottomLeft, const Vector2< int > &bottomRight, double distance, double angle, double rotation, double distanceValidity, double angleValidity)
 The function adds a goal to the goal array.

void addGoal (colorClass color, const ConditionalBoundary &boundary, const Vector2< int > &topLeft, const Vector2< int > &topRight, const Vector2< int > &bottomLeft, const Vector2< int > &bottomRight, const CameraMatrix &cameraMatrix)
void estimateOffsetAndValiditiesForGoal (Goal &goal, const CameraMatrix &cameraMatrix)
 Calculates distance and angle for each goal.

void serialize (In *in, Out *out)

Public Attributes

Flag flags [4]
 The array of up to 4 flags.

int numberOfFlags
 The number of flags actually stored in the array.

Goal goals [2]
 The array of up to 2 goals.

int numberOfGoals
 The number of goals actually stored in the array.

double viewAngle
 The estimated viewing angle in field coords.

bool viewAngleValid
 Tells the self locator if the view angle is valid.

Vector3< double > cameraOffset
 The camera offset relative to position of the robot's neck.

unsigned long frameNumber
 The frame number when perceived.


Detailed Description

The class represents all detected landmark percepts.

Definition at line 223 of file LandmarksPercept.h.


Constructor & Destructor Documentation

LandmarksPercept::LandmarksPercept  ) 
 

Constructor.

Resets the object.

Definition at line 51 of file LandmarksPercept.cpp.

References reset().

Here is the call graph for this function:


Member Function Documentation

void LandmarksPercept::reset unsigned long  frameNumber  ) 
 

The function resets the object, i.e.

the numbers of flags and goals are set to 0.

Definition at line 56 of file LandmarksPercept.cpp.

References numberOfFlags, numberOfGoals, viewAngle, and viewAngleValid.

Referenced by VLCImageProcessor::execute(), SlamImageProcessor::execute(), GT2005ImageProcessor::execute(), and LandmarksPercept().

void LandmarksPercept::addFlag Flag::FlagType  type,
const Vector2< double > &  position,
const ConditionalBoundary boundary,
const Vector2< int > &  topLeft,
const Vector2< int > &  topRight,
const Vector2< int > &  bottomLeft,
const Vector2< int > &  bottomRight
 

The function adds a flag to the flag array.

Definition at line 64 of file LandmarksPercept.cpp.

References Flag::bottomLeft, Flag::bottomRight, flags, numberOfFlags, Flag::position, Flag::setBottomColor(), Flag::setTopColor(), Flag::topLeft, Flag::topRight, and Flag::type.

Here is the call graph for this function:

void LandmarksPercept::addFlag Flag::FlagType  type,
bool  ownTeamColorIsBlue,
const ConditionalBoundary boundary,
const Vector2< int > &  topLeft,
const Vector2< int > &  topRight,
const Vector2< int > &  bottomLeft,
const Vector2< int > &  bottomRight
 

The function adds a flag to the flag array.

Definition at line 89 of file LandmarksPercept.cpp.

References Flag::FlagType, Vector2< V >::x, and Vector2< V >::y.

void LandmarksPercept::estimateOffsetForFlags const Vector2< double > &  cameraOffset  ) 
 

Calculates distance and angle for each flag.

Todo:
improve, isOnBorder(flag.x.?) not checked

Definition at line 138 of file LandmarksPercept.cpp.

References Vector2< double >::abs(), Flag::angle, Flag::angleValidity, Flag::distance, Flag::distanceValidity, Range< double >::getCenter(), Range< double >::getSize(), ConditionalBoundary::isOnBorder(), Range< double >::max, Range< double >::min, Pose2D::translation, Boundary< double >::x, and Boundary< double >::y.

Here is the call graph for this function:

void LandmarksPercept::addGoal colorClass  color,
const ConditionalBoundary boundary,
const Vector2< int > &  topLeft,
const Vector2< int > &  topRight,
const Vector2< int > &  bottomLeft,
const Vector2< int > &  bottomRight,
double  distance,
double  angle,
double  rotation,
double  distanceValidity,
double  angleValidity
 

The function adds a goal to the goal array.

Definition at line 197 of file LandmarksPercept.cpp.

References Goal::angle, Goal::angleValidity, Goal::bottomLeft, Goal::bottomRight, Goal::color, Goal::distance, Goal::distanceValidity, getPlayer(), Player::getTeamColor(), goals, Goal::leftPost, numberOfGoals, Goal::rightPost, Goal::rotation, Goal::topLeft, Goal::topRight, Vector2< V >::x, and Vector2< V >::y.

Referenced by addGoal(), VLCGoalRecognizer::interpretResults(), GT2005GoalRecognizer::publishResults(), SlamGoalRecognizer::scanLinesForGoals(), and GoalRecognizer::scanLinesForGoals().

Here is the call graph for this function:

void LandmarksPercept::addGoal colorClass  color,
const ConditionalBoundary boundary,
const Vector2< int > &  topLeft,
const Vector2< int > &  topRight,
const Vector2< int > &  bottomLeft,
const Vector2< int > &  bottomRight,
const CameraMatrix cameraMatrix
 

Definition at line 244 of file LandmarksPercept.cpp.

References addGoal(), estimateOffsetAndValiditiesForGoal(), goals, and numberOfGoals.

Here is the call graph for this function:

void LandmarksPercept::estimateOffsetAndValiditiesForGoal Goal goal,
const CameraMatrix cameraMatrix
 

Calculates distance and angle for each goal.

Definition at line 259 of file LandmarksPercept.cpp.

References Vector2< double >::abs(), Goal::angle, Goal::angleValidity, cameraOffset, Goal::distance, Goal::distanceValidity, Range< double >::getCenter(), ConditionalBoundary::isOnBorder(), Range< double >::max, Range< double >::min, Goal::rotation, Pose2D::translation, Pose3D::translation, Boundary< double >::x, Vector3< double >::x, Boundary< double >::y, and Vector3< double >::y.

Referenced by addGoal().

Here is the call graph for this function:

void LandmarksPercept::serialize In in,
Out out
[inline, virtual]
 

Implements Streamable.

Definition at line 307 of file LandmarksPercept.h.

References cameraOffset, flags, goals, numberOfFlags, numberOfGoals, STREAM, STREAM_DYN_ARRAY, STREAM_REGISTER_BEGIN, STREAM_REGISTER_FINISH, viewAngle, and viewAngleValid.


Member Data Documentation

Flag LandmarksPercept::flags[4]
 

The array of up to 4 flags.

Definition at line 226 of file LandmarksPercept.h.

Referenced by addFlag(), GT2004SelfLocator::execute(), VLCImageProcessor::filterPercepts(), GT2005ImageProcessor::filterPercepts(), GT2004SelfLocator::generatePoseTemplates(), SlamSampleTemplateGenerator::generateTemplates(), GT2005StableSampleTemplateGenerator::generateTemplates(), GT2005SampleTemplateGenerator::generateTemplates(), SlamSelfLocator::landmarksObservationUpdate(), GT2005StableSelfLocator::landmarksObservationUpdate(), GT2005SelfLocator::landmarksObservationUpdate(), GT2005GoalRecognizer::notifyAboutFlags(), serialize(), and LandmarksState::update().

int LandmarksPercept::numberOfFlags
 

The number of flags actually stored in the array.

Definition at line 227 of file LandmarksPercept.h.

Referenced by addFlag(), GT2004SelfLocator::execute(), VLCImageProcessor::filterPercepts(), GT2005ImageProcessor::filterPercepts(), GT2004SelfLocator::generatePoseTemplates(), SlamSampleTemplateGenerator::generateTemplates(), GT2005StableSampleTemplateGenerator::generateTemplates(), GT2005SampleTemplateGenerator::generateTemplates(), SlamSelfLocator::landmarksObservationUpdate(), GT2005StableSelfLocator::landmarksObservationUpdate(), GT2005SelfLocator::landmarksObservationUpdate(), GT2005GoalRecognizer::notifyAboutFlags(), reset(), serialize(), and LandmarksState::update().

Goal LandmarksPercept::goals[2]
 

The array of up to 2 goals.

Definition at line 228 of file LandmarksPercept.h.

Referenced by addGoal(), GT2005ObstaclesLocator::determineSeenGoals(), GT2004SelfLocator::execute(), VLCImageProcessor::filterPercepts(), GT2005ImageProcessor::filterPercepts(), SlamSampleTemplateGenerator::getBearing(), GT2005StableSampleTemplateGenerator::getBearing(), GT2005SampleTemplateGenerator::getBearing(), GT2004SelfLocator::getBearing(), SlamSelfLocator::landmarksObservationUpdate(), GT2005StableSelfLocator::landmarksObservationUpdate(), GT2005SelfLocator::landmarksObservationUpdate(), serialize(), and GT2005BallLocator::setBallSymbols().

int LandmarksPercept::numberOfGoals
 

The number of goals actually stored in the array.

Definition at line 229 of file LandmarksPercept.h.

Referenced by addGoal(), GT2005ObstaclesLocator::determineSeenGoals(), GT2004SelfLocator::execute(), VLCImageProcessor::filterPercepts(), GT2005ImageProcessor::filterPercepts(), GT2004SelfLocator::generatePoseTemplates(), SlamSampleTemplateGenerator::generateTemplates(), GT2005StableSampleTemplateGenerator::generateTemplates(), SlamSelfLocator::landmarksObservationUpdate(), GT2005StableSelfLocator::landmarksObservationUpdate(), GT2005SelfLocator::landmarksObservationUpdate(), reset(), serialize(), and GT2005BallLocator::setBallSymbols().

double LandmarksPercept::viewAngle
 

The estimated viewing angle in field coords.

Definition at line 230 of file LandmarksPercept.h.

Referenced by reset(), and serialize().

bool LandmarksPercept::viewAngleValid
 

Tells the self locator if the view angle is valid.

Definition at line 231 of file LandmarksPercept.h.

Referenced by reset(), and serialize().

Vector3<double> LandmarksPercept::cameraOffset
 

The camera offset relative to position of the robot's neck.

Definition at line 232 of file LandmarksPercept.h.

Referenced by estimateOffsetAndValiditiesForGoal(), SlamSelfLocator::execute(), GT2005StableSelfLocator::execute(), GT2005SelfLocator::execute(), GT2004SelfLocator::execute(), SlamImageProcessor::execute(), GT2005ImageProcessor::execute(), GT2004SelfLocator::generatePoseTemplates(), SlamSampleTemplateGenerator::generateTemplates(), GT2005StableSampleTemplateGenerator::generateTemplates(), and serialize().

unsigned long LandmarksPercept::frameNumber
 

The frame number when perceived.

Definition at line 233 of file LandmarksPercept.h.

Referenced by SlamSelfLocator::execute(), GT2005StableSelfLocator::execute(), GT2005SelfLocator::execute(), GT2004SelfLocator::execute(), and GT2005GoalRecognizer::notifyAboutFlags().


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