Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Lookout Class Reference

The Lookout accepts LookoutRequests to move the head and collect sensor information. More...

#include <Lookout.h>

Inheritance diagram for Lookout:

Detailed Description

The Lookout accepts LookoutRequests to move the head and collect sensor information.

HeadMotionType can be none (user will point the head himself), pointAt, scan, track, or search. The data collected can be an image or distance reading, or for scan operations, it can be a list of locations where certain VisionObject or VisionRegion streams reported hits.

Definition at line 25 of file Lookout.h.

List of all members.

Public Member Functions

 Lookout ()
 Constructor.
virtual void doStart ()
virtual void doStop ()
virtual void doEvent ()
virtual std::string getDescription () const
virtual unsigned int executeRequest (const LookoutRequest &)
bool busy ()
void stopTrack ()
void moveHeadToPoint ()
void relax ()
 Inactivates all Lookout motion commands; called when MapBuilder finishes.

Static Public Member Functions

static std::string getClassDescription ()
static std::vector
< DualCoding::Point
groundSearchPoints ()
 returns a vector of points for searching the ground around the robot
static Point findLocationFor (const float normX, const float normY)

Static Public Attributes

static const unsigned int invalid_LO_ID = (unsigned int)-1

Protected Types

enum  TrackerStates {
  inactive, moveToAcquire, tracking, searching,
  centering, lost
}
enum  LookoutTimerSourceId_t { settle_timer = 1, sample_timer, lost_timer, scan_timer }

Protected Member Functions

virtual void executeRequest ()
virtual void requestComplete (bool result=true)
template<class T >
void pushRequest (const LookoutRequest &req)

void processPointAtEvent (const EventBase &event)
bool findPixelModes ()

void setupTrack ()
void processTrackEvent (const EventBase &event)

Protected Attributes

std::vector< std::map< uchar,
unsigned int > > 
pixelHistograms
std::priority_queue< float > distanceSamples
MC_ID pointer_id
 id for HeadPointerMC for pointing the camera
MC_ID posture_id
 id for PostureMC for pointing the IR sensors
MC_ID sequence_id
 id for MotionSequenceMC for scanning
std::queue< LookoutRequest * > requests
 queue of pending LookoutRequest instances, including the current request
LookoutRequestcurReq
 pointer to request currently being executed
LookoutPointRequestcurPAR
 current Point-At request (same object as curReq)
bool successSave
enum
DualCoding::Lookout::TrackerStates 
trackerState
unsigned int idCounter

Private Member Functions

Lookoutoperator= (const Lookout &)
 Lookout (const Lookout &)



void setupScan ()
void triggerScanMotionSequence ()
void processScanEvent (const EventBase &event)
void scanAlongLine (const Point &start, const Point &end)
void scanAlongPolygon (const std::vector< Point > &vertices, const bool closed=false)
void scanArea (const Point &topLeft, const Point &topRight, const Point &bottomLeft, const Point &bottomRight)
void storeVisionRegionDataTo (std::vector< Point > &, const std::set< color_index > &, int)
static Point findLocationFor (const VisionObjectEvent &visev)
static Point findLocationFor (const CMVision::region *reg)



void setupSearch ()
void processSearchEvent (const EventBase &event)
void triggerSearchMotionSequence ()
static void searchAt (HeadPointerMC &hpmc_temp, std::vector< float > &jointvals, const Point &target)

Member Enumeration Documentation

enum LookoutTimerSourceId_t [protected]
Enumerator:
settle_timer 
sample_timer 
lost_timer 
scan_timer 

Definition at line 141 of file Lookout.h.

enum TrackerStates [protected]
Enumerator:
inactive 
moveToAcquire 
tracking 
searching 
centering 
lost 

Definition at line 131 of file Lookout.h.


Constructor & Destructor Documentation

Lookout (  ) 

Constructor.

Definition at line 31 of file Lookout.cc.

Lookout ( const Lookout  )  [private]

Member Function Documentation

bool busy (  ) 

Definition at line 38 of file Lookout.h.

void doEvent (  )  [virtual]

Definition at line 209 of file Lookout.cc.

void doStart (  )  [virtual]

Definition at line 41 of file Lookout.cc.

void doStop (  )  [virtual]

Definition at line 57 of file Lookout.cc.

void executeRequest (  )  [protected, virtual]

Definition at line 117 of file Lookout.cc.

Referenced by Lookout::executeRequest(), and Lookout::requestComplete().

unsigned int executeRequest ( const LookoutRequest req  )  [virtual]
Point findLocationFor ( const CMVision::region *  reg  )  [static, protected]

Definition at line 415 of file Lookout.cc.

static Point findLocationFor ( const VisionObjectEvent &  visev  )  [static, protected]

