Go to Post A very important thing that I learned is how to think, not what to think. - Anna B. [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 20-03-2016, 10:27
RSNovi RSNovi is offline
Registered User
FRC #6081
 
Join Date: Jan 2016
Location: Grass Lake
Posts: 14
RSNovi is an unknown quantity at this point
Re: Access the Auto List on Driver Station in Java

Quote:
Originally Posted by RufflesRidge View Post
I wonder if the different behavior you are seeing vs. the other poster is related to you using command based vs. them not. Because your data in each option is an object, it may be considered to be different each time where if there's is a string or something, the dashboard side may see it as the same. That may trigger the behavior difference, if the list is "different" it's possible you need to make the selection after the robot links to give you the new value for the object.
I wish I could test this besides during matches. I could set a variable during the polling of the button and use a case statement in AutonomousInit to see if it helps. Thanks for the help.
Reply With Quote
  #17   Spotlight this post!  
Unread 20-03-2016, 14:25
bdaroz's Avatar
bdaroz bdaroz is offline
Programming Mentor
AKA: Brian Rozmierski
FRC #5881 (TVHS Dragons)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Albany, NY
Posts: 405
bdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud of
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.
Reply With Quote
  #18   Spotlight this post!  
Unread 02-04-2016, 19:23
RSNovi RSNovi is offline
Registered User
FRC #6081
 
Join Date: Jan 2016
Location: Grass Lake
Posts: 14
RSNovi is an unknown quantity at this point
Re: Access the Auto List on Driver Station in Java

Quote:
Originally Posted by RSNovi View Post
I wish I could test this besides during matches. I could set a variable during the polling of the button and use a case statement in AutonomousInit to see if it helps. Thanks for the help.
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.
Reply With Quote
  #19   Spotlight this post!  
Unread 11-04-2016, 13:10
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 332
fovea1959 will become famous soon enough
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi