Right now, issuing a second yellow card to a team while the first card is running resets the timer. To handle yellow cards properly, a second timer should be started in parallel.
If a command is issued within one second of changing the goalie number in the UI, then due to an interaction between the one second timeout for changing the goalie index to avoid thrashing and the refresh handling machinery for updating the UI with current commands, the goalie change is reverted.
The refbox window does not scale well; it is too large for low-resolution screens and cannot be resized down to co-occupy screen space with other software. It may also not scale up well for larger screens.
When I compile the latest version of the refbox, I receive the following error message during compilation:
gamecontroller.cc: In member function ‘void GameController::set_command(SSL_Referee::Command, bool)’:
gamecontroller.cc:462:68: error: conversion from ‘std::__success_type<std::chrono::duration<long long int, std::ratio<1ll, 1000000000ll> > >::type {aka std::chrono::duration<long long int, std::ratio<1ll, 1000000000ll> >}’ to non-scalar type ‘std::chrono::microseconds {aka std::chrono::duration<long long int, std::ratio<1ll, 1000000ll> >}’ requested
std::chrono::microseconds diff = std::chrono::system_clock::now() - std::chrono::system_clock::from_time_t(0);
I tried it with Lubuntu 13.10 (gcc 4.8.1) and Arch Linux (gcc 4.9.0). On Arch Linux it errors in the timing.cc file first, but with the same message.
Upon entering extra time, both teams must reset to having exactly two timeouts and five minutes available (as per appendix A); this is not currently done. Upon entering penalty shootout, timeouts may not be used and perhaps should thus reset to zero. Recheck that all details around break interval before extra time, half time during extra time, and break interval before penalty shootout are also correct.
There are lots of dynamic allocations, say in gamecontrol.cc. These should just be direct members; any that can't be direct members should use smart pointers. Look for other similar issues as well.
The serial port option for refbox communication has not been available to teams for years, by decision of the LOC; all teams have been required to use Ethernet. We should probably remove the serial port code for simplicity.
The compiler flags are crappy. There should be things like Wall, Wextra, other warning flags from the Thunderbots makefile, and perhaps O2 (using O0 is just utterly silly) and maybe even march=native though that one is less definite.
The cancel button is confusing. Some people aren’t sure when to use it and what it will do. Label it better, so it shows whether you will be cancelling a card or a timeout.
Every time the program is opened (without command line params at least) the log file is overwritten by a new one. Would be great to either have a different log file with date/time or to append
If custom team names have been typed into the team name fields instead of using the names from the drop-down, then the Switch Colours button does not properly switch the names.
The referee box currently keeps one saved state file, which is overwritten each time the program is started. Unfortunately, after a system failure, panicking operators may (and do) restart the refbox without restoring the saved state file before someone more familiar with the software arrives, destroying the original saved state.
Use timestamped save state files instead of a single file.
Sometimes a timeout is ended accidentally. Then the timeout should continue debiting time from the team, but resuming the timeout should not debit another timeout from the team’s stock.
A config option should be added. It should be disabled by default. When enabled, save states should be saved into timestamped files rather than a single referee.sav file. This would help sort out the problems which frequently pop up at competition where the refbox crashes and someone starts it again without knowing that they should use the state reload command, in the process destroying the precious saved state forever.
Add a window that can be opened showing certain outputs (team scores, game clock, and maybe a little more) that is suitable for dragging onto an external monitor for use as a large scoreboard for audiences and teams.
Sometimes people are confused by the fact that the free kick button is not labelled direct, and that neither one explains what to use for throw-ins, goal kicks, and corner kicks.
A new protocol should be introduced which publishes more information. Additional information beyond that currently exposed could include:
proper exposure of yellow card timers (after ticket #4 is closed), plus total number of yellow cards ever issued (for reference, not gameplay—suggested by jgurzoni)
number of red cards issued to each team during the game
overall game stage (one of pre-game, first half, halftime, second half, pre-extra-time interval, extra time first half, extra time halftime, extra time second half, pre-penalty-shootout interval, penalty shootout, or game over) which are really separate from immediate game state commands
number of timeouts and amount of time left for each team
UNIX timestamp of packet transmission (suggested by jgurzoni)
It is probably appropriate to use Protobuf for this. To encourage teams to migrate their code, we should transmit the protobuf packet immediately before the legacy packet so migration yields slightly better latency!
The documentation files included in the repository are very old. Main documentation belongs on the SSL wiki; the documentation files in the repo should be trimmed down to what makes sense and is current and should mostly point at the wiki.
If you issue a card and then enter a timeout, the Cancel button allows you to cancel the card instead of the timeout. It should allow you to cancel the timeout while you’re in the timeout, then, once you leave the timeout, revert to allowing you to cancel the card.
In the 2016 release, "Normal Start" could be clicked after clicking "Kickoff". It seems that this should also be the case, looking at https://robocup-ssl.github.io/ssl-refbox/state-machine.png . In the current version, "Normal Start" is greyed out.
Currently there are both a Makefile (which is the original build system and which I keep up to date) and a CMake file (which Michael Bleier wrote and wants to replace the Makefile with). It doesn’t make sense to have two build systems. Michael, you said in an e-mail you still had some things to deal with around the CMake file before it could fully replace the Makefile, including building for Windows. This ticket records that information in the right place.
When the operator changes the goalie using the spin buttons clicking with the mouse, the referee box will send packets with all the intermediate goalie indices as the operator reaches the final value. This will cause a lot of jitter as robots start moving towards, then stop and back away from, the goal, causing unnecessary wear and tear to teams’ robots. The referee box should wait until the goalie selector has not changed for one second before updating the packet with a new value.