You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the way we tune PID control loops is kinda bad. We're changing numbers and viewing the real-world results, but we're not actually looking for a numerical change. It's a lot of guessing until it seems like we've hit a limit. If we had fancy graphs, we could be a lot more objective and precise about this. We have logs, but the process for pulling those is kinda bad. We have to connect to the RIO using the DataLog tool, pull the logs (and we have to pull all of them, so they all get deleted to free up storage space), then look for the correct log out of all the logs we pulled. Which isn't easy, because the filenames are bad. We then have to select those, then use the DataLog tool to export from wpilib's binary format to a CSV file we can read. Then, to view the log, we must edit the process_wpilib_logs.py file to handle the log appropriately, then paste the full path of the file (copied and pasted from file explorer based on which is most recent) into the python script which will then spit out a very nice matplotlib plot.
This is annoying and not conducive to very efficient or particularly good PID tuning. Also it's annoying. Did I mention it's annoying? The goal is to write a python (technically there is no language requirement, but like, it's gonna be Python) script that does all of this automatically, so the programmer just has to push a button and get a graph.
Work Required
write a python script to pull the logs off the RIO, then delete them from the RIO
write a python script to convert the logs from .wpilog binaries to CSV files (I think there's a library that WPILib makes for this)
write a python script to automatically process a CSV file, creating a separate graph for each level in the path (ie /swerve/input is in a separate graph from /swerve/left/output, which is separate from /arm/input) with no operator intervention
write a python script to tie it all together, and that does it for only the latest log (although others can be specified, maybe using some kind of regex?)
Verification
script works
doesn't screw unduly with the repo (ie keeps everything contained to a single folder)
script is usable by rookies for future knowledge/tool base
The text was updated successfully, but these errors were encountered:
Summary
Low priority
Right now, the way we tune PID control loops is kinda bad. We're changing numbers and viewing the real-world results, but we're not actually looking for a numerical change. It's a lot of guessing until it seems like we've hit a limit. If we had fancy graphs, we could be a lot more objective and precise about this. We have logs, but the process for pulling those is kinda bad. We have to connect to the RIO using the DataLog tool, pull the logs (and we have to pull all of them, so they all get deleted to free up storage space), then look for the correct log out of all the logs we pulled. Which isn't easy, because the filenames are bad. We then have to select those, then use the DataLog tool to export from wpilib's binary format to a CSV file we can read. Then, to view the log, we must edit the
process_wpilib_logs.py
file to handle the log appropriately, then paste the full path of the file (copied and pasted from file explorer based on which is most recent) into the python script which will then spit out a very nice matplotlib plot.This is annoying and not conducive to very efficient or particularly good PID tuning. Also it's annoying. Did I mention it's annoying? The goal is to write a python (technically there is no language requirement, but like, it's gonna be Python) script that does all of this automatically, so the programmer just has to push a button and get a graph.
Work Required
.wpilog
binaries to CSV files (I think there's a library that WPILib makes for this)Verification
The text was updated successfully, but these errors were encountered: