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>

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)
 The function adds a flag to the flag array.

void addFlag (Flag::FlagType type, bool ownTeamColorIsBlue, const ConditionalBoundary &boundary)
 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 Vector2< double > &leftPost, const Vector2< double > &rightPost, const ConditionalBoundary &boundary)
 The function adds a goal to the goal array.

void addGoal (colorClass color, bool ownTeamColorIsBlue, const ConditionalBoundary &boundary)
 The function adds a goal to the goal array.

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


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.

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 156 of file LandmarksPercept.h.


Constructor & Destructor Documentation

LandmarksPercept::LandmarksPercept  ) 
 

Constructor.

Resets the object.

Definition at line 47 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 52 of file LandmarksPercept.cpp.

References numberOfFlags, and numberOfGoals.

Referenced by GT2004ImageProcessor::execute(), RasterImageProcessor::init(), and LandmarksPercept().

void LandmarksPercept::addFlag Flag::FlagType  type,
const Vector2< double > &  position,
const ConditionalBoundary boundary
 

The function adds a flag to the flag array.

Definition at line 58 of file LandmarksPercept.cpp.

References flags, numberOfFlags, Flag::position, and Flag::type.

Referenced by RasterImageProcessor::addFlag().

void LandmarksPercept::addFlag Flag::FlagType  type,
bool  ownTeamColorIsBlue,
const ConditionalBoundary boundary
 

The function adds a flag to the flag array.

Definition at line 73 of file LandmarksPercept.cpp.

References 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 112 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.

Referenced by BoxSpecialist::executePostProcessing().

Here is the call graph for this function:

void LandmarksPercept::addGoal colorClass  color,
const Vector2< double > &  leftPost,
const Vector2< double > &  rightPost,
const ConditionalBoundary boundary
 

The function adds a goal to the goal array.

Definition at line 170 of file LandmarksPercept.cpp.

References Goal::color, goals, Goal::leftPost, numberOfGoals, and Goal::rightPost.

Referenced by BoxSpecialist::fusionGoal(), GoalRecognizer::scanLinesForGoals(), GT2004GoalRecognizer::scanLinesForGoals(), and BoxSpecialist::searchGoal().

void LandmarksPercept::addGoal colorClass  color,
bool  ownTeamColorIsBlue,
const ConditionalBoundary boundary
 

The function adds a goal to the goal array.

Definition at line 185 of file LandmarksPercept.cpp.

References colorClass, Vector2< V >::x, and Vector2< V >::y.

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

Calculates distance and angle for each goal.

Todo:
distinguish between height of left and right post

isOnBorder(flag.?.?) not checked

Definition at line 218 of file LandmarksPercept.cpp.

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

Referenced by BoxSpecialist::executePostProcessing(), GoalRecognizer::scanLinesForGoals(), and GT2004GoalRecognizer::scanLinesForGoals().

Here is the call graph for this function:


Member Data Documentation

Flag LandmarksPercept::flags[4]
 

The array of up to 4 flags.

Definition at line 159 of file LandmarksPercept.h.

Referenced by addFlag(), GT2004SelfLocator::execute(), GT2004SelfLocator::generatePoseTemplates(), operator<<(), operator>>(), and LandmarksState::update().

int LandmarksPercept::numberOfFlags
 

The number of flags actually stored in the array.

Definition at line 160 of file LandmarksPercept.h.

Referenced by addFlag(), GT2004SelfLocator::execute(), GT2004SelfLocator::generatePoseTemplates(), operator<<(), operator>>(), reset(), and LandmarksState::update().

Goal LandmarksPercept::goals[2]
 

The array of up to 2 goals.

Definition at line 161 of file LandmarksPercept.h.

Referenced by addGoal(), NoOdometrySelfLocator::execute(), GT2004SelfLocator::execute(), GT2004BallLocator::execute(), GT2004SelfLocator::getBearing(), operator<<(), and operator>>().

int LandmarksPercept::numberOfGoals
 

The number of goals actually stored in the array.

Definition at line 162 of file LandmarksPercept.h.

Referenced by addGoal(), NoOdometrySelfLocator::execute(), GT2004SelfLocator::execute(), GT2004BallLocator::execute(), GT2004SelfLocator::generatePoseTemplates(), operator<<(), operator>>(), and reset().

Vector3<double> LandmarksPercept::cameraOffset
 

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

Definition at line 163 of file LandmarksPercept.h.

Referenced by NoOdometrySelfLocator::execute(), GT2004SelfLocator::execute(), GT2004ImageProcessor::execute(), GT2004SelfLocator::generatePoseTemplates(), RasterImageProcessor::init(), operator<<(), and operator>>().

unsigned long LandmarksPercept::frameNumber
 

The frame number when perceived.

Definition at line 164 of file LandmarksPercept.h.

Referenced by NoOdometrySelfLocator::execute(), GT2004SelfLocator::execute(), operator<<(), and operator>>().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:09:16 2004 for GT2004 by doxygen 1.3.6