Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

DualCoding::MapBuilderRequest Class Reference

#include <MapBuilderRequest.h>


Detailed Description

Definition at line 33 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_indexallColors ()
 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 addObjectColor (ShapeType_t type, rgb color)
 Shortcut for specifying an objectColors entry.
void addSecondColor (ShapeType_t type, std::string const &color_name)
 Shortcut for specifying a secondColors entry.
void addSecondColor (ShapeType_t type, rgb color)
 Shortcut for specifying a secondColors 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 addBlobOrientation (rgb color, BlobData::BlobOrientation_t orient, coordinate_t assumedHeight=0)
 Shortcut for specifying a blob's orientation and (for poster orientations) assumed height.
void addCylinderHeight (std::string const &color_name, coordinate_t assumedHeight=0)
 Shortcut for specifying a cylinder's height.
void addCylinderHeight (rgb color, coordinate_t assumedHeight=0)
 Shortcut for specifying a cylinder's 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 addAttributes (const ShapeRoot &shape)
 Look for shapes that could match this one.
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.
void addAgentRecognition ()
 Shortcut for requesting agent recognition (seeing other robots).

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 > > 
secondColors
 For two-colored objects (the bar color for dominoes).
std::map< ShapeType_t,
std::set< color_index > > 
occluderColors
 For each object type, a set of occluder color indices.
float minLineLength
 Minimum length of a line with valid endpoints, for isAdmissible() test.
float minRayLength
 Minimum length of a line with an invalid endpoint, for isAdmissible() test.
float minEllipseSemiMajor
 Minimum length of ellipse semimajor axis, for isAdmissible() test.
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::map< color_index,
coordinate_t
assumedCylinderHeights
 Fixed heights for cylinders of specified colors.
std::set< MarkerType_t > markerTypes
 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).
fmat::Column< 3 > dominoDimensions
 length, width, and height of a domino (in mm)
fmat::Column< 3 > naughtDimensions
 length, width, and height of a naught (in mm)
fmat::Column< 3 > crossDimensions
 length, width, and height of a cross (in mm)
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 ignoreCamera
 Don't clear or import shapes from camera space; just work in local and/or world space.
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 or allocentric 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< GazePointgazePts
std::vector< fmat::TransformbaseToCamMats
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

Definition at line 44 of file MapBuilderRequest.h.


Member Enumeration Documentation

Enumerator:
onStand 
onLegs 
onWheel 
custom 

Definition at line 90 of file MapBuilderRequest.h.

Enumerator:
cameraMap 
groundMap 
localMap 
worldMap 

Definition at line 37 of file MapBuilderRequest.h.


Constructor & Destructor Documentation

DualCoding::MapBuilderRequest::MapBuilderRequest ( MapBuilderRequestType_t  reqtype = cameraMap  ) 

Constructor.

Definition at line 105 of file MapBuilderRequest.h.

DualCoding::MapBuilderRequest::MapBuilderRequest ( const MapBuilderRequest req  ) 

Copy constructor.

Definition at line 131 of file MapBuilderRequest.h.

virtual DualCoding::MapBuilderRequest::~MapBuilderRequest (  )  [virtual]

Destructor.

Definition at line 227 of file MapBuilderRequest.h.


Member Function Documentation

void DualCoding::MapBuilderRequest::addAgentRecognition (  ) 

Shortcut for requesting agent recognition (seeing other robots).

Definition at line 198 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addAllMinBlobAreas ( int  area  ) 

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

Definition at line 117 of file MapBuilderRequest.cc.

Referenced by Grasper::FindObj::doStart().

void DualCoding::MapBuilderRequest::addAllObjectColors ( ShapeType_t  type  ) 

Shortcut for specifying all object colors.

Definition at line 103 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addBlobOrientation ( rgb  color,
BlobData::BlobOrientation_t  orient,
coordinate_t  assumedHeight = 0 
)

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

Definition at line 127 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::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 122 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addCylinderHeight ( rgb  color,
coordinate_t  assumedHeight = 0 
)

Shortcut for specifying a cylinder's height.

Definition at line 136 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addCylinderHeight ( std::string const &  color_name,
coordinate_t  assumedHeight = 0 
)

Shortcut for specifying a cylinder's height.

Definition at line 132 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addMarkerType ( MarkerType_t  type  ) 

Shortcut for specifying a marker type to look for.

Definition at line 140 of file MapBuilderRequest.cc.

Referenced by addAttributes().

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

Shortcut for specifying a minimum blob area.

Definition at line 112 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addObjectColor ( ShapeType_t  type,
rgb  color 
)

