Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

ProjectInterface.cc File Reference

Provides instantiation of the non-required members of ProjectInterface. More...

#include "ProjectInterface.h"
#include "Vision/colors.h"
#include <string>
#include "Motion/EmergencyStopMC.h"
#include "Motion/MotionPtr.h"
#include "Wireless/Socket.h"
#include "Vision/SegmentedColorGenerator.h"
#include "debuget.h"
#include <exception>
Include dependency graph for ProjectInterface.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ProjectInterface
 

A collection of the global variables which should be set by a project to use the Tekkotsu framework.


Functions

void ProjectInterface::noSendCommandErr (const std::string &cmd)
 default implementation used for sendCommand (just displays a warning and ignores the call)
bool ProjectInterface::displayException (const char *file, int line, const char *message, const std::exception *ex)
 Displays information about an exception on serr, provides a default value for uncaughtException.
color_index ProjectInterface::defLookupColorIndexByName (const std::string &name)
 default implementation assigned to lookupColorIndexByName(); checks that defSegmentedColorGenerator is non-NULL and returns getColorIndex on it
color_index ProjectInterface::defLookupColorIndexByRgb (const rgb rgbval)
 default value initially assigned to lookupColorIndexByRgb(); checks that defSegmentedColorGenerator is non-NULL and returns getColorIndex on it
rgb ProjectInterface::defLookupColorRGB (color_index cindex)
 default implementation assigned to lookupColorRGB(); checks that defSegmentedColorGenerator is non-NULL and returns getColorRGB on it
const char * ProjectInterface::defLookupColorName (color_index cindex)
 default implementation assigned to lookupColorName(); checks that defSegmentedColorGenerator is non-NULL and returns getColorName on it
unsigned int ProjectInterface::defLookupNumColors ()
 default value initially assigned to lookupNumColors(); checks that defSegmentedColorGenerator is non-NULL and returns getNumColors on it

Variables

MotionPtr< EmergencyStopMCProjectInterface::estopInstance
MotionPtr< EmergencyStopMC > & ProjectInterface::estop = estopInstance
 The active emergency stop motion command, used by various behaviors and controls to test whether they are in control.
void(* ProjectInterface::sendCommand )(const std::string &cmd) = noSendCommandErr
 sends a command to the project, allows GUI elements of the framework to send commands to the hardware abstraction layer
bool(* ProjectInterface::uncaughtException )(const char *file, int line, const char *message, const std::exception *ex) = &displayException
 The exception handler for exceptions which have fallen through to base Tekkotsu functions.
color_index(* ProjectInterface::lookupColorIndexByName )(const std::string &name) = &defLookupColorIndexByName
 allows you to override how colors are defined -- by default, this will be set to a function which passes the call to defSegmentedColorGenerator
color_index(* ProjectInterface::lookupColorIndexByRgb )(const rgb rgbval) = &defLookupColorIndexByRgb
 returns color index for color with specified "representitive" RGB color
rgb(* ProjectInterface::lookupColorRGB )(color_index cindex) = &defLookupColorRGB
 allows you to override how colors are defined -- by default, this will be set to a function which passes the call to defSegmentedColorGenerator
const char *(* ProjectInterface::lookupColorName )(color_index cindex) = &defLookupColorName
 allows you to override how colors are defined -- by default, this will be set to a function which passes the call to defSegmentedColorGenerator
unsigned int(* ProjectInterface::lookupNumColors )() = &defLookupNumColors
 returns the number of indexed colors which are currently defined
Vision Setup

A collection of the various stages of vision processing. None of these are absolutely required, but are needed to run included demo behaviors and TekkotsuMon modules

FilterBankGeneratorProjectInterface::defRawCameraGenerator = NULL
 pointer to generator
FilterBankGeneratorProjectInterface::defRawDepthGenerator = NULL
 pointer to generator
FilterBankGeneratorProjectInterface::defInterleavedYUVGenerator = NULL
 pointer to generator
JPEGGeneratorProjectInterface::defColorJPEGGenerator = NULL
 pointer to generator
JPEGGeneratorProjectInterface::defGrayscaleJPEGGenerator = NULL
 pointer to generator
PNGGeneratorProjectInterface::defColorPNGGenerator = NULL
 pointer to generator
PNGGeneratorProjectInterface::defGrayscalePNGGenerator = NULL
 pointer to generator
SegmentedColorGeneratorProjectInterface::defSegmentedColorGenerator = NULL
 pointer to generator
RLEGeneratorProjectInterface::defRLEGenerator = NULL
 pointer to generator
RegionGeneratorProjectInterface::defRegionGenerator = NULL
 pointer to generator
Vision SIDs

Default source IDs for the various generators; These are given default values, but you can reassign them if you like.

unsigned int ProjectInterface::visRawCameraSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visRawDepthSID = 1
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visInterleaveSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visColorJPEGSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visGrayscaleJPEGSID = 1
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visColorPNGSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visGrayscalePNGSID = 1
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visSegmentSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visRLESID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visRegionSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visPinkBallSID = 0
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visBlueBallSID = 1
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visGreenBallSID = 2
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visYellowBallSID = 3
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visOrangeSID = 4
 source id for vision events from the corresponding pipeline stage or object detector
unsigned int ProjectInterface::visHandSID = visOrangeSID
 synonym for visOrangeSID
Layer Resolutions

Allows you to request a particular layer abstractly - this isn't used by the framework, just a suggestion for clarity

unsigned int ProjectInterface::doubleLayer = 5
 ERS-2xx: 352*288; ERS-7 416*320 (requires non-trivial computation).
unsigned int ProjectInterface::fullLayer = 4
 ERS-2xx: 176*144; ERS-7 208*160.
unsigned int ProjectInterface::halfLayer = 3
 ERS-2xx: 88*72; ERS-7 104*80.
unsigned int ProjectInterface::quarterLayer = 2
 ERS-2xx: 44*36; ERS-7 52*40.
unsigned int ProjectInterface::eighthLayer = 1
 ERS-2xx: 22*18; ERS-7 26*20 (simply a bigger interleave referencing quarterLayer).
unsigned int ProjectInterface::sixteenthLayer = 0
 ERS-2xx: 11*9; ERS-7 13*10 (simply a bigger interleave referencing quarterLayer).

Detailed Description

Provides instantiation of the non-required members of ProjectInterface.

Author:
ejt (Creator)

Definition in file ProjectInterface.cc.


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