Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

VRmixin Class Reference

#include <VRmixin.h>

Inheritance diagram for VRmixin:

List of all members.


Detailed Description

Mix-in for the BehaviorBase or StateNode class to give access to VisualRoutinesBehavior variables.

Definition at line 34 of file VRmixin.h.


Public Member Functions

 VRmixin ()
 Constructor.
virtual ~VRmixin (void)
 Destructor.

Static Public Member Functions

static SketchSpacegetCamSkS ()
 returns reference to the global space instances, call there from global constructors instead of accessing camSkS, which might not be initialized yet
static SketchSpacegetLocalSkS ()
static SketchSpacegetWorldSkS ()
static ShapeSpacegetGroundShS ()
static MapBuildergetMapBuilder ()
 returns reference to the global WorldMapBuilder instance, call this from global constructors instead of accessing worldSkS/localSkS/groundShS/etc., which might not be initialized yet
static LookoutgetLookout ()
static PilotgetPilot ()
static void startCrew ()
 starts map builders, pilot, and lookout
static void stopCrew ()
 stops map builders, pilot, and lookout
static bool rleEncodeSketch (const SketchDataRoot &image)
static Sketch< ucharsketchFromSeg ()
 Import the current color-segmented camera image as a Sketch<uchar>.
static Sketch< ucharsketchFromChannel (const RawCameraGenerator::channel_id_t chan)
 Import channel n image as a Sketch<uchar>.
static Sketch< ucharsketchFromRawY ()
 Import the current y-channel camera image as a Sketch<uchar>.
static std::vector< Shape
< BlobData > > 
getBlobsFromRegionGenerator (const color_index color, int minarea=25, const BlobData::BlobOrientation_t orient=BlobData::groundplane, const coordinate_t height=0, const int maxblobs=50)
 Import blobs from the current region list as a vector of Shape<BlobData>.
static void processSketchRequest (const std::string &line, SketchSpace &sketches, ShapeSpace &shapes)
 processes a single line of input for a Sketch request
static void projectToGround (const NEWMAT::Matrix &camToBase, const NEWMAT::ColumnVector &ground_plane=kine->calculateGroundPlane())
 project shapes from cam space to ground space

Static Public Attributes

static SketchSpacecamSkS = VRmixin::getCamSkS()
 The camera sketch space.
static ShapeSpacecamShS = VRmixin::getCamSkS().getDualSpace()
 The camera shape space.
static ShapeSpacegroundShS = VRmixin::getGroundShS()
 The ground shape space of MapBuilder (MapBuilder::groundShS).
static SketchSpacelocalSkS = VRmixin::getLocalSkS()
 The localmap sketch space (LocalMapBuilder::localSkS).
static ShapeSpacelocalShS = VRmixin::getLocalSkS().getDualSpace()
 The localmap shape space (LocalMapBuilder::localShS).
static SketchSpaceworldSkS = VRmixin::getWorldSkS()
 The worldmap sketch space (WorldMapBuilder::localSkS).
static ShapeSpaceworldShS = VRmixin::getWorldSkS().getDualSpace()
 The worldmap sketch space (WorldMapBuilder::localShS).
static Shape< AgentDatatheAgent
 The robot (usually lives in worldShS).
static MapBuildermapBuilder = VRmixin::getMapBuilder()
 the global world mapbuilder instance
static Lookoutlookout = VRmixin::getLookout()
 the global Lookout instance
static Pilotpilot = VRmixin::getPilot()
 the global Pilot instance
static PFShapeLocalizationparticleFilter = NULL
 the global particle filter instance

Static Protected Attributes

static unsigned int instanceCount = 0
 count of NewVRmixin instances -- when this hits zero, free sketch spaces
static unsigned int crewCount = 0
 count of "crew" (pilot, lookout, map builders) users -- stop these when no one is using them

Private Member Functions

 VRmixin (const VRmixin &)
 never call this
VRmixinoperator= (const VRmixin &)
 never call this

Static Private Member Functions

static int camDialogSockCallback (char *buf, int bytes)
 Called whenever data is received on camDialogSocket.
static int localDialogSockCallback (char *buf, int bytes)
 Called whenever data is received on localDialogSocket.
static int worldDialogSockCallback (char *buf, int bytes)
 Called whenever data is received on worldDialogSocket.
static void dialogCallback (char *buf, int bytes, std::string &incomplete, SketchSpace &SkS, ShapeSpace &ShS)

