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

KalmanProcessModelBase Class Reference

Virtual base class defining the functions necessary to implement a KalmanBallLocator process model. More...

#include <BaseModel.h>

Inheritance diagram for KalmanProcessModelBase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 KalmanProcessModelBase ()
virtual ~KalmanProcessModelBase ()
virtual const char * getModelName () const=0
 Returns the name of the process model.

virtual int getStateDim () const=0
 Returns the dimension of the state.

virtual void getP (double *pDest) const=0
 Retrieves the internal kalman filter covariance matrix.

virtual void getQ (double *pDest) const=0
 Retrieves the process error covariance matrix.

virtual void setQ (const double *pSource)=0
 Sets the process error covariance matrix.

virtual void getR (double *pDest) const=0
 Retrieves the measurement error covariance matrix.

virtual void setR (double *pSource)=0
 Sets the measurement error covariance matrix.

virtual void reset ()=0
 Resets the process model.

virtual KalmanUpdateResult update (double time, double x, double y, const RobotPose &pose, double panningVelocity)=0
 Performs an update step of the process model.

virtual KalmanPredictResult predict (double time)=0
 Permorms a prediction of the ball state.

virtual void adapt (const OdometryData &lastOdometry, const OdometryData &actualOdometry)=0
 Function to adapt the state of the model when position and rotation of the robot changes.

virtual bool isNonSensePos (double x, double y) const
 Returns true, if the passed ball position is nonsense (because it is far away from the field).

virtual bool useModel () const
 Returns true, if the model is to be used.

virtual OuttoStream (Out &stream) const
 Writes data of the actual process model data to a stream (for debugging).

virtual InfromStream (In &stream)
 Reads settings for a process model from a stream (e.g.


Protected Member Functions

void OutputException (const char *pszLoc, MVException &m) const
 Outputs information about the process model that caused an exception and information about the type of exception.


Protected Attributes

bool bUseModel
 true, if the model is to be used


Static Protected Attributes

double pi = 3.1415926535897932384626433832795
 constant pi

double pi2 = 2*3.1415926535897932384626433832795
 constant 2*pi

double dFieldDiagonalLength
 1.2*length of field diagonal


Detailed Description

Virtual base class defining the functions necessary to implement a KalmanBallLocator process model.

Definition at line 65 of file BaseModel.h.


Constructor & Destructor Documentation

KalmanProcessModelBase::KalmanProcessModelBase  ) 
 

Definition at line 31 of file BaseModel.cpp.

virtual KalmanProcessModelBase::~KalmanProcessModelBase  )  [inline, virtual]
 

Definition at line 69 of file BaseModel.h.


Member Function Documentation

virtual const char* KalmanProcessModelBase::getModelName  )  const [pure virtual]
 

Returns the name of the process model.

Returns:
name of process model

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by OutputException(), and toStream().

virtual int KalmanProcessModelBase::getStateDim  )  const [pure virtual]
 

Returns the dimension of the state.

Returns:
dimension of the state

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by toStream().

virtual void KalmanProcessModelBase::getP double *  pDest  )  const [pure virtual]
 

Retrieves the internal kalman filter covariance matrix.

Parameters:
pDest destination to store the covariance matrix to

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

virtual void KalmanProcessModelBase::getQ double *  pDest  )  const [pure virtual]
 

Retrieves the process error covariance matrix.

Parameters:
pDest destination to store the covariance matrix to

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by toStream().

virtual void KalmanProcessModelBase::setQ const double *  pSource  )  [pure virtual]
 

Sets the process error covariance matrix.

Parameters:
pSource array containing the covariance matrix entries

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by fromStream().

virtual void KalmanProcessModelBase::getR double *  pDest  )  const [pure virtual]
 

Retrieves the measurement error covariance matrix.

Parameters:
pDest destination to store the covariance matrix to

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by toStream().

virtual void KalmanProcessModelBase::setR double *  pSource  )  [pure virtual]
 

Sets the measurement error covariance matrix.

Parameters:
pSource array containing the covariance matrix entries

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by fromStream().

virtual void KalmanProcessModelBase::reset  )  [pure virtual]
 

Resets the process model.

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

Referenced by fromStream().

