BallTrackingHead7 Class Reference

#include <BallTrackingHead7.h>

List of all members.

Public Member Functions

 BallTrackingHead7 ()
virtual ~BallTrackingHead7 ()
virtual OStatus DoInit (const OSystemEvent &event)
virtual OStatus DoStart (const OSystemEvent &event)
virtual OStatus DoStop (const OSystemEvent &event)
virtual OStatus DoDestroy (const OSystemEvent &event)
void NotifyResult (const ONotifyEvent &event)
void NotifyImage (const ONotifyEvent &event)
void NotifySensor (const ONotifyEvent &event)

Public Attributes

OSubject * subject [numOfSubject]
OObserver * observer [numOfObserver]

Private Member Functions

void OpenPrimitives ()
void NewCommandVectorData ()
void Execute (MoNetCommandID cmdID)
void SetCdtVectorDataOfPinkBall ()
bool CentroidAndDeltaAngle (const OFbkImage &cdtImage, int *xcentroid, int *ycentroid, double *delta_pan, double *delta_pan)
void InitSensorIndex (OSensorFrameVectorData *sensorVec)
void GetPanTiltAngle (longword frameNum, double *pan, double *tilt)
void SearchBall ()
void TrackBall (longword frameNum, double delta_pan, double delta_pan)
void MoveHead (double s_pan, double s_tilt, double e_pan, double e_tilt, double *r_pan, double *r_tilt, double pan_limit, double tilt_limit)
void SetJointValue (RCRegion *rgn, int idx, double start, double end)
RCRegion * FindFreeRegion ()

Private Attributes

BallTrackingHead7State state
OPrimitiveID fbkID
OPrimitiveID jointID [NUM_JOINTS]
RCRegion * region [NUM_COMMAND_VECTOR]
bool initSensorIndex
int sensoridx [NUM_JOINTS]
list< RCRegion * > sensorRegions
double lastRefPan
double lastRefTilt

Static Private Attributes

const size_t NUM_COMMAND_VECTOR = 4
const size_t NUM_SENSOR_VECTOR = 2
const size_t NUM_JOINTS = 2
const size_t NUM_FRAMES = 4
const int PAN_INDEX = 0
const int TILT2_INDEX = 1
const byte BALL_THRESHOLD = 10
const int FOUND_THRESHOLD = 2
const int LOST_THRESHOLD = 5
const OCdtChannel BALL_CDT_CHAN = ocdtCHANNEL0
const double FIELD_VIEW_H = 56.9
const double FIELD_VIEW_V = 45.2


Constructor & Destructor Documentation

BallTrackingHead7::BallTrackingHead7  ) 
 

Definition at line 17 of file BallTrackingHead7.cc.

References BTHS7_IDLE, jointID, region, and sensoridx.

virtual BallTrackingHead7::~BallTrackingHead7  )  [inline, virtual]
 

Definition at line 46 of file BallTrackingHead7.h.


Member Function Documentation

bool BallTrackingHead7::CentroidAndDeltaAngle const OFbkImage &  cdtImage,
int *  xcentroid,
int *  ycentroid,
double *  delta_pan,
double *  delta_pan
[private]
 

Definition at line 146 of file BallTrackingHead7_Image.cc.

References byte, FIELD_VIEW_H, and FIELD_VIEW_V.

Referenced by NotifyImage().

OStatus BallTrackingHead7::DoDestroy const OSystemEvent &  event  )  [virtual]
 

Definition at line 75 of file BallTrackingHead7.cc.

OStatus BallTrackingHead7::DoInit const OSystemEvent &  event  )  [virtual]
 

Definition at line 32 of file BallTrackingHead7.cc.

References NewCommandVectorData(), OpenPrimitives(), and SetCdtVectorDataOfPinkBall().

OStatus BallTrackingHead7::DoStart const OSystemEvent &  event  )  [virtual]
 

Definition at line 48 of file BallTrackingHead7.cc.

References Execute(), STAND2STAND_NULL, and state.

OStatus BallTrackingHead7::DoStop const OSystemEvent &  event  )  [virtual]
 

Definition at line 62 of file BallTrackingHead7.cc.

References state.

void BallTrackingHead7::Execute MoNetCommandID  cmdID  )  [private]
 

