MARSProgramming / MARS-2020

1 stars 0 forks source link

Setup Dashboard Architecture #7

Open iamr2003 opened 4 years ago

iamr2003 commented 4 years ago

Look at how the 2018 LV dashboard was made, and seek to mimic its behavior in regard to setting calibration values. There are a variety of requirements for the dashboard, a list off the top of my head for now is:

Controls: -Auto play selection -ability to change cals(this is the complicated bit, cals must save on the robot(preferably in a text file), and also be displayed back on dash upon boot up, dash must not push cals before an update, or all can become 0s. Work with andrew to think about this logic.)

Cals list: -Drive PIDFs(same for both sides atm) -Auto-Target on turret PIDS -Cardinal points of turret -turret limits(safeties) -Magazine speed, intake speed -Climb PIDs/settings(might be dependent upon zone where you climbed)

Indicators: -flag/audio for when a ball is serialized -if automated subsystems are active(targeting, climbing, etc.) -current position/connection of all encoders(turret, drive, magazine, flywheel) -if anything is broken/non-functional(related to safety tickets)

iamr2003 commented 4 years ago

Also make sure you can get at least 1 cam feed in the dashboard, though two would be optimal.

WVGman commented 4 years ago

We've added all calibration values as said in the ticket and wired them correctly following 2018's code, and we also have the default camera feed is still there. Tomorrow we will test with robot code and motors and hopefully, we will get more indicators for better coverage of the robot. Some wacky things are happening when we build though, the camera is getting cut off, and the tab control has weird things where it gets cut off and increasing the window's width only reveals part of it but with a weird margin thing, idk what's happening

Khensa commented 4 years ago

We've been working on the Calibration Tab. We have it so that we can adjust code in the dashboard and push it back to the original file ("Write"). For reading from the text file, the values are going through but are not displaying on the dashboard.

wmstanton commented 4 years ago

calibration files for 2018 can be found here: https://github.com/jbrusoe/MARS-Private/tree/master/MARS-Repos/2018/2018%20Build%20Season/2018%20Autonomous%20Plays%20and%20Paths/Trunk/Alpha%20Cals

wmstanton commented 4 years ago

also check out the code for reading from a calibration file and sending data to/from dashboard from last season: https://github.com/jbrusoe/MARS-Private/tree/master/MARS-Repos/2019/2019_Build_Season/mOS_XII/2019_Robot/Trunk/Subsytems/Dashboard

WVGman commented 4 years ago

We are now able to add an indicator to the dashboard and have it automatically write and read values from a .csv. Updated code in the dashboard branch. We have it finished in calibration, now need to set it up in operation and auto tabs. The only time you would have to change the code is if you wanted to add a new tab control with indicators in it

WVGman commented 4 years ago

To be done: 1) Test auto selection 2) Confirm whether to read cals from robot or driver station 3) Compare controls in robot .csvs with global variable in the robot code and front panel controls ✓ 4) Write logic to push calibrations via NT String Arrays to robot ✓ 5) Write code to recieve those string arrays, and use them in the operations tab (maybe change subvi for read to have string arrays as input)

Epicr12 commented 4 years ago

I have added in all of the safety subvis that I was able to locate. The indicators for them are in the operations tab. We might want to test if they still work when they are on the dashboard.

Khensa commented 4 years ago

Loaded Calibration files to Robo-rio

Epicr12 commented 4 years ago

I have put in indicators for all of the encoder positions

WVGman commented 4 years ago

we need to add a placeholder value at the start of each .csv file because the first value in each array gets corrupted for whatever reason and resets to 0, adding a placeholder removes this issue entirely

Epicr12 commented 4 years ago

We tested the pidfs and the graph is not changing despite the fact that, according to the probe, the actual values are changing. @iamr2003

WVGman commented 4 years ago

Ok everything seems to be working, values in the .csv write to the dashboard, the dashboard writes back to the .csvs, globals are good, indicators of rpm values, ect are working with the tests we made, and the auto play selector should work, we just don't have what the selector needs to select (I'm assuming it's going to be integrated soon), camera works

WVGman commented 4 years ago

All safeties are added, ready for testing on alpha