BodyPercept Class Reference

#include <BodyPercept.h>

List of all members.

Public Types

 undefined
 standing
 crashed
 rollLeft
 rollRight
 pickedUp
 backMiddle = 0
 backFront
 backBack
 head
 mouth
 chin
 numOfSwitches
 mouthOpen
 mouthClosed
enum  States {
  undefined, standing, crashed, rollLeft,
  rollRight, pickedUp
}
enum  Switches {
  backMiddle = 0, backFront, backBack, head,
  mouth, chin, numOfSwitches
}
enum  MouthStates { mouthOpen, mouthClosed }

Public Member Functions

 BodyPercept ()
 ~BodyPercept ()
void setFrameNumber (unsigned long frameNumber)
void setState (const States s)
States getState () const
void setSwitches (const int s)
int getSwitches () const
void setMouthState (const MouthStates t)
MouthStates getMouthState () const
void setBodyPSDHighValue (bool value)
bool getBodyPSDHighValue () const
void setBodyPSDDistance (double value)
double getBodyPSDDistance () const
void operator= (const BodyPercept &other)

Static Public Member Functions

static const char * getStateName (States s)

Public Attributes

Vector3< double > acceleration
unsigned long frameNumber

Private Attributes

States state
int switches
MouthStates mouthState
bool bodyPSDHighValue
double bodyPSDDistance


Detailed Description

The class represents the robots body percept

The percept consists of current switches and a variable containing whether the robot stands or is crashed.

Definition at line 19 of file BodyPercept.h.


Member Enumeration Documentation

enum BodyPercept::MouthStates

Enumerator:
mouthOpen 
mouthClosed 

Definition at line 36 of file BodyPercept.h.

enum BodyPercept::States

Enumerator:
undefined 
standing 
crashed 
rollLeft 
rollRight 
pickedUp 

Definition at line 23 of file BodyPercept.h.

enum BodyPercept::Switches

bit position of switch bits in switches value

Enumerator:
backMiddle 
backFront 
backBack 
head 
mouth 
chin 
numOfSwitches 

Definition at line 27 of file BodyPercept.h.


Constructor & Destructor Documentation

BodyPercept::BodyPercept (  ) 

Definition at line 9 of file BodyPercept.cpp.

References acceleration, bodyPSDHighValue, mouthClosed, mouthState, state, switches, and undefined.

BodyPercept::~BodyPercept (  ) 

The frame number when perceived.

Definition at line 18 of file BodyPercept.cpp.


Member Function Documentation

double BodyPercept::getBodyPSDDistance (  )  const [inline]

Definition at line 64 of file BodyPercept.h.

References bodyPSDDistance.

Referenced by GT2004RobotStateDetector::execute().

bool BodyPercept::getBodyPSDHighValue (  )  const [inline]

Definition at line 61 of file BodyPercept.h.

References bodyPSDHighValue.

Referenced by GT2004RobotStateDetector::execute(), and operator=().

MouthStates BodyPercept::getMouthState (  )  const [inline]

Definition at line 58 of file BodyPercept.h.

References mouthState.

Referenced by GT2004RobotStateDetector::execute(), and operator=().

States BodyPercept::getState (  )  const [inline]

Definition at line 52 of file BodyPercept.h.

References state.

Referenced by GT2004RobotStateDetector::execute(), and operator=().

static const char* BodyPercept::getStateName ( States  s  )  [inline, static]

Definition at line 69 of file BodyPercept.h.

References crashed, pickedUp, rollLeft, rollRight, standing, and undefined.

int BodyPercept::getSwitches (  )  const [inline]

Definition at line 55 of file BodyPercept.h.

References switches.

Referenced by GT2004RobotStateDetector::execute(), and operator=().

void BodyPercept::operator= ( const BodyPercept other  ) 

copies another BodyPercept to this one

Definition at line 22 of file BodyPercept.cpp.

References acceleration, bodyPSDHighValue, getBodyPSDHighValue(), getMouthState(), getState(), getSwitches(), mouthState, state, and switches.

void BodyPercept::setBodyPSDDistance ( double  value  )  [inline]

Definition at line 63 of file BodyPercept.h.

References bodyPSDDistance.

Referenced by GT2004SensorDataProcessor::execute().

void BodyPercept::setBodyPSDHighValue ( bool  value  )  [inline]

Definition at line 60 of file BodyPercept.h.

References bodyPSDHighValue.

Referenced by GT2004SensorDataProcessor::execute().

void BodyPercept::setFrameNumber ( unsigned long  frameNumber  )  [inline]

The functions sets the frame number

Definition at line 49 of file BodyPercept.h.

Referenced by GT2004SensorDataProcessor::execute().

void BodyPercept::setMouthState ( const MouthStates  t  )  [inline]

Definition at line 57 of file BodyPercept.h.

References mouthState.

Referenced by GT2004SensorDataProcessor::execute().

void BodyPercept::setState ( const States  s  )  [inline]

Definition at line 51 of file BodyPercept.h.

References state.

Referenced by GT2004SensorDataProcessor::execute().

void BodyPercept::setSwitches ( const int  s  )  [inline]

Definition at line 54 of file BodyPercept.h.

References switches.

Referenced by GT2004SensorDataProcessor::execute().


Member Data Documentation

Vector3<double> BodyPercept::acceleration

Definition at line 38 of file BodyPercept.h.

Referenced by BodyPercept(), GT2004SensorDataProcessor::execute(), GT2004RobotStateDetector::execute(), and operator=().

double BodyPercept::bodyPSDDistance [private]

The measured distance (0 - 5 cm) of objects in front of the body PSD

Definition at line 102 of file BodyPercept.h.

Referenced by getBodyPSDDistance(), and setBodyPSDDistance().

bool BodyPercept::bodyPSDHighValue [private]

Flag, set to true, if the body PSD has a high value, indicating something in front of the robot

Definition at line 99 of file BodyPercept.h.

Referenced by BodyPercept(), getBodyPSDHighValue(), operator=(), and setBodyPSDHighValue().

unsigned long BodyPercept::frameNumber

Definition at line 44 of file BodyPercept.h.

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

MouthStates BodyPercept::mouthState [private]

The state of the mouth

Definition at line 95 of file BodyPercept.h.

Referenced by BodyPercept(), getMouthState(), operator=(), and setMouthState().

States BodyPercept::state [private]

current state of robot position if crashed or standing

Definition at line 89 of file BodyPercept.h.

Referenced by BodyPercept(), getState(), operator=(), and setState().

int BodyPercept::switches [private]

value representing pressed switches bits according to switches enum

Definition at line 92 of file BodyPercept.h.

Referenced by BodyPercept(), getSwitches(), operator=(), and setSwitches().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:19:26 2006 for DT2005.panorama by  doxygen 1.4.7