Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Lookout Class Reference

#include <Lookout.h>

Inheritance diagram for Lookout:

List of all members.


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 29 of file Lookout.h.

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)

Public Member Functions

 Lookout ()
 Constructor.
virtual void DoStart ()
virtual void DoStop ()
virtual void processEvent (const EventBase &event)
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
MotionManager::MC_ID pointer_id
 id for HeadPointerMC for pointing the camera
MotionManager::MC_ID posture_id
 id for PostureMC for pointing the IR sensors
MotionManager::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 &)

Member Enumeration Documentation

enum TrackerStates [protected]

Enumerator:
inactive 
moveToAcquire 
tracking 
searching 
centering 
lost 

Definition at line 138 of file Lookout.h.

enum LookoutTimerSourceId_t [protected]

Enumerator:
settle_timer 
sample_timer 
lost_timer 
scan_timer 

Definition at line 148 of file Lookout.h.


Constructor & Destructor Documentation

Lookout (  ) 

Constructor.

Definition at line 25 of file Lookout.cc.

Lookout ( const Lookout  )  [private]


Member Function Documentation

void DoStart (  )  [virtual]

Definition at line 35 of file Lookout.cc.

Referenced by VRmixin::startCrew().

void DoStop (  )  [virtual]

Definition at line 51 of file Lookout.cc.

Referenced by VRmixin::stopCrew().

void processEvent ( const EventBase &  event  )  [virtual]

Definition at line 199 of file Lookout.cc.

static std::string getClassDescription (  )  [inline, static]

Definition at line 38 of file Lookout.h.

Referenced by Lookout::getDescription().

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

Definition at line 39 of file Lookout.h.

unsigned int executeRequest ( const LookoutRequest req  )  [virtual]

bool busy (  )  [inline]

Definition at line 42 of file Lookout.h.

Referenced by Pilot::Dispatch::DoStart().

void stopTrack (  ) 

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

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

Definition at line 67 of file Lookout.cc.

void moveHeadToPoint (  ) 

Definition at line 157 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void relax (  ) 

Inactivates all Lookout motion commands; called when MapBuilder finishes.

Definition at line 151 of file Lookout.cc.

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

void executeRequest (  )  [protected, virtual]

Definition at line 103 of file Lookout.cc.

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

void requestComplete ( bool  result = true  )  [protected, virtual]

void pushRequest ( const LookoutRequest req  )  [inline, protected]

Definition at line 60 of file Lookout.h.

void processPointAtEvent ( const EventBase &  event  )  [protected]

Definition at line 232 of file Lookout.cc.

Referenced by Lookout::processEvent().

bool findPixelModes (  )  [protected]

Definition at line 293 of file Lookout.cc.

Referenced by Lookout::processPointAtEvent().

void setupScan (  )  [protected]

Definition at line 507 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void triggerScanMotionSequence (  )  [protected]

Definition at line 531 of file Lookout.cc.

Referenced by Lookout::processScanEvent().

void processScanEvent ( const EventBase &  event  )  [protected]

Definition at line 441 of file Lookout.cc.

Referenced by Lookout::processEvent().

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

Definition at line 552 of file Lookout.cc.

Referenced by Lookout::setupScan().

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

Definition at line 593 of file Lookout.cc.

Referenced by Lookout::setupScan().

void scanArea ( const Point topLeft,
const Point topRight,
const Point bottomLeft,
const Point bottomRight 
) [protected]

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

Definition at line 85 of file Lookout.h.

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

Definition at line 89 of file Lookout.h.

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

Definition at line 410 of file Lookout.cc.

Referenced by Lookout::processScanEvent().

void setupTrack (  )  [protected]

Definition at line 638 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void processTrackEvent ( const EventBase &  event  )  [protected]

Definition at line 659 of file Lookout.cc.

Referenced by Lookout::processEvent().

void setupSearch (  )  [protected]

Definition at line 841 of file Lookout.cc.

Referenced by Lookout::executeRequest().

void processSearchEvent ( const EventBase &  event  )  [protected]

Definition at line 858 of file Lookout.cc.

Referenced by Lookout::processEvent().

void triggerSearchMotionSequence (  )  [protected]

Definition at line 910 of file Lookout.cc.

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

Definition at line 947 of file Lookout.cc.

Lookout& operator= ( const Lookout  )  [private]


Member Data Documentation

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

Definition at line 53 of file Lookout.h.

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

Definition at line 127 of file Lookout.h.

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

std::priority_queue<float> distanceSamples [protected]

Definition at line 128 of file Lookout.h.

Referenced by Lookout::executeRequest().

MotionManager::MC_ID posture_id [protected]

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

queue of pending LookoutRequest instances, including the current request

Definition at line 133 of file Lookout.h.

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

current Point-At request (same object as curReq)

Definition at line 135 of file Lookout.h.

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

unsigned int idCounter [protected]

Definition at line 146 of file Lookout.h.

Referenced by Lookout::executeRequest().


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

DualCoding 4.0
Generated Thu Nov 22 00:53:57 2007 by Doxygen 1.5.4