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

ArActionColorFollow Class Reference

#include <ArActionColorFollow.h>

Inheritance diagram for ArActionColorFollow:

ArAction List of all members.

Public Types

enum  LocationState { LEFT, RIGHT, CENTER }
enum  MoveState { FOLLOWING, ACQUIRING, STOPPED }
enum  TargetState { NO_TARGET, TARGET }

Public Member Functions

 ArActionColorFollow (const char *name, ArACTS_1_2 *acts, ArPTZ *camera, double speed=200, int width=160, int height=120)
virtual ArActionDesiredfire (ArActionDesired currentDesired)
 Fires the action, returning what the action wants to do.
bool getAcquire ()
bool getBlob ()
int getChannel ()
bool getMovement ()
void setAcquire (bool acquire)
void setCamera (ArPTZ *camera)
bool setChannel (int channel)
void startMovement (void)
void stopMovement (void)

Protected Attributes

bool killMovement
bool myAcquire
ArACTS_1_2myActs
ArPTZmyCamera
int myChannel
ArActionDesired myDesired
int myHeight
ArTime myLastSeen
LocationState myLocation
int myMaxTime
MoveState myMove
double mySpeed
TargetState myState
int myWidth

Detailed Description

ArActionColorFollow is an action that moves the robot toward the largest blob that appears in it's current field of view.

Definition at line 39 of file ArActionColorFollow.h.


Member Function Documentation

ArActionDesired * ArActionColorFollow::fire ArActionDesired  currentDesired  )  [virtual]
 

Fires the action, returning what the action wants to do.

Parameters:
currentDesired this is what the current resolver has for its desired, this is SOLELY for the purpose of giving information to the action
Returns:
pointer to what this action wants to do, NULL if it wants to do nothing

Implements ArAction.

Definition at line 61 of file ArActionColorFollow.cpp.

References ArMath::fabs(), ArACTSBlob::getArea(), ArACTS_1_2::getBlob(), ArACTS_1_2::getNumBlobs(), ArACTSBlob::getXCG(), ArACTSBlob::getYCG(), ArTime::mSecSince(), ArActionDesired::reset(), ArActionDesired::setDeltaHeading(), ArTime::setToNow(), ArActionDesired::setVel(), ArPTZ::tilt(), and ArPTZ::tiltRel().


The documentation for this class was generated from the following files:
Generated on Wed Oct 19 12:56:39 2005 for Aria by  doxygen 1.4.0