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 LookoutRequestBase &)
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 LookoutRequestBase &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< floatdistanceSamples
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< LookoutRequestBase * > requests
 queue of pending LookoutRequestBase instances, including the current request
LookoutRequestBasecurReq
 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]

Reimplemented from BehaviorBase.

Definition at line 208 of file Lookout.cc.

void doStart (  )  [virtual]

Reimplemented from BehaviorBase.

Definition at line 41 of file Lookout.cc.

void doStop (  )  [virtual]

Reimplemented from BehaviorBase.

Definition at line 57 of file Lookout.cc.

void executeRequest (  )  [protected, virtual]

Definition at line 117 of file Lookout.cc.

unsigned int executeRequest ( const LookoutRequestBase req  )  [virtual]

Definition at line 94 of file Lookout.cc.

Point findLocationFor ( const CMVision::region *  reg  )  [static, protected]

Definition at line 431 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]

Definition at line 741 of file Lookout.cc.

bool findPixelModes (  )  [protected]

Definition at line 300 of file Lookout.cc.

static std::string getClassDescription (  )  [static]

Reimplemented from BehaviorBase.

Definition at line 34 of file Lookout.h.

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

Reimplemented from BehaviorBase.

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.

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

Definition at line 241 of file Lookout.cc.

void processScanEvent ( const EventBase event  )  [protected]

Definition at line 465 of file Lookout.cc.

void processSearchEvent ( const EventBase event  )  [protected]

Definition at line 883 of file Lookout.cc.

void processTrackEvent ( const EventBase event  )  [protected]

Definition at line 686 of file Lookout.cc.

void pushRequest ( const LookoutRequestBase 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]

Definition at line 345 of file Lookout.cc.

void scanAlongLine ( const Point start,
const Point end 
) [protected]

Definition at line 576 of file Lookout.cc.

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

Definition at line 617 of file Lookout.cc.

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 980 of file Lookout.cc.

void setupScan (  )  [protected]

Definition at line 531 of file Lookout.cc.

void setupSearch (  )  [protected]

Definition at line 867 of file Lookout.cc.

void setupTrack (  )  [protected]

Definition at line 664 of file Lookout.cc.

void stopTrack (  ) 

Definition at line 736 of file Lookout.cc.

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

Definition at line 438 of file Lookout.cc.

void triggerScanMotionSequence (  )  [protected]

Definition at line 555 of file Lookout.cc.

void triggerSearchMotionSequence (  )  [protected]

Definition at line 944 of file Lookout.cc.


Member Data Documentation

current Point-At request (same object as curReq)

Definition at line 128 of file Lookout.h.

LookoutRequestBase* curReq [protected]

pointer to request currently being executed

Definition at line 127 of file Lookout.h.

std::priority_queue<float> distanceSamples [protected]

Definition at line 121 of file Lookout.h.

unsigned int idCounter [protected]

Definition at line 139 of file Lookout.h.

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.

MC_ID pointer_id [protected]

id for HeadPointerMC for pointing the camera

Definition at line 123 of file Lookout.h.

MC_ID posture_id [protected]

id for PostureMC for pointing the IR sensors

Definition at line 124 of file Lookout.h.

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

queue of pending LookoutRequestBase instances, including the current request

Definition at line 126 of file Lookout.h.

MC_ID sequence_id [protected]

id for MotionSequenceMC for scanning

Definition at line 125 of file Lookout.h.

bool successSave [protected]

Definition at line 129 of file Lookout.h.


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

DualCoding 5.1CVS
Generated Thu Apr 25 01:59:04 2013 by Doxygen 1.6.3