Shortcut for specifying an objectColors entry.

Definition at line 90 of file MapBuilderRequest.cc.

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

Shortcut for specifying an occluderColors entry.

Definition at line 107 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addSecondColor ( ShapeType_t  type,
rgb  color 
)

Shortcut for specifying a secondColors entry.

Definition at line 99 of file MapBuilderRequest.cc.

void DualCoding::MapBuilderRequest::addSecondColor ( ShapeType_t  type,
std::string const &  color_name 
)

Shortcut for specifying a secondColors entry.

Definition at line 94 of file MapBuilderRequest.cc.

Referenced by addAttributes().

void DualCoding::MapBuilderRequest::addSiftObject ( string const &  name  ) 

Shortcut for specifying a SIFT object type to look for.

Definition at line 144 of file MapBuilderRequest.cc.

std::set< color_index > DualCoding::MapBuilderRequest::allColors (  ) 

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

Definition at line 77 of file MapBuilderRequest.cc.

Referenced by addAllObjectColors().

MapBuilderRequestType_t DualCoding::MapBuilderRequest::getRequestType (  )  const
MapBuilderRequest& DualCoding::MapBuilderRequest::operator= ( const MapBuilderRequest req  ) 

Assignment operator.

Definition at line 171 of file MapBuilderRequest.h.

void DualCoding::MapBuilderRequest::setAprilTagFamily ( int  bits,
int  minimumHammingDistance 
)

Shortcut for selecting a specific AprilTag family.

Definition at line 191 of file MapBuilderRequest.cc.

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

Definition at line 39 of file MapBuilderRequest.cc.

Referenced by validateRequest().

bool DualCoding::MapBuilderRequest::validateRequest (  )  [protected]

check object types, colors, etc.

Definition at line 21 of file MapBuilderRequest.cc.

Referenced by DualCoding::MapBuilder::executeRequest().

bool DualCoding::MapBuilderRequest::validateRequestType (  )  [protected]

Definition at line 63 of file MapBuilderRequest.cc.

Referenced by validateRequest().

bool DualCoding::MapBuilderRequest::validateSift (  )  [protected]

Definition at line 59 of file MapBuilderRequest.cc.

Referenced by validateRequest().


Friends And Related Function Documentation

friend class MapBuilder [friend]

Definition at line 34 of file MapBuilderRequest.h.


Member Data Documentation

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

Definition at line 63 of file MapBuilderRequest.h.

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

Fixed heights for cylinders of specified colors.

Definition at line 57 of file MapBuilderRequest.h.

Referenced by addAttributes(), addCylinderHeight(), and DualCoding::MapBuilder::getCameraShapes().

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

Definition at line 95 of file MapBuilderRequest.h.

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

std::map<color_index, BlobData::BlobOrientation_t> DualCoding::MapBuilderRequest::blobOrientations

Default orientation for blobs of specified colors.

Definition at line 55 of file MapBuilderRequest.h.

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

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

Definition at line 71 of file MapBuilderRequest.h.

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

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

Definition at line 73 of file MapBuilderRequest.h.

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

length, width, and height of a cross (in mm)

Definition at line 66 of file MapBuilderRequest.h.

Referenced by DualCoding::MapBuilder::getCamCrosses(), and operator=().

length, width, and height of a domino (in mm)

Definition at line 64 of file MapBuilderRequest.h.

Referenced by DualCoding::MapBuilder::getCamDominoes(), and operator=().

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

Definition at line 80 of file MapBuilderRequest.h.

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

Angular step for scanning.

Definition at line 81 of file MapBuilderRequest.h.

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

If true, terminate map building and post completion event.

Definition at line 89 of file MapBuilderRequest.h.

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

Don't clear or import shapes from camera space; just work in local and/or world space.

Definition at line 74 of file MapBuilderRequest.h.

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

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 76 of file MapBuilderRequest.h.

Referenced by LookAtMarkers::Search::doEvent(), LookAtMarkers::TrackMarker::doEvent(), KoduInterpreter::ReceiveActionRunner::FindObject::doStart(), KoduInterpreter::ReceiveActionRunner::ReceiveActionTurnAndGet::FindObject::doStart(), DualCoding::MapBuilder::executeRequest(), operator=(), and validateRequestType().

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

Definition at line 77 of file MapBuilderRequest.h.

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

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

Definition at line 59 of file MapBuilderRequest.h.

Referenced by operator=().

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

Definition at line 54 of file MapBuilderRequest.h.

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

Minimum length of ellipse semimajor axis, for isAdmissible() test.

Definition at line 53 of file MapBuilderRequest.h.

