#include <BallTrackingHead.h>
Public Member Functions | |
BallTrackingHead () | |
virtual | ~BallTrackingHead () |
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 | NotifyImage (const ONotifyEvent &event) |
void | NotifySensor (const ONotifyEvent &event) |
void | NotifyMovingHeadResult (const ONotifyEvent &event) |
void | NotifyMovingLegsResult (const ONotifyEvent &event) |
void | NotifyLostFoundSoundResult (const ONotifyEvent &event) |
Public Attributes | |
OSubject * | subject [numOfSubject] |
OObserver * | observer [numOfObserver] |
Private Member Functions | |
void | OpenPrimitives () |
void | NewCommandVectorData () |
void | PlaySound (BallTrackingHeadCommandType type) |
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 | |
BallTrackingHeadState | ballTrackingHeadState |
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 = 5 |
const int | TILT_INDEX = 0 |
const int | PAN_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 = 57.6 |
const double | FIELD_VIEW_V = 47.8 |
|
Definition at line 17 of file BallTrackingHead.cc. |
|
Definition at line 44 of file BallTrackingHead.h. |
|
Definition at line 146 of file BallTrackingHead_Image.cc. References byte, FIELD_VIEW_H, and FIELD_VIEW_V. Referenced by NotifyImage(). |
|
Definition at line 80 of file BallTrackingHead.cc. |
|
Definition at line 30 of file BallTrackingHead.cc. References NewCommandVectorData(), OpenPrimitives(), and SetCdtVectorDataOfPinkBall(). |
|
Definition at line 46 of file BallTrackingHead.cc. References ballTrackingHeadState, BTHCMD_MOVE_TO_SLEEPING, BTHCMD_MOVE_TO_ZERO_POS, and subject. |
|
Definition at line 67 of file BallTrackingHead.cc. References ballTrackingHeadState. |
|
Definition at line 119 of file BallTrackingHead_Joint.cc. References region. Referenced by MoveHead(). |
|
Definition at line 53 of file BallTrackingHead_Sensor.cc. References longword, PAN_INDEX, sensoridx, sensorRegions, and TILT_INDEX. Referenced by TrackBall(). |
|
Definition at line 37 of file BallTrackingHead_Sensor.cc. References jointID, and sensoridx. Referenced by NotifySensor(). |
|
Definition at line 70 of file BallTrackingHead_Joint.cc. References FindFreeRegion(), PAN_INDEX, SetJointValue(), subject, and TILT_INDEX. Referenced by SearchBall(), and TrackBall(). |
|
Definition at line 182 of file BallTrackingHead.cc. References jointID, NUM_FRAMES, NUM_JOINTS, and region. Referenced by DoInit(). |
|
Definition at line 17 of file BallTrackingHead_Image.cc. References BALL_CDT_CHAN, ballTrackingHeadState, BTHCMD_PLAY_FOUND_SOUND, BTHCMD_PLAY_LOST_SOUND, byte, CentroidAndDeltaAngle(), observer, PlaySound(), SearchBall(), and TrackBall(). |
|
Definition at line 143 of file BallTrackingHead.cc. References ballTrackingHeadState, observer, and BallTrackingHeadResult::status. |
|
Definition at line 87 of file BallTrackingHead.cc. References ballTrackingHeadState, observer, SearchBall(), and BallTrackingHeadResult::status. |
|
Definition at line 115 of file BallTrackingHead.cc. References ballTrackingHeadState, observer, SearchBall(), and BallTrackingHeadResult::status. |
|
Definition at line 16 of file BallTrackingHead_Sensor.cc. References InitSensorIndex(), initSensorIndex, observer, and sensorRegions. |
|
Definition at line 160 of file BallTrackingHead.cc. References fbkID, and jointID. Referenced by DoInit(). |
|
Definition at line 214 of file BallTrackingHead.cc. References subject. Referenced by NotifyImage(). |
|
Definition at line 20 of file BallTrackingHead_Joint.cc. References ballTrackingHeadState, lastRefPan, lastRefTilt, and MoveHead(). Referenced by NotifyImage(), NotifyMovingHeadResult(), and NotifyMovingLegsResult(). |
|
Definition at line 72 of file BallTrackingHead_Image.cc. References BALL_CDT_CHAN, and fbkID. Referenced by DoInit(). |
|
Definition at line 100 of file BallTrackingHead_Joint.cc. References jointID, and NUM_FRAMES. Referenced by MoveHead(). |
|
Definition at line 51 of file BallTrackingHead_Joint.cc. References ballTrackingHeadState, GetPanTiltAngle(), lastRefPan, lastRefTilt, and MoveHead(). Referenced by NotifyImage(). |
|
Definition at line 70 of file BallTrackingHead.h. Referenced by NotifyImage(), and SetCdtVectorDataOfPinkBall(). |
|
Definition at line 67 of file BallTrackingHead.h. |
|
Definition at line 94 of file BallTrackingHead.h. Referenced by DoStart(), DoStop(), NotifyImage(), NotifyLostFoundSoundResult(), NotifyMovingHeadResult(), NotifyMovingLegsResult(), SearchBall(), and TrackBall(). |
|
Definition at line 95 of file BallTrackingHead.h. Referenced by OpenPrimitives(), and SetCdtVectorDataOfPinkBall(). |
|
Definition at line 71 of file BallTrackingHead.h. Referenced by CentroidAndDeltaAngle(). |
|
Definition at line 72 of file BallTrackingHead.h. Referenced by CentroidAndDeltaAngle(). |
|
Definition at line 68 of file BallTrackingHead.h. |
|
Definition at line 98 of file BallTrackingHead.h. Referenced by NotifySensor(). |
|
Definition at line 96 of file BallTrackingHead.h. Referenced by BallTrackingHead(), InitSensorIndex(), NewCommandVectorData(), OpenPrimitives(), and SetJointValue(). |
|
Definition at line 101 of file BallTrackingHead.h. Referenced by SearchBall(), and TrackBall(). |
|
Definition at line 102 of file BallTrackingHead.h. Referenced by SearchBall(), and TrackBall(). |
|
Definition at line 69 of file BallTrackingHead.h. |
|
Definition at line 61 of file BallTrackingHead.h. |
|
Definition at line 64 of file BallTrackingHead.h. Referenced by NewCommandVectorData(), and SetJointValue(). |
|
Definition at line 63 of file BallTrackingHead.h. Referenced by NewCommandVectorData(). |
|
Definition at line 62 of file BallTrackingHead.h. |
|
Definition at line 47 of file BallTrackingHead.h. Referenced by NotifyImage(), NotifyLostFoundSoundResult(), NotifyMovingHeadResult(), NotifyMovingLegsResult(), and NotifySensor(). |
|
Definition at line 66 of file BallTrackingHead.h. Referenced by GetPanTiltAngle(), and MoveHead(). |
|
Definition at line 97 of file BallTrackingHead.h. Referenced by BallTrackingHead(), FindFreeRegion(), and NewCommandVectorData(). |
|
Definition at line 99 of file BallTrackingHead.h. Referenced by BallTrackingHead(), GetPanTiltAngle(), and InitSensorIndex(). |
|
Definition at line 100 of file BallTrackingHead.h. Referenced by GetPanTiltAngle(), and NotifySensor(). |
|
Definition at line 46 of file BallTrackingHead.h. Referenced by DoStart(), MoveHead(), and PlaySound(). |
|
Definition at line 65 of file BallTrackingHead.h. Referenced by GetPanTiltAngle(), and MoveHead(). |