Static Private Attributes

static Socket * camDialogSock = NULL
 socket to talk with cam-space sketch viewer
static Socket * camRleSock = NULL
 socket for transmitting RLE images to cam-space sketch viewer
static Socket * localDialogSock = NULL
 socket to talk with local-space sketch viewer
static Socket * localRleSock = NULL
 socket for transmitting RLE images to local-space sketch viewer
static Socket * worldDialogSock = NULL
 socket to talk with world-space sketch viewer
static Socket * worldRleSock = NULL
 socket for transmitting RLE images to world-space sketch viewer
static VRmixintheOne = NULL
 used so static member functions can access non-static members

Constructor & Destructor Documentation

VRmixin (  ) 

Constructor.

Definition at line 92 of file VRmixin.cc.

~VRmixin ( void   )  [virtual]

Destructor.

Definition at line 147 of file VRmixin.cc.

VRmixin ( const VRmixin  )  [private]

never call this


Member Function Documentation

SketchSpace & getCamSkS (  )  [static]

returns reference to the global space instances, call there from global constructors instead of accessing camSkS, which might not be initialized yet

Definition at line 35 of file VRmixin.cc.

Referenced by VRmixin::getGroundShS().

SketchSpace & getLocalSkS (  )  [static]

Definition at line 38 of file VRmixin.cc.

SketchSpace & getWorldSkS (  )  [static]

Definition at line 41 of file VRmixin.cc.

ShapeSpace & getGroundShS (  )  [static]

Definition at line 44 of file VRmixin.cc.

MapBuilder & getMapBuilder (  )  [static]

returns reference to the global WorldMapBuilder instance, call this from global constructors instead of accessing worldSkS/localSkS/groundShS/etc., which might not be initialized yet

Definition at line 69 of file VRmixin.cc.

Lookout & getLookout (  )  [static]

Definition at line 75 of file VRmixin.cc.

Pilot & getPilot (  )  [static]

Definition at line 81 of file VRmixin.cc.

void startCrew (  )  [static]

starts map builders, pilot, and lookout

Definition at line 192 of file VRmixin.cc.

Referenced by VisualRoutinesStateNode::DoStart(), and VisualRoutinesBehavior::DoStart().

void stopCrew (  )  [static]

stops map builders, pilot, and lookout

Definition at line 206 of file VRmixin.cc.

Referenced by VisualRoutinesStateNode::DoStop(), and VisualRoutinesBehavior::DoStop().

bool rleEncodeSketch ( const SketchDataRoot image  )  [static]

Definition at line 263 of file VRmixin.cc.

Referenced by VRmixin::processSketchRequest().

Sketch< uchar > sketchFromSeg (  )  [static]

Import the current color-segmented camera image as a Sketch<uchar>.

Import a color-segmented image as a Sketch<uchar>.

Definition at line 275 of file VRmixin.cc.

Referenced by TargetData::extractLineTarget(), MapBuilder::grabCameraImageAndGo(), and Lookout::requestComplete().

Sketch< uchar > sketchFromChannel ( const RawCameraGenerator::channel_id_t  chan  )  [static]

Import channel n image as a Sketch<uchar>.

Import channel n as a Sketch<uchar>.

Definition at line 286 of file VRmixin.cc.

Referenced by VRmixin::sketchFromRawY().

Sketch< uchar > sketchFromRawY (  )  [static]

Import the current y-channel camera image as a Sketch<uchar>.

Definition at line 310 of file VRmixin.cc.

Referenced by MapBuilder::processImage().

vector< Shape< BlobData > > getBlobsFromRegionGenerator ( const color_index  color,
int  minarea = 25,
const BlobData::BlobOrientation_t  orient = BlobData::groundplane,
const coordinate_t  height = 0,
const int  maxblobs = 50 
) [static]

Import blobs from the current region list as a vector of Shape<BlobData>.

Import the results of the region generator as a vector of Shape<BlobData>.

Definition at line 317 of file VRmixin.cc.

Referenced by MapBuilder::getCamBlobs().

void processSketchRequest ( const std::string &  line,
SketchSpace sketches,
ShapeSpace shapes 
) [static]

processes a single line of input for a Sketch request

Definition at line 338 of file VRmixin.cc.

Referenced by VRmixin::dialogCallback().

void projectToGround ( const NEWMAT::Matrix &  camToBase,
const NEWMAT::ColumnVector &  ground_plane = kine->calculateGroundPlane() 
) [static]

