Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MapBuilderRequest Class Reference

#include <MapBuilderRequest.h>


Detailed Description

Definition at line 22 of file MapBuilderRequest.h.

List of all members.

Public Types

enum  MapBuilderRequestType_t { cameraMap, groundMap, localMap, worldMap }
enum  GroundPlaneAssumption_t { onStand, onLegs, onWheel, custom }
typedef unsigned int MapBuilderVerbosity_t

Public Member Functions

 MapBuilderRequest (MapBuilderRequestType_t reqtype=cameraMap)
 Constructor.
 MapBuilderRequest (const MapBuilderRequest &req)
 Copy constructor.
MapBuilderRequestoperator= (const MapBuilderRequest &req)
 Assignment operator.
virtual ~MapBuilderRequest ()
 Destructor.
MapBuilderRequestType_t getRequestType () const
std::set< color_index > allColors ()
 Set of all non-zero/non-unsaturated colors (useful for requesting markers of all possible colors).
void addObjectColor (ShapeType_t type, std::string const &color_name)
 Shortcut for specifying an objectColors entry.
void addAllObjectColors (ShapeType_t type)
 Shortcut for specifying all object colors.
void addOccluderColor (ShapeType_t type, std::string const &color_name)
 Shortcut for specifying an occluderColors entry.
void addMinBlobArea (std::string const &color_name, int area)
 Shortcut for specifying a minimum blob area.
void addAllMinBlobAreas (int area)
 Shortcut for specifying a minimum blob area for all blob colors.
void addBlobOrientation (std::string const &color_name, BlobData::BlobOrientation_t orient, coordinate_t assumedHeight=0)
 Shortcut for specifying a blob's orientation and (for poster orientations) assumed height.
void addMarkerType (MarkerType_t type)
 Shortcut for specifying a marker type to look for.
void addSiftObject (string const &name)
 Shortcut for specifying a SIFT object type to look for.
void setAprilTagFamily ()
 Shortcut for requesting AprilTag extraction using the smallest available tag family.
void setAprilTagFamily (int bits, int minimumHammingDistance)
 Shortcut for selecting a specific AprilTag family.

Public Attributes

MapBuilderRequestType_t requestType
 Type of map to build.
std::map< ShapeType_t,
std::set< color_index > > 
objectColors
 For each object type, a set of object color indices.
std::map< ShapeType_t,
std::set< color_index > > 
occluderColors
 For each object type, a set of occluder color indices.
std::map< color_index, int > minBlobAreas
 Minimum acceptable areas for blobs of specified colors, e.g., req.minBlobAreas[pink_index]=50.
std::map< color_index,
BlobData::BlobOrientation_t
blobOrientations
 Default orientation for blobs of specified colors.
std::map< color_index,
coordinate_t > 
assumedBlobHeights
 Fixed heights for pillar or poster blobs of specified colors.
std::set< MarkerType_tmarkerTypes
 Types of markers to search for.
std::map< MarkerType_t,
coordinate_t > 
markerHeights
 Assumed height above ground in mm for markers of this type.
unsigned int floorColor
string siftDatabasePath
 Path to the SIFT object database to load.
std::set< std::string > siftObjectNames
 Names of objects to search for; if empty, search for everything.
std::pair< int, int > aprilTagFamily
 AprilTag family to use, e.g., Tag16h5 would be std::pair<int,int>(16,5).
unsigned int motionSettleTime
 Time in msec to wait before taking measurements or throwing completion event after head reaches gazePt.
int numSamples
 Number of camera images to combine, for noise reduction.
int sampleInterval
 Interval in msec between successive samples.
float maxDist
 Ignore objects farther than this distance.
bool clearCamera
 If true (default), clear the camera sketch and shape spaces at start of request.
bool clearLocal
 If true (default), clear the local sketch and shape spaces at start of request.
bool clearWorld
 If true (default is false), clear the world sketch and shape spaces at start of request.
bool pursueShapes
 If true, generate new gaze points as shapes are recognized.
bool immediateRequest
 If true, the current camera image is processed immediately and results are available when MapBuilder::executeRequest() returns, so there's no need to set up an event listener. Only possible if numSamples == 1 and no head motion is required.
bool manualHeadMotion
 If true, waits for !msg MoveHead before moving to next gaze point (for debugging).
bool rawY
 If true, leave an intensity (Y-channel) image in camera space for debugging.
