Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

DriveMeBehavior Class Reference

#include <DriveMeBehavior.h>

Inheritance diagram for DriveMeBehavior:

Inheritance graph
[legend]
List of all members.

Detailed Description

A very simple behavior that asks the user for WalkMC walking parameters and a walk duration.

The AIBO walks accordingly and then stands up, then asks again. And so on and so on.
Input is from cin, not the tekkotsu console (sout)

Definition at line 13 of file DriveMeBehavior.h.

Public Member Functions

 DriveMeBehavior ()
 constructor
virtual ~DriveMeBehavior ()
 destructor
virtual void DoStart ()
 By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.
virtual void DoStop ()
 By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).
virtual void processEvent (const EventBase &event)
 By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.
virtual std::string getDescription () const
 Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

Static Public Member Functions

static std::string getClassDescription ()
 Gives a short description of what this class of behaviors does... you should override this (but don't have to).

Protected Attributes

MotionManager::MC_ID walker_id
 walks
MotionManager::MC_ID stand_id
 stands up first
SharedObject< SmallMotionSequenceMCstand
 for standing
double last_dx
 the last dx received
double last_dy
 the last dy received
double last_da
 the last da received
unsigned int last_time
 timestamp of last parameter set


Constructor & Destructor Documentation

DriveMeBehavior::DriveMeBehavior  ) 
 

constructor

Definition at line 20 of file DriveMeBehavior.cc.

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

destructor

Definition at line 16 of file DriveMeBehavior.h.


Member Function Documentation

void DriveMeBehavior::DoStart  )  [virtual]
 

By default, merely adds to the reference counter (through AddReference()); Note you should still call this from your overriding methods.

Reimplemented from BehaviorBase.

Definition at line 32 of file DriveMeBehavior.cc.

void DriveMeBehavior::DoStop  )  [virtual]
 

By default, subtracts from the reference counter (RemoveReference()), and thus may deletex if zero; Don't forget to still call this when you override this; Warning: call this at the end of your DoStop(), not beginning (it might delete this ).

Reimplemented from BehaviorBase.

Definition at line 45 of file DriveMeBehavior.cc.

static std::string DriveMeBehavior::getClassDescription  )  [inline, static]
 

Gives a short description of what this class of behaviors does... you should override this (but don't have to).

If you do override this, also consider overriding getDescription() to return it

Reimplemented from BehaviorBase.

Definition at line 23 of file DriveMeBehavior.h.

Referenced by getDescription().

virtual std::string DriveMeBehavior::getDescription  )  const [inline, virtual]
 

Gives a short description of what this particular instantiation does (in case a more specific description is needed on an individual basis).

By default simply returns getName(), because any calls from a BehaviorBase function to getClassDescription() are going to call BehaviorBase::getClassDescription(), not ~YourSubClass~getClassDescription(), because static functions can't be virtual in C++ (doh!)

This means that getDescription called on a pointer to a BehaviorBase of unknown subtype would always return an empty string, which is pretty useless. So instead we return the name in this situation. If you want getDescription to return getClassDescription, you'll have to override it in your subclass to do so.

Reimplemented from BehaviorBase.

Definition at line 24 of file DriveMeBehavior.h.

void DriveMeBehavior::processEvent const EventBase event  )  [virtual]
 

By defining here, allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

Reimplemented from BehaviorBase.

Definition at line 58 of file DriveMeBehavior.cc.


Member Data Documentation

double DriveMeBehavior::last_da [protected]
 

the last da received

Definition at line 33 of file DriveMeBehavior.h.

Referenced by processEvent().

double DriveMeBehavior::last_dx [protected]
 

the last dx received

Definition at line 31 of file DriveMeBehavior.h.

Referenced by processEvent().

double DriveMeBehavior::last_dy [protected]
 

the last dy received

Definition at line 32 of file DriveMeBehavior.h.

Referenced by processEvent().

unsigned int DriveMeBehavior::last_time [protected]
 

timestamp of last parameter set

Definition at line 34 of file DriveMeBehavior.h.

Referenced by processEvent().

SharedObject<SmallMotionSequenceMC> DriveMeBehavior::stand [protected]
 

for standing

Definition at line 29 of file DriveMeBehavior.h.

Referenced by DoStart(), and DriveMeBehavior().

MotionManager::MC_ID DriveMeBehavior::stand_id [protected]
 

stands up first

Definition at line 28 of file DriveMeBehavior.h.

Referenced by DoStart(), DoStop(), and processEvent().

MotionManager::MC_ID DriveMeBehavior::walker_id [protected]
 

walks

Definition at line 27 of file DriveMeBehavior.h.

Referenced by DoStart(), DoStop(), and processEvent().


The documentation for this class was generated from the following files:

Tekkotsu v2.4.1
Generated Tue Aug 16 16:34:59 2005 by Doxygen 1.4.4