|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Access the Auto List on Driver Station in Java
Quote:
|
|
#2
|
||||
|
||||
|
Re: Access the Auto List on Driver Station in Java
We just competed in the NY Tech Valley Regional this weekend and had a number of problems with Robot<->FMS<->DS SmartDashboard issues.
Aside from using several SendableChoosers to select auto and speed settings (don't need full speed for low-bar, do want to catch some air for the rock-wall), we use about 20 tunables on our SmartDashboard to help compensate for limited practice time, and some RoboRIO quirks (3 cameras, what was cam0 could be cam2 or cam3 next reboot). When it worked, it worked well.... It took most of our practice matches to figure out the problems. Match Scoring Delays - Refs would occasionally hold scores for a match for what seemed like a very long time all weekend long. While this was happening, field reset would be under way and the students are setting up the robot and DS. But because the prior match hasn't been scored yet, FMS is still configured for the last match. In some instances the MC was announcing teams immediately after the LCD station indicators had changed. FMS Setup Lag - From the time the FMS starts to setup the field, which seems to start with the changing of the team numbers above the station, it takes at least 30-45s, and sometimes over a minute, to begin to connect the DS to FMS and the Robot to the network. SmartDashboard / NetworkTables - Because the Robot is online this whole time, it's broadcasting it's NetworkTables settings (defaults) to the void. (Remember SmartDashboard is backed by NetworkTables). The DS is doing the same on it's side of the field, but unable to talk to each other yet. If the DS had been completely shut down since the last time it saw the Robot, it will have no settings, or it will still think it's NetworkTables are "good" from the last connection to the robot. Meeting of the Minds - Eventually you'll get FMS comms, Robot comms, and Robot Code on the DS, and NetworkTables attempts to sync between the DS and Robot. It's "supposed" to come to a consensus and have a unified view at this point. The SmartDashboard in lala-land - If you had your DS up, and NetworkTables had to come to consensus and you had your SmartDashboard open before you had Robot Code indication on the DS, this is where things fall off the rails. A good number of times we'd see "stale" settings and values on the SmartDashboard, when looking at the "Default" dashboard table were wrong on the SmartDashboard. Our solution was to tell the drive team to go to the SmartDashboard and File->New at this point after Robot Code is indicated. (You may be able to File->Load instead, but we never had the time to setup a really nice view we wanted to keep, we were adding/removing fields too quickly.) ... At this point you should be ready to configure your auto and any other settings you need. On our Robot we had 3 video cameras, and all too often they would juggle on a reboot. So we used 3 SmartDashboard strings to configure them. It would take the students a few seconds to identify which camera was which, make the settings, and verify, as well as set the auto, and tune the settings for the obstacle they were facing. (Once we had good numbers, this last step became unneeded.) They would also force calibrate the gyro at this point. But the match started?!!? This bit us way too many times -- because it took some time to get the settings in and calibration to complete, field reset had been finished well before FMS was ready. I had our drive captain go the to Head Ref and explain what was happening (score delay, fast field reset, FMS late setup, and a fast start), and he admitted he hadn't seen us trying to wave off the start of the match. From that point the 2-3 drive team members not working on the DS were up on the glass with thumbs-down and the refs would check before giving the go-ahead. TL;DR - SmartDashboard can be in lala land, try File->New once you have Comms. FMS takes too long to setup comms most times, this is worst on a fast field reset, and a long prior-match score delay. Make sure your HR knows you have some setup work to do and SmartDashboard is a bit buggy and use that thumbs-down to hold the match start. |
|
#3
|
|||
|
|||
|
Re: Access the Auto List on Driver Station in Java
This weekend's competition we had 100% success using the Smart Dashboard to select different autonomous modes. You need to make your selection after the robot is connected to the competition system.
|
|
#4
|
||||
|
||||
|
Re: Access the Auto List on Driver Station in Java
One thing we did to make things more reliable was to make sure that the Preferences had the last picked autonomous settings. That way the robot can come up and the drivers are confident that the settings they had in queue will be what they see when the robot boots on the field.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|