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

MotionRatingBehaviorControl Class Reference

A Behavior that is used by the Darmstadt Dribbling Dackels for the RoboCup German Open 2004. More...

#include <MotionRatingBehaviorControl.h>

Inheritance diagram for MotionRatingBehaviorControl:

Inheritance graph
[legend]
Collaboration diagram for MotionRatingBehaviorControl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MotionRatingBehaviorControl (BehaviorControlInterfaces &interfaces)
 Constructor.

 ~MotionRatingBehaviorControl ()
 destructor

virtual bool handleMessage (InMessage &message)
 Called from a MessageQueue to distribute messages.

virtual void execute ()
 When doing a debug build, we save the time, when we entered the module, so we can find endless loops.


Protected Types

enum  {
  sleep, localise, prepare,
  wait, localisepre, walk,
  rotate, stop, localiseaft,
  report
}

Protected Attributes

unsigned long pingTimeout
unsigned long lastMessage
int path
int state
int paramSetId
int walkCount
int currentWalk
bool paused
double distTolerance
double angleTolerance
int pathOffset
Track track
Pose2D startpoint
Pose2D endpoint
unsigned long starttime
unsigned long endtime
unsigned long startlocalise
unsigned long startrotate
double totalDistance
unsigned long totalTime
Vector2< double > p1
Vector2< double > p2
bool showMessages

Private Member Functions

void reset ()
void setPoints ()
bool gotoPoint (Pose2D, bool)
bool gotoPoint (Vector2< double >, bool)
void setWalkMotionRequest (double distance, double phi, double theta, bool safe)
bool stand ()
void playDead ()
bool doLocalise ()
MotionRatingBehaviorMessage::States encodeState ()

Detailed Description

A Behavior that is used by the Darmstadt Dribbling Dackels for the RoboCup German Open 2004.

Praktikum-Group: determine walk-speed and valuate stability of walk-type

Definition at line 29 of file MotionRatingBehaviorControl.h.


Member Enumeration Documentation

anonymous enum [protected]
 

Enumeration values:
sleep 
localise 
prepare 
wait 
localisepre 
walk 
rotate 
stop 
localiseaft 
report 

Definition at line 45 of file MotionRatingBehaviorControl.h.


Constructor & Destructor Documentation

MotionRatingBehaviorControl::MotionRatingBehaviorControl BehaviorControlInterfaces interfaces  ) 
 

Constructor.

Parameters:
interfaces The paramters of the BehaviorControl module.

Definition at line 14 of file MotionRatingBehaviorControl.cpp.

References angleTolerance, distTolerance, path, pathOffset, pingTimeout, reset(), showMessages, startlocalise, and startrotate.

Here is the call graph for this function:

MotionRatingBehaviorControl::~MotionRatingBehaviorControl  ) 
 

destructor

Definition at line 33 of file MotionRatingBehaviorControl.cpp.


Member Function Documentation

bool MotionRatingBehaviorControl::handleMessage InMessage msg  )  [virtual]
 

Called from a MessageQueue to distribute messages.

Use message.getMessageID to decide if the message is relavant for the MesssageHandler derivate. Use message.bin, message.text or message.config as In streams to get the data from.

Parameters:
message The message that can be read.
Returns:
true if the message was read (handled).

Reimplemented from Module.

Definition at line 37 of file MotionRatingBehaviorControl.cpp.

References Vector2< V >::angle(), MotionRatingBehaviorMessage::averageSpeed, InMessage::bin, MotionRatingBehaviorMessage::currentSpeed, MotionRatingBehaviorMessage::currentWalk, currentWalk, MotionRatingBehaviorMessage::data, encodeState(), MotionRatingBehaviorMessage::end, MotionRatingBehaviorControl::Track::end, SystemCall::getCurrentSystemTime(), InMessage::getMessageID(), SystemCall::getRemainingPower(), idMotionRatingBehaviorMessage, idText, localise, normalize(), OUTPUT, MotionRatingBehaviorMessage::paramSetId, paramSetId, path, MotionRatingBehaviorMessage::remainingPower, Pose2D::rotation, setPoints(), MotionRatingBehaviorMessage::start, MotionRatingBehaviorControl::Track::start, startlocalise, MotionRatingBehaviorMessage::state, track, Pose2D::translation, MotionRatingBehaviorMessage::type, MotionRatingBehaviorMessage::walkCount, and walkCount.

Here is the call graph for this function:

void MotionRatingBehaviorControl::execute  )  [virtual]
 

