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

BB2004Calibrator Class Reference

The class calibrates the correction values for the camera matrix. More...

#include <BB2004Calibrator.h>

Inheritance diagram for BB2004Calibrator:

Inheritance graph
[legend]
Collaboration diagram for BB2004Calibrator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BB2004Calibrator (const SensorBehaviorControlInterfaces &interfaces)
 Constructor.

virtual void execute ()
 The function executes the module.

virtual bool handleMessage (InMessage &message)
 The function handles messages sent to the module.


Private Types

enum  { numOfIndividuals = 15, waitPerGeneration = 10000 }

Private Member Functions

void evolve (const SensorData &sensorData)
 The function performs a single evolution step.


Private Attributes

CameraMatrix cameraMatrix
 The camera matrix that will be set for the image processor.

RobotPose robotPose
 A dummy robot pose for the image processor.

BallModel ballModel
 A dummy ball model for the image processor.

PlayerPoseCollection playerPoseCollection
 A dummy player pose collection for the image processor.

RobotState robotState
 A dummy robot state for the image processor.

CalibrationRequest calibrationRequest
 A dummy calibration request for the image processor.

LandmarksPercept landmarksPercept
 A dummy landmark percept for the image processor.

BallPercept ballPercept
 A dummy ball percept for the image processor.

LinesPercept linesPercept
 The lines percept that will be returned by image processor.

EdgesPercept edgesPercept
 The edges percept that will be returned by image processor.

PlayersPercept playersPercept
 A dummy players percept for the image processor.

ObstaclesPercept obstaclesPercept
 A dummy obstacles percept for the image processor.

SpecialPercept specialPercept
 A dummy special percept for the image processor.

GT2004ImageProcessor imageProcessor
 The standard image processor used for calibration.

RingBuffer< SensorData, 16 > buffer
 A buffer for the sensor data of the previous 16 frames.

Image imageBuffer
 A buffer for the previous image.

BBPopulation< CalibrationIndividualpopulation
 The population of individuals.

Vector2< double > fitness [numOfIndividuals]
 The accumulated (temporary) fitnesses of the individuals.

int evolutions
 A counter for the number of evolutions.

int count [numOfIndividuals]
 Variables that count how many fitnesses have been accumulated in "fitnesses".

unsigned timeStamp
 The beginning of the current evaluation of the individuals.


Detailed Description

The class calibrates the correction values for the camera matrix.

Definition at line 91 of file BB2004Calibrator.h.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
numOfIndividuals  The number of individuals in the population.
waitPerGeneration  The time to wait per generation in ms.

Definition at line 129 of file BB2004Calibrator.h.


Constructor & Destructor Documentation

BB2004Calibrator::BB2004Calibrator const SensorBehaviorControlInterfaces interfaces  ) 
 

Constructor.

Parameters:
interfaces The parameters of the BB2004Calibrator module.

Definition at line 75 of file BB2004Calibrator.cpp.

References numOfIndividuals.


Member Function Documentation

void BB2004Calibrator::execute  )  [virtual]
 

The function executes the module.

Implements Module.

Definition at line 100 of file BB2004Calibrator.cpp.

References RingBuffer< SensorData, 16 >::add(), evolutions, evolve(), SensorDataBuffer::frame, Image::frameNumber, SystemCall::getCurrentSystemTime(), RingBuffer< SensorData, 16 >::getNumberOfEntries(), HeadControlMode::headControlMode, imageBuffer, MotionRequest::motionType, SensorDataBuffer::numOfFrames, MotionRequest::tailRequest, TailRequest::tailRequestID, WalkRequest::walkParams, MotionRequest::walkRequest, and WalkRequest::walkType.

Here is the call graph for this function:

bool BB2004Calibrator::handleMessage InMessage message  )  [virtual]
 

The function handles messages sent to the module.

Parameters:
message A message.
Returns:
Was the message handled by this module?

Reimplemented from Module.

Definition at line 204 of file BB2004Calibrator.cpp.

void BB2004Calibrator::evolve const SensorData sensorData  )  [private]
 

The function performs a single evolution step.

Parameters:
sensorData The sensor data with the same time stamp as the image in "imageBuffer".

Definition at line 135 of file BB2004Calibrator.cpp.

