Homepage Demos Overview Downloads Tutorials Reference
Credits

WalkToTargetMachine Class Reference

#include <WalkToTargetMachine.h>

Inheritance diagram for WalkToTargetMachine:

Inheritance graph
[legend]
List of all members.

Detailed Description

a state machine for walking towards a visual target

Definition at line 11 of file WalkToTargetMachine.h.

Public Member Functions

 WalkToTargetMachine (unsigned int obj, StateNode *c=NULL, StateNode *l=NULL, StateNode *p=NULL)
 constructor, pass success (close), failure (lost), and parent nodes, and VisionObjectSourceID_t
virtual void setup ()
 This is called by DoStart() when you should setup the network of subnodes.
virtual void DoStart ()
 Transitions should call this when you are entering the state, so it can enable its transitions.
virtual void DoStop ()
 Transitions should call this when you are leaving the state, so it can disable its transitions.
virtual void teardown ()
 This is called by DoStop() when you should destruct subnodes.
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).
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 TransitiongetLostTrans ()
 returns the transition controlling "lost" designation
virtual TransitiongetCloseTrans ()
 returns the transition controlling "close to target" designation

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

unsigned int tracking
 the object being tracked
TimeOutTranstimeout
 transition in case we lose the target
TransitioncloseTrans
 transition in case we get close
StateNodeclose
 dest if we get close to the object
StateNodelost
 dest if we get lost
MotionManager::MC_ID walker_id
 so we can walk
MotionManager::MC_ID headpointer_id
 so we can point the head at the object

Private Member Functions

 WalkToTargetMachine (const WalkToTargetMachine &)
 don't call this
WalkToTargetMachine operator= (const WalkToTargetMachine &)
 don't call this


Constructor & Destructor Documentation

WalkToTargetMachine::WalkToTargetMachine unsigned int  obj,
StateNode c = NULL,
StateNode l = NULL,
StateNode p = NULL
[inline]
 

constructor, pass success (close), failure (lost), and parent nodes, and VisionObjectSourceID_t

Definition at line 14 of file WalkToTargetMachine.h.

WalkToTargetMachine::WalkToTargetMachine const WalkToTargetMachine  )  [private]
 

don't call this


Member Function Documentation

void WalkToTargetMachine::DoStart  )  [virtual]
 

Transitions should call this when you are entering the state, so it can enable its transitions.

Reimplemented from StateNode.

Definition at line 19 of file WalkToTargetMachine.cc.

void WalkToTargetMachine::DoStop  )  [virtual]
 

Transitions should call this when you are leaving the state, so it can disable its transitions.

Reimplemented from StateNode.

Definition at line 28 of file WalkToTargetMachine.cc.

std::string WalkToTargetMachine::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 26 of file WalkToTargetMachine.h.

Referenced by getDescription().

virtual Transition* WalkToTargetMachine::getCloseTrans  )  [inline, virtual]
 

returns the transition controlling "close to target" designation

Definition at line 33 of file WalkToTargetMachine.h.

virtual std::string WalkToTargetMachine::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 27 of file WalkToTargetMachine.h.

virtual Transition* WalkToTargetMachine::getLostTrans  )  [inline, virtual]
 

returns the transition controlling "lost" designation

Definition at line 32 of file WalkToTargetMachine.h.

WalkToTargetMachine WalkToTargetMachine::operator= const WalkToTargetMachine  )  [private]
 

don't call this

void WalkToTargetMachine::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 45 of file WalkToTargetMachine.cc.

void WalkToTargetMachine::setup  )  [virtual]
 

This is called by DoStart() when you should setup the network of subnodes.

Reimplemented from StateNode.

Definition at line 10 of file WalkToTargetMachine.cc.

void WalkToTargetMachine::teardown  )  [virtual]
 

This is called by DoStop() when you should destruct subnodes.

Reimplemented from StateNode.

Definition at line 39 of file WalkToTargetMachine.cc.


Member Data Documentation

StateNode* WalkToTargetMachine::close [protected]
 

dest if we get close to the object

Definition at line 40 of file WalkToTargetMachine.h.

Referenced by setup(), and WalkToTargetMachine().

Transition* WalkToTargetMachine::closeTrans [protected]
 

transition in case we get close

Definition at line 39 of file WalkToTargetMachine.h.

Referenced by setup(), teardown(), and WalkToTargetMachine().

MotionManager::MC_ID WalkToTargetMachine::headpointer_id [protected]
 

so we can point the head at the object

Definition at line 43 of file WalkToTargetMachine.h.

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

StateNode* WalkToTargetMachine::lost [protected]
 

dest if we get lost

Definition at line 41 of file WalkToTargetMachine.h.

Referenced by setup(), and WalkToTargetMachine().

TimeOutTrans* WalkToTargetMachine::timeout [protected]
 

transition in case we lose the target

Definition at line 38 of file WalkToTargetMachine.h.

Referenced by processEvent(), setup(), teardown(), and WalkToTargetMachine().

unsigned int WalkToTargetMachine::tracking [protected]
 

the object being tracked

Definition at line 37 of file WalkToTargetMachine.h.

Referenced by DoStart(), setup(), and WalkToTargetMachine().

MotionManager::MC_ID WalkToTargetMachine::walker_id [protected]
 

so we can walk

Definition at line 42 of file WalkToTargetMachine.h.

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


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

Tekkotsu v2.2.1
Generated Tue Nov 23 16:37:54 2004 by Doxygen 1.3.9.1