project shapes from cam space to ground space

Definition at line 217 of file VRmixin.cc.

Referenced by MapBuilder::projectToGround().

VRmixin& operator= ( const VRmixin  )  [private]

never call this

int camDialogSockCallback ( char *  buf,
int  bytes 
) [static, private]

Called whenever data is received on camDialogSocket.

Definition at line 226 of file VRmixin.cc.

Referenced by VRmixin::VRmixin().

int localDialogSockCallback ( char *  buf,
int  bytes 
) [static, private]

Called whenever data is received on localDialogSocket.

Definition at line 232 of file VRmixin.cc.

Referenced by VRmixin::VRmixin().

int worldDialogSockCallback ( char *  buf,
int  bytes 
) [static, private]

Called whenever data is received on worldDialogSocket.

Definition at line 238 of file VRmixin.cc.

Referenced by VRmixin::VRmixin().

void dialogCallback ( char *  buf,
int  bytes,
std::string &  incomplete,
SketchSpace SkS,
ShapeSpace ShS 
) [static, private]


Member Data Documentation

unsigned int instanceCount = 0 [static, protected]

count of NewVRmixin instances -- when this hits zero, free sketch spaces

Definition at line 36 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

unsigned int crewCount = 0 [static, protected]

count of "crew" (pilot, lookout, map builders) users -- stop these when no one is using them

Definition at line 37 of file VRmixin.h.

Referenced by VRmixin::startCrew(), and VRmixin::stopCrew().

ShapeSpace & camShS = VRmixin::getCamSkS().getDualSpace() [static]

ShapeSpace & groundShS = VRmixin::getGroundShS() [static]

The ground shape space of MapBuilder (MapBuilder::groundShS).

Definition at line 49 of file VRmixin.h.

Referenced by MapBuilder::isLineVisible(), and VRmixin::projectToGround().

SketchSpace & localSkS = VRmixin::getLocalSkS() [static]

The localmap sketch space (LocalMapBuilder::localSkS).

Definition at line 51 of file VRmixin.h.

Referenced by VRmixin::localDialogSockCallback(), VRmixin::VRmixin(), and VRmixin::~VRmixin().

SketchSpace & worldSkS = VRmixin::getWorldSkS() [static]

The worldmap sketch space (WorldMapBuilder::localSkS).

Definition at line 54 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), VRmixin::worldDialogSockCallback(), and VRmixin::~VRmixin().

ShapeSpace & worldShS = VRmixin::getWorldSkS().getDualSpace() [static]

The worldmap sketch space (WorldMapBuilder::localShS).

Definition at line 55 of file VRmixin.h.

Referenced by PathPlanner::addLandmark(), ShapeSpace::clear(), VRmixin::startCrew(), VRmixin::VRmixin(), VRmixin::worldDialogSockCallback(), and VRmixin::~VRmixin().

the global particle filter instance

Definition at line 68 of file VRmixin.h.

Referenced by Pilot::CreepToShapeLocalize::DoStart(), Pilot::Localize::processMap(), VRmixin::startCrew(), and VRmixin::stopCrew().

Socket * camDialogSock = NULL [static, private]

socket to talk with cam-space sketch viewer

Definition at line 71 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

Socket * camRleSock = NULL [static, private]

socket for transmitting RLE images to cam-space sketch viewer

Definition at line 72 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

Socket * localDialogSock = NULL [static, private]

socket to talk with local-space sketch viewer

Definition at line 73 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

Socket * localRleSock = NULL [static, private]

socket for transmitting RLE images to local-space sketch viewer

Definition at line 74 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

Socket * worldDialogSock = NULL [static, private]

socket to talk with world-space sketch viewer

Definition at line 75 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

Socket * worldRleSock = NULL [static, private]

socket for transmitting RLE images to world-space sketch viewer

Definition at line 76 of file VRmixin.h.

Referenced by VRmixin::VRmixin(), and VRmixin::~VRmixin().

VRmixin * theOne = NULL [static, private]

used so static member functions can access non-static members

Definition at line 124 of file VRmixin.h.

Referenced by VRmixin::camDialogSockCallback(), VRmixin::dialogCallback(), VRmixin::localDialogSockCallback(), VRmixin::VRmixin(), VRmixin::worldDialogSockCallback(), and VRmixin::~VRmixin().


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

DualCoding 4.0
Generated Thu Nov 22 00:54:07 2007 by Doxygen 1.5.4