When doing a debug build, we save the time, when we entered the module, so we can find endless loops.

Reimplemented from Module.

Definition at line 103 of file MotionRatingBehaviorControl.cpp.

References MotionRatingBehaviorMessage::averageSpeed, MotionRatingBehaviorMessage::currentSpeed, MotionRatingBehaviorMessage::currentWalk, currentWalk, MotionRatingBehaviorMessage::data, MotionRatingBehaviorMessage::distance, doLocalise(), encodeState(), endtime, MotionInfo::executedMotionRequest, MotionRatingBehaviorMessage::finished, SystemCall::getCurrentSystemTime(), SystemCall::getRemainingPower(), SystemCall::getTimeSince(), RobotPose::getValidity(), gotoPoint(), HeadControlMode::headControlMode, idMotionRatingBehaviorMessage, idText, localise, localiseaft, localisepre, MotionRequest::motionType, OUTPUT, MotionRatingBehaviorMessage::paramSetId, paramSetId, pathOffset, pingTimeout, playDead(), prepare, MotionRatingBehaviorMessage::remainingPower, MotionRatingBehaviorMessage::report, report, reset(), Pose2D::rotation, setPoints(), showMessages, stand(), startlocalise, startpoint, starttime, MotionRatingBehaviorMessage::state, stop, MotionRatingBehaviorMessage::time, totalDistance, totalTime, Pose2D::translation, MotionRatingBehaviorMessage::type, MotionRatingBehaviorMessage::walkCount, walkCount, Vector2< double >::x, and Vector2< double >::y.

Here is the call graph for this function:

void MotionRatingBehaviorControl::reset  )  [private]
 

Definition at line 288 of file MotionRatingBehaviorControl.cpp.

References currentWalk, paramSetId, totalDistance, totalTime, and walkCount.

Referenced by execute(), and MotionRatingBehaviorControl().

void MotionRatingBehaviorControl::setPoints  )  [private]
 

Definition at line 298 of file MotionRatingBehaviorControl.cpp.

References MotionRatingBehaviorControl::Track::end, pathOffset, MotionRatingBehaviorControl::Track::start, startpoint, and track.

Referenced by execute(), and handleMessage().

bool MotionRatingBehaviorControl::gotoPoint Pose2D  ,
bool 
[private]
 

Definition at line 304 of file MotionRatingBehaviorControl.cpp.

References Vector2< V >::abs(), alpha, Vector2< V >::angle(), angleTolerance, distTolerance, Pose2D::getAngle(), idText, normalize(), OUTPUT, Pose2D::rotation, setWalkMotionRequest(), showMessages, theta(), Pose2D::translation, Vector2< V >::x, and Vector2< V >::y.

Referenced by execute().

Here is the call graph for this function:

bool MotionRatingBehaviorControl::gotoPoint Vector2< double >  ,
bool 
[private]
 

Definition at line 341 of file MotionRatingBehaviorControl.cpp.

References Vector2< V >::abs(), Vector2< V >::angle(), distTolerance, idText, normalize(), OUTPUT, point, Pose2D::rotation, setWalkMotionRequest(), showMessages, theta(), Pose2D::translation, Vector2< V >::x, and Vector2< V >::y.

Here is the call graph for this function:

void MotionRatingBehaviorControl::setWalkMotionRequest double  distance,
double  phi,
double  theta,
bool  safe
[private]
 

Definition at line 363 of file MotionRatingBehaviorControl.cpp.

References MotionRequest::motionType, Pose2D::rotation, theta(), Pose2D::translation, WalkRequest::walkParams, MotionRequest::walkRequest, WalkRequest::walkType, Vector2< double >::x, and Vector2< double >::y.

Referenced by gotoPoint().

Here is the call graph for this function:

bool MotionRatingBehaviorControl::stand  )  [private]
 

Definition at line 377 of file MotionRatingBehaviorControl.cpp.

References MotionInfo::executedMotionRequest, and MotionRequest::motionType.

Referenced by doLocalise(), and execute().

void MotionRatingBehaviorControl::playDead  )  [private]
 

Definition at line 383 of file MotionRatingBehaviorControl.cpp.

References MotionRequest::motionType.

Referenced by execute().

bool MotionRatingBehaviorControl::doLocalise  )  [private]
 

Definition at line 389 of file MotionRatingBehaviorControl.cpp.

References RobotPose::getValidity(), and stand().

Referenced by execute().

Here is the call graph for this function:

MotionRatingBehaviorMessage::States MotionRatingBehaviorControl::encodeState  )  [private]
 