bool removePts
 If true, remove pending gaze points if they're visible in current image.
bool doScan
 If true, do a continuous scan of the area to find interest points to be examined.
AngPi dTheta
 Angular step for scanning.
ShapeRoot searchArea
 The area to search, in egocentric coords.
std::queue
< LookoutSearchRequest * > 
worldTargets
 Queue of search requests for world targets.
void(* userImageProcessing )()
 User routine to call after a camera image is received.
void(* userCamProcessing )()
 User routine to call after cam space processing.
void(* userGroundProcessing )()
 User routine to call after ground space processing.
void(* userLocalProcessing )()
 User routine to call after local space processing.
void(* userWorldProcessing )()
 User routine to call after world space processing.
bool(* exitTest )()
 If true, terminate map building and post completion event.
enum
DualCoding::MapBuilderRequest::GroundPlaneAssumption_t 
groundPlaneAssumption
PlaneEquation customGroundPlane
 User-supplied ground plane.
BehaviorBaserequestingBehavior
 The Behavior making this request; used for posting mapbuilder events.
MapBuilderVerbosity_t setVerbosity
 Verbosity elements to force on.
MapBuilderVerbosity_t clearVerbosity
 Verbosity elements to force off.
fmat::Transform baseTransform
 Used by the Pilot when rotating the body to simulate a pan/tilt.

Static Public Attributes

static coordinate_t defaultMarkerHeight = 7.0f * 25.4f

Protected Member Functions

bool validateRequest ()
 check object types, colors, etc.
bool validateSift ()
bool validateRequestType ()

Static Protected Member Functions

static bool validateColors (const map< ShapeType_t, set< color_index > > &shapes2colors)
static bool validateAdd (ShapeType_t type, std::string const &color_name)

Private Attributes

std::vector< PointgazePts
std::vector< fmat::Transform > baseToCamMats
unsigned int requestID
 Set by mapbuilder when the request is added to its request queue.
MapBuilderVerbosity_t verbosity
 Merger of global default verbosity settings and set/clear for this request.

Friends

class MapBuilder

Member Typedef Documentation

typedef unsigned int MapBuilderVerbosity_t

Definition at line 33 of file MapBuilderRequest.h.


Member Enumeration Documentation

Enumerator:
onStand 
onLegs 
onWheel 
custom 

Definition at line 70 of file MapBuilderRequest.h.

Enumerator:
cameraMap 
groundMap 
localMap 
worldMap 

Definition at line 26 of file MapBuilderRequest.h.


Constructor & Destructor Documentation

MapBuilderRequest ( MapBuilderRequestType_t  reqtype = cameraMap  ) 

Constructor.

Definition at line 85 of file MapBuilderRequest.h.

MapBuilderRequest ( const MapBuilderRequest req  ) 

Copy constructor.

Definition at line 105 of file MapBuilderRequest.h.

virtual ~MapBuilderRequest (  )  [virtual]

Destructor.

Definition at line 187 of file MapBuilderRequest.h.


Member Function Documentation

void addAllMinBlobAreas ( int  area  ) 

Shortcut for specifying a minimum blob area for all blob colors.

Definition at line 97 of file MapBuilderRequest.cc.

void addAllObjectColors ( ShapeType_t  type  ) 

Shortcut for specifying all object colors.

Definition at line 83 of file MapBuilderRequest.cc.

void addBlobOrientation ( std::string const &  color_name,
BlobData::BlobOrientation_t  orient,
coordinate_t  assumedHeight = 0 
)

Shortcut for specifying a blob's orientation and (for poster orientations) assumed height.

Definition at line 102 of file MapBuilderRequest.cc.

void addMarkerType ( MarkerType_t  type  ) 

Shortcut for specifying a marker type to look for.

Definition at line 107 of file MapBuilderRequest.cc.

void addMinBlobArea ( std::string const &  color_name,
int  area 
)

Shortcut for specifying a minimum blob area.

Definition at line 92 of file MapBuilderRequest.cc.

void addObjectColor ( ShapeType_t  type,
std::string const &  color_name 
)

Shortcut for specifying an objectColors entry.

Definition at line 78 of file MapBuilderRequest.cc.

void addOccluderColor ( ShapeType_t  type,
std::string const &  color_name 
)

Shortcut for specifying an occluderColors entry.