Definition at line 81 of file Lookout.h.

Point findLocationFor ( const float  normX,
const float  normY 
) [static]
bool findPixelModes (  )  [protected]

Definition at line 301 of file Lookout.cc.

Referenced by Lookout::processPointAtEvent().

static std::string getClassDescription (  )  [static]

Definition at line 34 of file Lookout.h.

Referenced by Lookout::getDescription().

virtual std::string getDescription (  )  const [virtual]

Definition at line 35 of file Lookout.h.

vector< DualCoding::Point > groundSearchPoints (  )  [static]

returns a vector of points for searching the ground around the robot

Definition at line 73 of file Lookout.cc.

void moveHeadToPoint (  ) 

Definition at line 171 of file Lookout.cc.

Referenced by Lookout::executeRequest().

Lookout& operator= ( const Lookout  )  [private]
void processPointAtEvent ( const EventBase &  event  )  [protected]

Definition at line 242 of file Lookout.cc.

Referenced by Lookout::doEvent().

void processScanEvent ( const EventBase &  event  )  [protected]

Definition at line 449 of file Lookout.cc.

Referenced by Lookout::doEvent().

void processSearchEvent ( const EventBase &  event  )  [protected]

Definition at line 868 of file Lookout.cc.

Referenced by Lookout::doEvent().

void processTrackEvent ( const EventBase &  event  )  [protected]

Definition at line 670 of file Lookout.cc.

Referenced by Lookout::doEvent().

void pushRequest ( const LookoutRequest req  )  [protected]

Definition at line 56 of file Lookout.h.

void relax (  ) 

Inactivates all Lookout motion commands; called when MapBuilder finishes.

Definition at line 165 of file Lookout.cc.

void requestComplete ( bool  result = true  )  [protected, virtual]
void scanAlongLine ( const Point start,
const Point end 
) [protected]

Definition at line 560 of file Lookout.cc.

Referenced by Lookout::setupScan().

void scanAlongPolygon ( const std::vector< Point > &  vertices,
const bool  closed = false 
) [protected]

Definition at line 601 of file Lookout.cc.

Referenced by Lookout::setupScan().

void scanArea ( const Point topLeft,
const Point topRight,
const Point bottomLeft,
const Point bottomRight 
) [protected]
void searchAt ( HeadPointerMC &  hpmc_temp,
std::vector< float > &  jointvals,
const Point target 
) [static, protected]

Definition at line 957 of file Lookout.cc.

Referenced by Lookout::triggerSearchMotionSequence().

void setupScan (  )  [protected]

Definition at line 515 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void setupSearch (  )  [protected]

Definition at line 851 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void setupTrack (  )  [protected]

Definition at line 648 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void stopTrack (  ) 

Definition at line 720 of file Lookout.cc.

Referenced by Lookout::processTrackEvent().

void storeVisionRegionDataTo ( std::vector< Point > &  data,
const std::set< color_index > &  colors,
int  minArea 
) [protected]

Definition at line 422 of file Lookout.cc.

Referenced by Lookout::processScanEvent().

void triggerScanMotionSequence (  )  [protected]

Definition at line 539 of file Lookout.cc.

Referenced by Lookout::processScanEvent().

void triggerSearchMotionSequence (  )  [protected]

Definition at line 920 of file Lookout.cc.

Referenced by Lookout::processSearchEvent().


Member Data Documentation

current Point-At request (same object as curReq)

Definition at line 128 of file Lookout.h.

Referenced by Lookout::doStop(), Lookout::executeRequest(), Lookout::findPixelModes(), Lookout::moveHeadToPoint(), Lookout::processPointAtEvent(), and Lookout::requestComplete().

std::priority_queue<float> distanceSamples [protected]

Definition at line 121 of file Lookout.h.

Referenced by Lookout::executeRequest().

unsigned int idCounter [protected]

Definition at line 139 of file Lookout.h.

Referenced by Lookout::executeRequest().

const unsigned int invalid_LO_ID = (unsigned int)-1 [static]

Definition at line 49 of file Lookout.h.

std::vector<std::map<uchar,unsigned int> > pixelHistograms [protected]

Definition at line 120 of file Lookout.h.

Referenced by Lookout::executeRequest(), and Lookout::findPixelModes().

std::queue<LookoutRequest*> requests [protected]

queue of pending LookoutRequest instances, including the current request

Definition at line 126 of file Lookout.h.

Referenced by Lookout::doStop(), Lookout::executeRequest(), Lookout::pushRequest(), and Lookout::requestComplete().


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

DualCoding 5.1CVS
Generated Tue Aug 23 17:13:39 2011 by Doxygen 1.6.3