Since Iām moving to software lead for my team this year, this is something I have a huge interest in.
To that end Iām more than willing to work on this in order to facilitate better FTA-student interactions, and bring teams to a better understanding of āwhatās going onā on the field. I think initial capability should be things that help FTAās diagnose a mid-match lost connection on the field, mid-match āmy climb stopped working!ā situations, etc. Emphasis should be on showing the evidence to the team in an easily-consumed manner. Therefore it seems like we should be able to define a default set of values to ālogā, and then send them to the driverās station at whatever rate is plausible. The PDB has a plethora of valuable information.
One thing to facilitate better consumption of the data is more automated meta-data about a match from FMS. The live score may be a bit of a stretch, but if we could at least get the match number & match type (practice, qual, non-field modes, etc) itād go a long way towards automating saving a file, finding the right log for a match, etc.
One final note - this has to be tested on a live field using the ādefaultā configs teams set (static IP vs mDNS, etc). Not getting custom data through the field network using the allowed ports was been hugely frustrating the last two seasons.
Now for opinions on āhowāā¦
One of the tricks for live-logging of a numerical system through a bandwidth-limited connection is a strict array of doubles. If you think about it, a number in an array has two inherent pieces of information: position (order = metadata) and value. During the āhandshakeā phase of a comms link, the mapping of the arrays is sent: a byte identifier identifying the type of array, followed by an array of IDās (we can get away with string identifiers, but edge-case systems use 1-byte identifiers) which state what the value at the position of the array represents. Think of it like the header row of a spreadsheet.
A āmessageā would be comprised of an array-type identifier, time-since-origin (microseconds), and then the array of values. Types of messages would be raw sensor values, raw input values, state machines, etc - and even a re-mapping of what any given array type means. We could skip decoding if we want, and simply us an existing messaging framework so long as the data is just an array of doubles. In our system, we could even log as quickly as we want on the robot in-memory, and then send the messages over in batches using whatever message framework we want. Most *MQ frameworks support batched messages, as-would custom byte decoders.
We could use JSON for the message format, but I wouldnāt recommend it. Everything would be converted from a double to a string, thereby reducing how much logging we could do for a single match.
Using this setup we got approximately 30hz logging to the driverās station in 2012-2014, ranging from 13 fields in 2012 to 40-ish in 2014. We had live feeds each year, and as we learned more we were able to get the bandwidth of the system down to just a few dozen kbps. The eventual limiting factor was student understanding of not kludging up the logging system on the robot side (i.e. CPU usage). This is something I plan to get right this coming season.