Definition at line 172 of file BallTrackingHead7.cc.

References subject.

Referenced by DoStart(), and NotifyImage().

RCRegion * BallTrackingHead7::FindFreeRegion  )  [private]
 

Definition at line 119 of file BallTrackingHead7_Joint.cc.

References region.

Referenced by MoveHead().

void BallTrackingHead7::GetPanTiltAngle longword  frameNum,
double *  pan,
double *  tilt
[private]
 

Definition at line 53 of file BallTrackingHead7_Sensor.cc.

References longword, PAN_INDEX, sensoridx, sensorRegions, and TILT2_INDEX.

Referenced by TrackBall().

void BallTrackingHead7::InitSensorIndex OSensorFrameVectorData *  sensorVec  )  [private]
 

Definition at line 37 of file BallTrackingHead7_Sensor.cc.

References jointID, and sensoridx.

Referenced by NotifySensor().

void BallTrackingHead7::MoveHead double  s_pan,
double  s_tilt,
double  e_pan,
double  e_tilt,
double *  r_pan,
double *  r_tilt,
double  pan_limit,
double  tilt_limit
[private]
 

Definition at line 70 of file BallTrackingHead7_Joint.cc.

References FindFreeRegion(), PAN_INDEX, SetJointValue(), subject, and TILT2_INDEX.

Referenced by SearchBall(), and TrackBall().

void BallTrackingHead7::NewCommandVectorData  )  [private]
 

Definition at line 140 of file BallTrackingHead7.cc.

References jointID, NUM_FRAMES, NUM_JOINTS, and region.

Referenced by DoInit().

void BallTrackingHead7::NotifyImage const ONotifyEvent &  event  ) 
 

Definition at line 17 of file BallTrackingHead7_Image.cc.

References BALL_CDT_CHAN, byte, CentroidAndDeltaAngle(), Execute(), observer, PLAY_FOUND_SOUND, PLAY_LOST_SOUND, SearchBall(), state, and TrackBall().

void BallTrackingHead7::NotifyResult const ONotifyEvent &  event  ) 
 

Definition at line 82 of file BallTrackingHead7.cc.

References MoNetResult::commandID, monetCOMPLETION, observer, SearchBall(), state, and MoNetResult::status.

void BallTrackingHead7::NotifySensor const ONotifyEvent &  event  ) 
 

Definition at line 16 of file BallTrackingHead7_Sensor.cc.

References InitSensorIndex(), initSensorIndex, observer, and sensorRegions.

void BallTrackingHead7::OpenPrimitives  )  [private]
 

Definition at line 118 of file BallTrackingHead7.cc.

References fbkID, and jointID.

Referenced by DoInit().

void BallTrackingHead7::SearchBall  )  [private]
 

Definition at line 20 of file BallTrackingHead7_Joint.cc.

References lastRefPan, lastRefTilt, MoveHead(), and state.

Referenced by NotifyImage(), and NotifyResult().

void BallTrackingHead7::SetCdtVectorDataOfPinkBall  )  [private]
 

Definition at line 72 of file BallTrackingHead7_Image.cc.

References BALL_CDT_CHAN, and fbkID.

Referenced by DoInit().

void BallTrackingHead7::SetJointValue RCRegion *  rgn,
int  idx,
double  start,
double  end
[private]
 

Definition at line 100 of file BallTrackingHead7_Joint.cc.

References jointID, and NUM_FRAMES.

Referenced by MoveHead().

void BallTrackingHead7::TrackBall longword  frameNum,
double  delta_pan,
double  delta_pan
[private]
 

Definition at line 51 of file BallTrackingHead7_Joint.cc.

References GetPanTiltAngle(), lastRefPan, lastRefTilt, MoveHead(), and state.

Referenced by NotifyImage().


Member Data Documentation

const OCdtChannel BallTrackingHead7::BALL_CDT_CHAN = ocdtCHANNEL0 [static, private]
 

Definition at line 70 of file BallTrackingHead7.h.

Referenced by NotifyImage(), and SetCdtVectorDataOfPinkBall().

const byte BallTrackingHead7::BALL_THRESHOLD = 10 [static, private]
 

Definition at line 67 of file BallTrackingHead7.h.