Definition at line 87 of file MapBuilderRequest.cc.

void addSiftObject ( string const &  name  ) 

Shortcut for specifying a SIFT object type to look for.

Definition at line 111 of file MapBuilderRequest.cc.

std::set< color_index > allColors (  ) 

Set of all non-zero/non-unsaturated colors (useful for requesting markers of all possible colors).

Definition at line 70 of file MapBuilderRequest.cc.

Referenced by MapBuilderRequest::addAllObjectColors().

MapBuilderRequest& operator= ( const MapBuilderRequest req  ) 

Assignment operator.

Definition at line 139 of file MapBuilderRequest.h.

void setAprilTagFamily ( int  bits,
int  minimumHammingDistance 
)

Shortcut for selecting a specific AprilTag family.

Definition at line 131 of file MapBuilderRequest.cc.

void setAprilTagFamily (  ) 

Shortcut for requesting AprilTag extraction using the smallest available tag family.

Definition at line 115 of file MapBuilderRequest.cc.

bool validateAdd ( ShapeType_t  type,
std::string const &  color_name 
) [static, protected]
bool validateColors ( const map< ShapeType_t, set< color_index > > &  shapes2colors  )  [static, protected]

Definition at line 32 of file MapBuilderRequest.cc.

Referenced by MapBuilderRequest::validateRequest().

bool validateRequest (  )  [protected]

check object types, colors, etc.

Definition at line 15 of file MapBuilderRequest.cc.

Referenced by MapBuilder::executeRequest().

bool validateRequestType (  )  [protected]

Definition at line 56 of file MapBuilderRequest.cc.

Referenced by MapBuilderRequest::validateRequest().

bool validateSift (  )  [protected]

Definition at line 52 of file MapBuilderRequest.cc.

Referenced by MapBuilderRequest::validateRequest().


Friends And Related Function Documentation

friend class MapBuilder [friend]

Definition at line 23 of file MapBuilderRequest.h.


Member Data Documentation

std::pair<int,int> aprilTagFamily

AprilTag family to use, e.g., Tag16h5 would be std::pair<int,int>(16,5).

Definition at line 47 of file MapBuilderRequest.h.

Referenced by MapBuilder::getCamAprilTags(), MapBuilderRequest::operator=(), and MapBuilderRequest::setAprilTagFamily().

std::map<color_index, coordinate_t> assumedBlobHeights

Fixed heights for pillar or poster blobs of specified colors.

Definition at line 41 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::addBlobOrientation(), MapBuilder::getCamBlobs(), MapBuilder::getCameraShapes(), and MapBuilderRequest::operator=().

std::vector<fmat::Transform> baseToCamMats [private]
fmat::Transform baseTransform

Used by the Pilot when rotating the body to simulate a pan/tilt.

Definition at line 75 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::processImage().

Default orientation for blobs of specified colors.

Definition at line 40 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::addBlobOrientation(), MapBuilder::getCamBlobs(), MapBuilder::getCameraShapes(), and MapBuilderRequest::operator=().

If true (default), clear the camera sketch and shape spaces at start of request.

Definition at line 52 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), and MapBuilderRequest::operator=().

If true (default), clear the local sketch and shape spaces at start of request.

Definition at line 53 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), and MapBuilderRequest::operator=().

Verbosity elements to force off.

Definition at line 74 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), and MapBuilderRequest::operator=().

If true (default is false), clear the world sketch and shape spaces at start of request.

Definition at line 54 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), and MapBuilderRequest::operator=().

PlaneEquation customGroundPlane

User-supplied ground plane.

Definition at line 71 of file MapBuilderRequest.h.

Referenced by MapBuilder::calculateGroundPlane(), and MapBuilderRequest::operator=().

coordinate_t defaultMarkerHeight = 7.0f * 25.4f [static]

If true, do a continuous scan of the area to find interest points to be examined.

Definition at line 60 of file MapBuilderRequest.h.

Referenced by MapBuilder::defineGazePts(), MapBuilder::executeRequest(), MapBuilderRequest::operator=(), and MapBuilderRequest::validateRequestType().

AngPi dTheta

Angular step for scanning.

Definition at line 61 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::scanForGazePts().

bool(* exitTest)()

If true, terminate map building and post completion event.

Definition at line 69 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::requestExitTest().

unsigned int floorColor

