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

KickLogger Class Reference

Runs in parallel to a xabsl behavior control and logs the preconditions and results of each kick. More...

#include <KickLogger.h>

Inheritance diagram for KickLogger:

Inheritance graph
[legend]
Collaboration diagram for KickLogger:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KickLogger (BehaviorControlInterfaces &interfaces)
 Constructor.

 ~KickLogger ()
 destructor

void execute ()
 Executes the logger.


Private Types

enum  State {
  initial, kickRequested, kickStarted,
  kickFinished, waitingForBall, wait
}
 Different states of the shoot logger. More...


Private Member Functions

void changeState (State newState)
 Changes the state of the logger.

void record ()
 Writes a collected record if requested by a debug key to the debug message queue.

double getBallX (Pose2D from)
 Returns the relative x position of a ball position.

double getBallY (Pose2D from)
 Returns the relative y position of a ball position.


Private Attributes

State state
 The state of the logger.

unsigned long timeOfLastStateChange
 The time of the last state change.

KickCase kick
 The kick record.

SpecialActionRequest::SpecialActionID kickID
 The requested kick.

OdometryData odometryDataWhenKickWasStarted
 The odometry data when the kick was started.


Detailed Description

Runs in parallel to a xabsl behavior control and logs the preconditions and results of each kick.

Author:
Martin Lötzsch

Definition at line 23 of file KickLogger.h.


Member Enumeration Documentation

enum KickLogger::State [private]
 

Different states of the shoot logger.

Enumeration values:
initial 
kickRequested 
kickStarted 
kickFinished 
waitingForBall 
wait 

Definition at line 40 of file KickLogger.h.


Constructor & Destructor Documentation

KickLogger::KickLogger BehaviorControlInterfaces interfaces  ) 
 

Constructor.

Parameters:
interfaces The paramters of the BehaviorControl module.

Definition at line 14 of file KickLogger.cpp.

KickLogger::~KickLogger  ) 
 

destructor

Definition at line 20 of file KickLogger.cpp.


Member Function Documentation

void KickLogger::execute  ) 
 

Executes the logger.

Definition at line 24 of file KickLogger.cpp.

References ASSERT, KickCase::ballTR, KickCase::ballTS, KickCase::ballXA, KickCase::ballXR, KickCase::ballXS, KickCase::ballYA, KickCase::ballYR, KickCase::ballYS, changeState(), Geometry::distanceTo(), MotionInfo::executedMotionRequest, getBallX(), getBallY(), RobotPose::getPose(), SystemCall::getTimeSince(), kick, kickFinished, kickID, kickRequested, kickStarted, Pose2D::minusDiff(), MotionRequest::motionType, odometryDataWhenKickWasStarted, record(), BallModel::seen, MotionRequest::specialActionRequest, SpecialActionRequest::specialActionType, KickCase::tA, timeOfLastStateChange, SeenBallPosition::timeWhenLastSeen, wait, and waitingForBall.

Referenced by GT2004BehaviorControl::execute().

Here is the call graph for this function:

void KickLogger::changeState State  newState  )  [private]
 

Changes the state of the logger.

Definition at line 121 of file KickLogger.cpp.

References SystemCall::getCurrentSystemTime(), and timeOfLastStateChange.

Referenced by execute().

Here is the call graph for this function:

void KickLogger::record  )  [private]
 

Writes a collected record if requested by a debug key to the debug message queue.

Definition at line 128 of file KickLogger.cpp.

References idKickRecord, INFO, kick, and kickID.

Referenced by execute().

double KickLogger::getBallX Pose2D  from  )  [private]
 

Returns the relative x position of a ball position.

Definition at line 109 of file KickLogger.cpp.

References Geometry::distanceTo(), and BallModel::seen.

Referenced by execute().

Here is the call graph for this function:

double KickLogger::getBallY Pose2D  from  )  [private]
 

Returns the relative y position of a ball position.

Definition at line 115 of file KickLogger.cpp.

References Geometry::distanceTo(), and BallModel::seen.

Referenced by execute().

Here is the call graph for this function:


Member Data Documentation

State KickLogger::state [private]
 

The state of the logger.

Definition at line 44 of file KickLogger.h.

unsigned long KickLogger::timeOfLastStateChange [private]
 

The time of the last state change.

Definition at line 50 of file KickLogger.h.

Referenced by changeState(), and execute().

KickCase KickLogger::kick [private]
 

The kick record.

Definition at line 59 of file KickLogger.h.

Referenced by execute(), and record().

SpecialActionRequest::SpecialActionID KickLogger::kickID [private]
 

The requested kick.

Definition at line 62 of file KickLogger.h.

Referenced by execute(), and record().

OdometryData KickLogger::odometryDataWhenKickWasStarted [private]
 

The odometry data when the kick was started.

Definition at line 65 of file KickLogger.h.

Referenced by execute().


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