References Statistics::analyze(), RobotVertices::bodyRoll, BodyPosture::bodyRollCalculatedFromLegSensors, RobotVertices::bodyTilt, BodyPosture::bodyTiltCalculatedFromLegSensors, Kinematics::calcNeckAndLegPositions(), Kinematics::calculateCameraMatrix(), SensorData::data, CalibrationIndividual::dump(), evolutions, GT2004ImageProcessor::execute(), BBPopulation< CalibrationIndividual >::extrapolate(), OutMessage::finishMessage(), fromMicroRad(), ObservationTable< 280, 200, 25 >::getClosestPoint(), SystemCall::getCurrentSystemTime(), getDebugOut(), CalibrationIndividual::getFitness(), BBPopulation< CalibrationIndividual >::getFittest(), BBPopulation< CalibrationIndividual >::getStatistics(), SystemCall::getTimeSince(), idText, BBPopulation< CalibrationIndividual >::interpolate(), RobotVertices::neckHeight, BodyPosture::neckHeightCalculatedFromLegSensors, LinesPercept::numberOfPoints, numOfIndividuals, OUTPUT, LinesPercept::points, population, OutMessage::text, waitPerGeneration, and Vector2< V >::x.

Referenced by execute().

Here is the call graph for this function:


Member Data Documentation

CameraMatrix BB2004Calibrator::cameraMatrix [private]
 

The camera matrix that will be set for the image processor.

Reimplemented from SensorBehaviorControlInterfaces.

Definition at line 113 of file BB2004Calibrator.h.

RobotPose BB2004Calibrator::robotPose [private]
 

A dummy robot pose for the image processor.

Definition at line 114 of file BB2004Calibrator.h.

BallModel BB2004Calibrator::ballModel [private]
 

A dummy ball model for the image processor.

Definition at line 115 of file BB2004Calibrator.h.

PlayerPoseCollection BB2004Calibrator::playerPoseCollection [private]
 

A dummy player pose collection for the image processor.

Definition at line 116 of file BB2004Calibrator.h.

RobotState BB2004Calibrator::robotState [private]
 

A dummy robot state for the image processor.

Reimplemented from SensorBehaviorControlInterfaces.

Definition at line 117 of file BB2004Calibrator.h.

CalibrationRequest BB2004Calibrator::calibrationRequest [private]
 

A dummy calibration request for the image processor.

Definition at line 118 of file BB2004Calibrator.h.

LandmarksPercept BB2004Calibrator::landmarksPercept [private]
 

A dummy landmark percept for the image processor.

Definition at line 119 of file BB2004Calibrator.h.

BallPercept BB2004Calibrator::ballPercept [private]
 

A dummy ball percept for the image processor.

Definition at line 120 of file BB2004Calibrator.h.

LinesPercept BB2004Calibrator::linesPercept [private]
 

The lines percept that will be returned by image processor.

Definition at line 121 of file BB2004Calibrator.h.

EdgesPercept BB2004Calibrator::edgesPercept [private]
 

The edges percept that will be returned by image processor.

Definition at line 122 of file BB2004Calibrator.h.

PlayersPercept BB2004Calibrator::playersPercept [private]
 

A dummy players percept for the image processor.

Definition at line 123 of file BB2004Calibrator.h.

ObstaclesPercept BB2004Calibrator::obstaclesPercept [private]
 

A dummy obstacles percept for the image processor.

Definition at line 124 of file BB2004Calibrator.h.

SpecialPercept BB2004Calibrator::specialPercept [private]
 

A dummy special percept for the image processor.

Definition at line 125 of file BB2004Calibrator.h.

GT2004ImageProcessor BB2004Calibrator::imageProcessor [private]
 

The standard image processor used for calibration.

Definition at line 126 of file BB2004Calibrator.h.

RingBuffer<SensorData, 16> BB2004Calibrator::buffer [private]
 

A buffer for the sensor data of the previous 16 frames.

Definition at line 127 of file BB2004Calibrator.h.

Image BB2004Calibrator::imageBuffer [private]
 

A buffer for the previous image.

Definition at line 128 of file BB2004Calibrator.h.

Referenced by execute().

BBPopulation<CalibrationIndividual> BB2004Calibrator::population [private]
 

The population of individuals.

Definition at line 138 of file BB2004Calibrator.h.

Referenced by evolve().

Vector2<double> BB2004Calibrator::fitness[numOfIndividuals] [private]
 

The accumulated (temporary) fitnesses of the individuals.

Definition at line 139 of file BB2004Calibrator.h.

int BB2004Calibrator::evolutions [private]
 

A counter for the number of evolutions.

Definition at line 140 of file BB2004Calibrator.h.

Referenced by evolve(), and execute().

int BB2004Calibrator::count[numOfIndividuals] [private]
 

Variables that count how many fitnesses have been accumulated in "fitnesses".

Definition at line 140 of file BB2004Calibrator.h.

unsigned BB2004Calibrator::timeStamp [private]
 

The beginning of the current evaluation of the individuals.

Definition at line 142 of file BB2004Calibrator.h.


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