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

BodyPercept Class Reference

The class represents the robots body percept. More...

#include <BodyPercept.h>

Collaboration diagram for BodyPercept:

Collaboration graph
[legend]
List of all members.

Public Types

enum  States {
  undefined, standing, crashed,
  rollLeft, rollRight, pickedUp
}
enum  Switches {
  backMiddle = 0, backFront, backBack,
  head, mouth, chin,
  numOfSwitches
}
 bit position of switch bits in switches value More...

enum  MouthStates { mouthOpen, mouthClosed }

Public Member Functions

 BodyPercept ()
 ~BodyPercept ()
 The frame number when perceived.

void setFrameNumber (unsigned long frameNumber)
 The functions sets the frame number.

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)
 copies another BodyPercept to this one


Static Public Member Functions

const char * getStateName (States s)

Public Attributes

Vector3< double > acceleration
unsigned long frameNumber

Private Attributes

States state
 current state of robot position if crashed or standing

int switches
 value representing pressed switches bits according to switches enum

MouthStates mouthState
 The state of the mouth.

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

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


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::States
 

Enumeration values:
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

Enumeration values:
backMiddle 
backFront 
backBack 
head 
mouth 
chin 
numOfSwitches 

Definition at line 27 of file BodyPercept.h.

enum BodyPercept::MouthStates
 

Enumeration values:
mouthOpen 
mouthClosed 

Definition at line 36 of file BodyPercept.h.


Constructor & Destructor Documentation

BodyPercept::BodyPercept  ) 
 

Definition at line 9 of file BodyPercept.cpp.

References bodyPSDHighValue, and switches.

BodyPercept::~BodyPercept  ) 
 

The frame number when perceived.

Definition at line 18 of file BodyPercept.cpp.


Member Function Documentation

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::setState const States  s  )  [inline]
 

Definition at line 51 of file BodyPercept.h.

Referenced by GT2004SensorDataProcessor::execute().

States BodyPercept::getState  )  const [inline]
 

Definition at line 52 of file BodyPercept.h.

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

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

Definition at line 54 of file BodyPercept.h.

References switches.

Referenced by GT2004SensorDataProcessor::execute().

int BodyPercept::getSwitches  )  const [inline]
 

Definition at line 55 of file BodyPercept.h.

References switches.

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

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

Definition at line 57 of file BodyPercept.h.

Referenced by GT2004SensorDataProcessor::execute().

MouthStates BodyPercept::getMouthState  )  const [inline]
 

Definition at line 58 of file BodyPercept.h.

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

void BodyPercept::setBodyPSDHighValue bool  value  )  [inline]
 

Definition at line 60 of file BodyPercept.h.

References bodyPSDHighValue.

Referenced by GT2004SensorDataProcessor::execute().

bool BodyPercept::getBodyPSDHighValue  )  const [inline]
 

Definition at line 61 of file BodyPercept.h.

References bodyPSDHighValue.

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

void BodyPercept::setBodyPSDDistance double  value  )  [inline]
 

Definition at line 63 of file BodyPercept.h.

References bodyPSDDistance.

Referenced by GT2004SensorDataProcessor::execute().

double BodyPercept::getBodyPSDDistance  )  const [inline]
 

Definition at line 64 of file BodyPercept.h.

References bodyPSDDistance.

Referenced by GT2004RobotStateDetector::execute().

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(), and switches.

Here is the call graph for this function:

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

Definition at line 69 of file BodyPercept.h.


Member Data Documentation

Vector3<double> BodyPercept::acceleration
 

Definition at line 38 of file BodyPercept.h.

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

unsigned long BodyPercept::frameNumber
 

Definition at line 44 of file BodyPercept.h.

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

States BodyPercept::state [private]
 

current state of robot position if crashed or standing

Definition at line 89 of file BodyPercept.h.

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().

MouthStates BodyPercept::mouthState [private]
 

The state of the mouth.

Definition at line 95 of file BodyPercept.h.

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().

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().


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