Homepage Demos Overview Downloads Tutorials Reference
Credits
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Search

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, and deletes if zero
Note:
you should 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)
 Allows you to get away with not supplying a processEvent() function for the EventListener interface. By default, does nothing.

virtual std::string getName () const
 Identifies the behavior in menus and such.


Static Public Member Functions

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< MotionSequenceMC<
MotionSequence::SizeSmall > > 
stand
 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 21 of file DriveMeBehavior.cc.

References stand.

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 33 of file DriveMeBehavior.cc.

References EventRouter::addListener(), MotionManager::addMotion(), EventRouter::addTimer(), BehaviorBase::DoStart(), erouter, MotionManager::kStdPriority, motman, stand, stand_id, EventBase::timerEGID, and walker_id.

void DriveMeBehavior::DoStop  )  [virtual]
 

By default, subtracts from the reference counter, and deletes if zero

Note:
you should 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 46 of file DriveMeBehavior.cc.

References BehaviorBase::DoStop(), erouter, EventRouter::forgetListener(), motman, MotionManager::removeMotion(), EventRouter::removeTimer(), stand_id, and walker_id.

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

Reimplemented from BehaviorBase.

Definition at line 24 of file DriveMeBehavior.h.

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

Identifies the behavior in menus and such.

Implements BehaviorBase.

Definition at line 23 of file DriveMeBehavior.h.

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

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 59 of file DriveMeBehavior.cc.

References EventRouter::addTimer(), MotionManager::checkinMotion(), MotionManager::checkoutMotion(), erouter, EventBase::getGeneratorID(), last_da, last_dx, last_dy, last_time, motman, MotionSequence::play(), WalkMC::setTargetVelocity(), stand_id, EventBase::timerEGID, and walker_id.


Member Data Documentation

double DriveMeBehavior::last_da [protected]
 

the last da received

Definition at line 33 of file DriveMeBehavior.h.

double DriveMeBehavior::last_dx [protected]
 

the last dx received

Definition at line 31 of file DriveMeBehavior.h.

double DriveMeBehavior::last_dy [protected]
 

the last dy received

Definition at line 32 of file DriveMeBehavior.h.

unsigned int DriveMeBehavior::last_time [protected]
 

timestamp of last parameter set

Definition at line 34 of file DriveMeBehavior.h.

SharedObject< MotionSequenceMC<MotionSequence::SizeSmall> > DriveMeBehavior::stand [protected]
 

for standing

Definition at line 29 of file DriveMeBehavior.h.

MotionManager::MC_ID DriveMeBehavior::stand_id [protected]
 

stands up first

Definition at line 28 of file DriveMeBehavior.h.

MotionManager::MC_ID DriveMeBehavior::walker_id [protected]
 

walks

Definition at line 27 of file DriveMeBehavior.h.


The documentation for this class was generated from the following files:
Tekkotsu v1.4
Generated Sat Jul 19 00:08:54 2003 by Doxygen 1.3.2