OPrimitiveID BallTrackingHead7::fbkID [private]
 

Definition at line 95 of file BallTrackingHead7.h.

Referenced by OpenPrimitives(), and SetCdtVectorDataOfPinkBall().

const double BallTrackingHead7::FIELD_VIEW_H = 56.9 [static, private]
 

Definition at line 71 of file BallTrackingHead7.h.

Referenced by CentroidAndDeltaAngle().

const double BallTrackingHead7::FIELD_VIEW_V = 45.2 [static, private]
 

Definition at line 72 of file BallTrackingHead7.h.

Referenced by CentroidAndDeltaAngle().

const int BallTrackingHead7::FOUND_THRESHOLD = 2 [static, private]
 

Definition at line 68 of file BallTrackingHead7.h.

bool BallTrackingHead7::initSensorIndex [private]
 

Definition at line 98 of file BallTrackingHead7.h.

Referenced by NotifySensor().

OPrimitiveID BallTrackingHead7::jointID[NUM_JOINTS] [private]
 

Definition at line 96 of file BallTrackingHead7.h.

Referenced by BallTrackingHead7(), InitSensorIndex(), NewCommandVectorData(), OpenPrimitives(), and SetJointValue().

double BallTrackingHead7::lastRefPan [private]
 

Definition at line 101 of file BallTrackingHead7.h.

Referenced by SearchBall(), and TrackBall().

double BallTrackingHead7::lastRefTilt [private]
 

Definition at line 102 of file BallTrackingHead7.h.

Referenced by SearchBall(), and TrackBall().

const int BallTrackingHead7::LOST_THRESHOLD = 5 [static, private]
 

Definition at line 69 of file BallTrackingHead7.h.

const size_t BallTrackingHead7::NUM_COMMAND_VECTOR = 4 [static, private]
 

Definition at line 61 of file BallTrackingHead7.h.

const size_t BallTrackingHead7::NUM_FRAMES = 4 [static, private]
 

Definition at line 64 of file BallTrackingHead7.h.

Referenced by NewCommandVectorData(), and SetJointValue().

const size_t BallTrackingHead7::NUM_JOINTS = 2 [static, private]
 

Definition at line 63 of file BallTrackingHead7.h.

Referenced by NewCommandVectorData().

const size_t BallTrackingHead7::NUM_SENSOR_VECTOR = 2 [static, private]
 

Definition at line 62 of file BallTrackingHead7.h.

OObserver* BallTrackingHead7::observer[numOfObserver]
 

Definition at line 49 of file BallTrackingHead7.h.

Referenced by NotifyImage(), NotifyResult(), and NotifySensor().

const int BallTrackingHead7::PAN_INDEX = 0 [static, private]
 

Definition at line 65 of file BallTrackingHead7.h.

Referenced by GetPanTiltAngle(), and MoveHead().

RCRegion* BallTrackingHead7::region[NUM_COMMAND_VECTOR] [private]
 

Definition at line 97 of file BallTrackingHead7.h.

Referenced by BallTrackingHead7(), FindFreeRegion(), and NewCommandVectorData().

int BallTrackingHead7::sensoridx[NUM_JOINTS] [private]
 

Definition at line 99 of file BallTrackingHead7.h.

Referenced by BallTrackingHead7(), GetPanTiltAngle(), and InitSensorIndex().

list<RCRegion*> BallTrackingHead7::sensorRegions [private]
 

Definition at line 100 of file BallTrackingHead7.h.

Referenced by GetPanTiltAngle(), and NotifySensor().

BallTrackingHead7State BallTrackingHead7::state [private]
 

Definition at line 94 of file BallTrackingHead7.h.

Referenced by DoStart(), DoStop(), NotifyImage(), NotifyResult(), SearchBall(), and TrackBall().

OSubject* BallTrackingHead7::subject[numOfSubject]
 

Definition at line 48 of file BallTrackingHead7.h.

Referenced by Execute(), and MoveHead().

const int BallTrackingHead7::TILT2_INDEX = 1 [static, private]
 

Definition at line 66 of file BallTrackingHead7.h.

Referenced by GetPanTiltAngle(), and MoveHead().


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 23:04:33 2007 for openSDK by  doxygen 1.3.9.1