virtual KalmanUpdateResult KalmanProcessModelBase::update double  time,
double  x,
double  y,
const RobotPose pose,
double  panningVelocity
[pure virtual]
 

Performs an update step of the process model.

Parameters:
time time in seconds when the percepts were determined
x measured x-position of the ball in meters relative to the robot
y measured y-position of the ball in meters relative to the robot
pose the current robot pose, used for visualization
panningVelocity the head panning angular velocity, used to adjust the R covariance matrix
Returns:
the update results of the process model

Implemented in KalmanConstantSpeedModel.

virtual KalmanPredictResult KalmanProcessModelBase::predict double  time  )  [pure virtual]
 

Permorms a prediction of the ball state.

Parameters:
time actual time in seconds
Returns:
the predict results of the process model

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

virtual void KalmanProcessModelBase::adapt const OdometryData lastOdometry,
const OdometryData actualOdometry
[pure virtual]
 

Function to adapt the state of the model when position and rotation of the robot changes.

Parameters:
lastOdometry last odometry of robot (original values in millimeters are used)
actualOdometry actual odometry of robot (original values in millimeters are used)

Implemented in KalmanConstantSpeedModel, and KalmanFixedPositionModel.

bool KalmanProcessModelBase::isNonSensePos double  x,
double  y
const [virtual]
 

Returns true, if the passed ball position is nonsense (because it is far away from the field).

Returns:
true, if passed position is nonsense

Definition at line 36 of file BaseModel.cpp.

References dFieldDiagonalLength.

virtual bool KalmanProcessModelBase::useModel  )  const [inline, virtual]
 

Returns true, if the model is to be used.

Returns:
true, if model is to be used

Definition at line 145 of file BaseModel.h.

References bUseModel.

Out & KalmanProcessModelBase::toStream Out stream  )  const [virtual]
 

Writes data of the actual process model data to a stream (for debugging).

Parameters:
stream stream to write the process model data to
Returns:
reference to the passed stream

Definition at line 45 of file BaseModel.cpp.

References bUseModel, getModelName(), getQ(), getR(), and getStateDim().

Here is the call graph for this function:

In & KalmanProcessModelBase::fromStream In stream  )  [virtual]
 

Reads settings for a process model from a stream (e.g.

when covariance matrices are changed by user.

Parameters:
stream stream to read settings from
Returns:
reference to passed stream

Definition at line 75 of file BaseModel.cpp.

References bUseModel, reset(), setQ(), and setR().

Here is the call graph for this function:

void KalmanProcessModelBase::OutputException const char *  pszLoc,
MVException m
const [protected]
 

Outputs information about the process model that caused an exception and information about the type of exception.

Parameters:
pszLoc description of calculation step the exception occured in
m reference to exception

Definition at line 105 of file BaseModel.cpp.

References MVException::getDescription(), getModelName(), idText, and OUTPUT.

Referenced by KalmanFixedPositionModel::predict(), KalmanConstantSpeedModel::predict(), KalmanFixedPositionModel::update(), and KalmanConstantSpeedModel::update().

Here is the call graph for this function:


Member Data Documentation

bool KalmanProcessModelBase::bUseModel [protected]
 

true, if the model is to be used

Definition at line 171 of file BaseModel.h.

Referenced by fromStream(), toStream(), and useModel().

double KalmanProcessModelBase::pi = 3.1415926535897932384626433832795 [static, protected]
 

constant pi

Definition at line 13 of file BaseModel.cpp.

Referenced by KalmanFixedPositionModel::update(), and KalmanConstantSpeedModel::update().

double KalmanProcessModelBase::pi2 = 2*3.1415926535897932384626433832795 [static, protected]
 

constant 2*pi

Definition at line 14 of file BaseModel.cpp.

double KalmanProcessModelBase::dFieldDiagonalLength [static, protected]
 

Initial value:

  1.2*sqrt((2.0*xPosOpponentGoal)*(2.0*xPosOpponentGoal) +
           (2.0*yPosLeftFlags)*(2.0*yPosLeftFlags))
1.2*length of field diagonal

Definition at line 15 of file BaseModel.cpp.

Referenced by isNonSensePos().


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