I’ve been interested in data logging on the competition robot for a long time. It’s been one of those things where we’ve repeatedly “wouldn’t it be nice if…” but we’ve never gone back and spent the time to make it happen.
The one or two times we’ve looked at doing something the kids implemented something ‘quick and dirty’ that caused us problems down the road, due to memory consumption, or slow loops. So they were quickly put on the shelf.
Are there some best practices we should be looking at? For instance:
On one occasion, the kids tried logging by storing information in arrays to write to a file at the end of a match. However, we watched the memory usage and cpu usage increase throughout the match and it began to effect the performance of the Rio - so that effort was set aside.
On another occasion, the kids tried to send all the global variables over network tables and then log them on the driver station computer. But the network table default update rate meant they didn’t get the data all the data they wanted.
So - what’s the best practice? I’d imagine that writing the data to a file on the Rio is optimal. But should the data be written every loop? Should it be stored and periodically written? How much of an impact would that have the Rio performance?
I’m sure other people have already gone way down this rabbit hole, but I’d like to give the team members some direction on what they are doing. Their ‘end’ goal is to do all this in LabVIEW, and then write a playback program that they can ‘watch’ the telemtry during a match to determine what was going on and where things went wrong.