Definition at line 406 of file MotionRatingBehaviorControl.cpp.

References localise, localiseaft, localisepre, paramSetId, prepare, report, and stop.

Referenced by execute(), and handleMessage().


Member Data Documentation

unsigned long MotionRatingBehaviorControl::pingTimeout [protected]
 

Definition at line 47 of file MotionRatingBehaviorControl.h.

Referenced by execute(), and MotionRatingBehaviorControl().

unsigned long MotionRatingBehaviorControl::lastMessage [protected]
 

Definition at line 48 of file MotionRatingBehaviorControl.h.

int MotionRatingBehaviorControl::path [protected]
 

Definition at line 50 of file MotionRatingBehaviorControl.h.

Referenced by handleMessage(), and MotionRatingBehaviorControl().

int MotionRatingBehaviorControl::state [protected]
 

Definition at line 51 of file MotionRatingBehaviorControl.h.

int MotionRatingBehaviorControl::paramSetId [protected]
 

Definition at line 52 of file MotionRatingBehaviorControl.h.

Referenced by encodeState(), execute(), handleMessage(), and reset().

int MotionRatingBehaviorControl::walkCount [protected]
 

Definition at line 53 of file MotionRatingBehaviorControl.h.

Referenced by execute(), handleMessage(), and reset().

int MotionRatingBehaviorControl::currentWalk [protected]
 

Definition at line 54 of file MotionRatingBehaviorControl.h.

Referenced by execute(), handleMessage(), and reset().

bool MotionRatingBehaviorControl::paused [protected]
 

Definition at line 55 of file MotionRatingBehaviorControl.h.

double MotionRatingBehaviorControl::distTolerance [protected]
 

Definition at line 57 of file MotionRatingBehaviorControl.h.

Referenced by gotoPoint(), and MotionRatingBehaviorControl().

double MotionRatingBehaviorControl::angleTolerance [protected]
 

Definition at line 58 of file MotionRatingBehaviorControl.h.

Referenced by gotoPoint(), and MotionRatingBehaviorControl().

int MotionRatingBehaviorControl::pathOffset [protected]
 

Definition at line 65 of file MotionRatingBehaviorControl.h.

Referenced by execute(), MotionRatingBehaviorControl(), and setPoints().

Track MotionRatingBehaviorControl::track [protected]
 

Definition at line 67 of file MotionRatingBehaviorControl.h.

Referenced by handleMessage(), and setPoints().

Pose2D MotionRatingBehaviorControl::startpoint [protected]
 

Definition at line 69 of file MotionRatingBehaviorControl.h.

Referenced by execute(), and setPoints().

Pose2D MotionRatingBehaviorControl::endpoint [protected]
 

Definition at line 69 of file MotionRatingBehaviorControl.h.

unsigned long MotionRatingBehaviorControl::starttime [protected]
 

Definition at line 71 of file MotionRatingBehaviorControl.h.

Referenced by execute().

unsigned long MotionRatingBehaviorControl::endtime [protected]
 

Definition at line 72 of file MotionRatingBehaviorControl.h.

Referenced by execute().

unsigned long MotionRatingBehaviorControl::startlocalise [protected]
 

Definition at line 73 of file MotionRatingBehaviorControl.h.

Referenced by execute(), handleMessage(), and MotionRatingBehaviorControl().

unsigned long MotionRatingBehaviorControl::startrotate [protected]
 

Definition at line 74 of file MotionRatingBehaviorControl.h.

Referenced by MotionRatingBehaviorControl().

double MotionRatingBehaviorControl::totalDistance [protected]
 

Definition at line 76 of file MotionRatingBehaviorControl.h.

Referenced by execute(), and reset().

unsigned long MotionRatingBehaviorControl::totalTime [protected]
 

Definition at line 77 of file MotionRatingBehaviorControl.h.

Referenced by execute(), and reset().

Vector2<double> MotionRatingBehaviorControl::p1 [protected]
 

Definition at line 79 of file MotionRatingBehaviorControl.h.

Vector2<double> MotionRatingBehaviorControl::p2 [protected]
 

Definition at line 79 of file MotionRatingBehaviorControl.h.

bool MotionRatingBehaviorControl::showMessages [protected]
 

Definition at line 81 of file MotionRatingBehaviorControl.h.

Referenced by execute(), gotoPoint(), and MotionRatingBehaviorControl().


The documentation for this class was generated from the following files:
Generated on Mon Mar 20 22:18:00 2006 for GT2005 by doxygen 1.3.6