Referenced by DualCoding::MapBuilder::getCamDominoes(), and operator=().

Minimum length of a line with valid endpoints, for isAdmissible() test.

Definition at line 51 of file MapBuilderRequest.h.

Referenced by DualCoding::MapBuilder::getCamCrosses(), DualCoding::MapBuilder::getCamDominoes(), and operator=().

Minimum length of a line with an invalid endpoint, for isAdmissible() test.

Definition at line 52 of file MapBuilderRequest.h.

Referenced by operator=().

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

Definition at line 67 of file MapBuilderRequest.h.

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

length, width, and height of a naught (in mm)

Definition at line 65 of file MapBuilderRequest.h.

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

Number of camera images to combine, for noise reduction.

Definition at line 68 of file MapBuilderRequest.h.

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

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

Definition at line 50 of file MapBuilderRequest.h.

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

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

Definition at line 78 of file MapBuilderRequest.h.

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

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

Definition at line 100 of file MapBuilderRequest.h.

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

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

Definition at line 92 of file MapBuilderRequest.h.

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

Interval in msec between successive samples.

Definition at line 69 of file MapBuilderRequest.h.

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

The area to search, in egocentric or allocentric coords.

Definition at line 82 of file MapBuilderRequest.h.

Referenced by DualCoding::Pilot::LookForTarget::doStart(), DualCoding::Pilot::LookForObject::doStart(), DualCoding::Pilot::LocalizationUtility::TakeNextPicture::doStart(), KoduInterpreter::MotionActionRunner::ExecuteMotionAction::ExecuteSimpleMotion::FindMotionTarget::doStart(), KoduInterpreter::GrabActionRunner::ExecuteGrabAction::PrepareForAnotherGrasp::FindObjectAgain::doStart(), KoduInterpreter::GrabActionRunner::ExecuteGrabAction::PrepareForAnotherGrasp::LookAroundForObject::doStart(), KoduInterpreter::GrabActionRunner::ExecuteGrabAction::VerifyObjectWasGrabbed::LookAtTheGripper::doStart(), KoduInterpreter::DropActionRunner::ExecuteDrop::RepositionReleasedObject::LookForObjectAgain::doStart(), KoduInterpreter::DropActionRunner::ExecuteDrop::LookAtObjectAprilTag::doStart(), KoduInterpreter::PerceptualMultiplexor::FailureRecovery::ObjectManipRecovery::PrepareForAnotherGrasp::FindObjectAgain::doStart(), KoduInterpreter::PerceptualMultiplexor::FailureRecovery::ObjectManipRecovery::PrepareForAnotherGrasp::LookForTag::doStart(), KoduInterpreter::PerceptualMultiplexor::FailureRecovery::ObjectManipRecovery::VerifyObjectWasGrabbed::LookAtTheGripper::doStart(), KoduInterpreter::PerceptualMultiplexor::FailureRecovery::ObjectManipRecovery::PrepareForItemRecovery::LocateLostObject::doStart(), KoduInterpreter::InitializeAgent::LookAround::doStart(), DualCoding::MapBuilder::executeRequest(), DualCoding::MapBuilder::getCameraShapes(), Kodu::VisualNavErrMonTask::getMapBuilderRequest(), Kodu::VisualBumpDetectionTask::getMapBuilderRequest(), Kodu::VisualGripperMonitorTask::getMapBuilderRequest(), Kodu::VisualLocalizationTask::getPilotRequest(), operator=(), DualCoding::MapBuilder::scanForGazePts(), DualCoding::MapBuilder::setInitialGazePts(), and validateRequestType().

std::map<ShapeType_t, std::set<color_index> > DualCoding::MapBuilderRequest::secondColors

For two-colored objects (the bar color for dominoes).

Definition at line 49 of file MapBuilderRequest.h.

Referenced by addSecondColor(), DualCoding::MapBuilder::getCameraShapes(), operator=(), and validateRequest().

Path to the SIFT object database to load.

Definition at line 61 of file MapBuilderRequest.h.

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

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

Definition at line 62 of file MapBuilderRequest.h.

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

User routine to call after cam space processing.

Definition at line 85 of file MapBuilderRequest.h.

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

User routine to call after ground space processing.

Definition at line 86 of file MapBuilderRequest.h.

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

User routine to call after a camera image is received.

Definition at line 84 of file MapBuilderRequest.h.

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

User routine to call after local space processing.

Definition at line 87 of file MapBuilderRequest.h.

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

User routine to call after world space processing.

Definition at line 88 of file MapBuilderRequest.h.

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


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:20 2016 by Doxygen 1.6.3