GT RoboCup SSL
Soccer software, robot firmware
|
The ref module listens to a port for referee packets over the network. More...
Public Member Functions | |
NewRefereeModule (Context *const ctx) | |
void | stop () |
void | getPackets (std::vector< NewRefereePacket *> &packets) |
bool | kicked () |
void | useExternalReferee (bool value) |
bool | useExternalReferee () |
void | blueTeam (bool value) |
bool | blueTeam () |
void | updateGameState (bool blueTeam) |
void | spinKickWatcher () |
Public Attributes | |
NewRefereeModuleEnums::Stage | stage |
NewRefereeModuleEnums::Command | command |
RJ::Time | sent_time |
RJ::Time | received_time |
RJ::Seconds | stage_time_left |
int64_t | command_counter |
RJ::Time | command_timestamp |
TeamInfo | yellow_info |
TeamInfo | blue_info |
Protected Types | |
enum | KickDetectState { WaitForReady, CapturePosition, WaitForKick, VerifyKick, Kicked } |
Protected Member Functions | |
virtual void | run () override |
void | ready () |
Protected Attributes | |
volatile bool | _running |
KickDetectState | _kickDetectState |
Geometry2d::Point | _readyBallPos |
QTime | _kickTime |
QMutex | _mutex |
std::vector< NewRefereePacket * > | _packets |
Context *const | _context |
NewRefereeModuleEnums::Command | prev_command |
NewRefereeModuleEnums::Stage | prev_stage |
bool | _useExternalRef = false |
bool | _blueTeam = false |
float | ballPlacementx |
float | ballPlacementy |
The ref module listens to a port for referee packets over the network.
Referee packets are sent out from the ssl-refbox program. You can see the protobuf packet for full details, but the packets contains info about which stage of the game it is, team scores, yellow/red cards, etc.
Each time a new packet arrives, the ref module updates the GameState object with the new information.
void NewRefereeModule::spinKickWatcher | ( | ) |
Only run the kick detector when the ball is visible
Never kicked and not ready for a restart