If true, the current camera image is processed immediately and results are available when MapBuilder::executeRequest() returns, so there's no need to set up an event listener. Only possible if numSamples == 1 and no head motion is required.

Definition at line 56 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), MapBuilderRequest::operator=(), and MapBuilderRequest::validateRequestType().

If true, waits for !msg MoveHead before moving to next gaze point (for debugging).

Definition at line 57 of file MapBuilderRequest.h.

Referenced by MapBuilder::moveToNextGazePoint(), and MapBuilderRequest::operator=().

std::map<MarkerType_t, coordinate_t> markerHeights

Assumed height above ground in mm for markers of this type.

Definition at line 43 of file MapBuilderRequest.h.

Referenced by BiColorMarkerData::extractMarkers(), and MapBuilderRequest::operator=().

Types of markers to search for.

Definition at line 42 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::addMarkerType(), MapBuilder::getCameraShapes(), and MapBuilderRequest::operator=().

float maxDist

Ignore objects farther than this distance.

Definition at line 51 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), and MapBuilderRequest::operator=().

std::map<color_index, int> minBlobAreas

Minimum acceptable areas for blobs of specified colors, e.g., req.minBlobAreas[pink_index]=50.

Definition at line 39 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::addAllMinBlobAreas(), MapBuilderRequest::addMinBlobArea(), MapBuilder::getCamBlobs(), MapBuilder::getCameraShapes(), and MapBuilderRequest::operator=().

unsigned int motionSettleTime

Time in msec to wait before taking measurements or throwing completion event after head reaches gazePt.

Definition at line 48 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), MapBuilder::scanForGazePts(), and MapBuilder::storeImage().

Number of camera images to combine, for noise reduction.

Definition at line 49 of file MapBuilderRequest.h.

Referenced by MapBuilder::getCameraShapes(), MapBuilderRequest::operator=(), MapBuilder::storeImage(), and MapBuilderRequest::validateRequestType().

std::map<ShapeType_t, std::set<color_index> > occluderColors

For each object type, a set of occluder color indices.

Definition at line 38 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::addOccluderColor(), MapBuilder::getCameraShapes(), MapBuilderRequest::operator=(), and MapBuilderRequest::validateRequest().

If true, generate new gaze points as shapes are recognized.

Definition at line 55 of file MapBuilderRequest.h.

Referenced by MapBuilder::determineNextGazePoint(), MapBuilderRequest::operator=(), and MapBuilderRequest::validateRequestType().

If true, leave an intensity (Y-channel) image in camera space for debugging.

Definition at line 58 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::processImage().

If true, remove pending gaze points if they're visible in current image.

Definition at line 59 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::removeGazePts().

unsigned int requestID [private]

Set by mapbuilder when the request is added to its request queue.

Definition at line 80 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), MapBuilderRequest::operator=(), and MapBuilder::requestComplete().

The Behavior making this request; used for posting mapbuilder events.

Definition at line 72 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), MapBuilderRequest::operator=(), and MapBuilder::requestComplete().

Interval in msec between successive samples.

Definition at line 50 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::storeImage().

Verbosity elements to force on.

Definition at line 73 of file MapBuilderRequest.h.

Referenced by MapBuilder::executeRequest(), and MapBuilderRequest::operator=().

Path to the SIFT object database to load.

Definition at line 45 of file MapBuilderRequest.h.

Referenced by MapBuilder::getCameraShapes(), MapBuilderRequest::operator=(), and MapBuilderRequest::validateSift().

std::set<std::string> siftObjectNames

Names of objects to search for; if empty, search for everything.

Definition at line 46 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::addSiftObject(), MapBuilder::getCameraShapes(), MapBuilderRequest::operator=(), and MapBuilderRequest::validateSift().

void(* userCamProcessing)()

User routine to call after cam space processing.

Definition at line 65 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::processImage().

User routine to call after ground space processing.

Definition at line 66 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::processImage().

User routine to call after a camera image is received.

Definition at line 64 of file MapBuilderRequest.h.

Referenced by MapBuilder::getCameraShapes(), MapBuilderRequest::operator=(), and MapBuilder::processImage().

User routine to call after local space processing.

Definition at line 67 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::processImage().

User routine to call after world space processing.

Definition at line 68 of file MapBuilderRequest.h.

Referenced by MapBuilderRequest::operator=(), and MapBuilder::processImage().


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