Go to Post If you're doing it to win, you're doing it wrong. Teams who truly understand why they are doing what they do will win Chairman's simply as a result, an added benefit. The award isn't the goal. It's the impact you create, and the results you see. - dcarr [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2017, 13:18
njg njg is offline
Registered User
AKA: Noah Gawlik
FRC #2856
Team Role: Mentor
 
Join Date: Sep 2010
Rookie Year: 2009
Location: Lexington, KY
Posts: 3
njg is an unknown quantity at this point
Set Auto Selector choices on default dashboard from Java robot code?

Is there a means to set choices for the autonomous selector on the default (LabVIEW) dashboard from the robot's Java code? The iterative robot example code outlines how to accomplish this when using the Java SmartDashboard; however, for the LabVIEW dashboard it simply recommends reading whatever string the user has entered. Is there a better option?
Reply With Quote
  #2   Spotlight this post!  
Unread 30-01-2017, 13:47
RoboChair's Avatar
RoboChair RoboChair is offline
He who fixes with hammers #tsimfd
AKA: Devin Castellucci
FRC #1678 (Citrus Circuits and 5458 Digital Minds)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Davis, CA
Posts: 706
RoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond repute
Re: Set Auto Selector choices on default dashboard from Java robot code?

Don't use the smart dashboard to set your auto mode if you know whats good for you.

Put a bank of switches on your robot and use them to set your auto.
__________________

12 Years and counting! Over a third of my life has been spent with FRC.
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2017, 14:42
rlance rlance is offline
Registered User
FRC #5550
 
Join Date: Dec 2015
Location: Bethany, OK
Posts: 31
rlance is a splendid one to beholdrlance is a splendid one to beholdrlance is a splendid one to beholdrlance is a splendid one to beholdrlance is a splendid one to beholdrlance is a splendid one to beholdrlance is a splendid one to behold
Re: Set Auto Selector choices on default dashboard from Java robot code?

Quote:
Originally Posted by RoboChair View Post
Don't use the smart dashboard to set your auto mode if you know whats good for you.

Put a bank of switches on your robot and use them to set your auto.
Can you explain further what issues you have had with using the smart dashboard for this?
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2017, 14:52
RoboChair's Avatar
RoboChair RoboChair is offline
He who fixes with hammers #tsimfd
AKA: Devin Castellucci
FRC #1678 (Citrus Circuits and 5458 Digital Minds)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2005
Location: Davis, CA
Posts: 706
RoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond reputeRoboChair has a reputation beyond repute
Re: Set Auto Selector choices on default dashboard from Java robot code?

Quote:
Originally Posted by rlance View Post
Can you explain further what issues you have had with using the smart dashboard for this?
Some people have had auto fail, not run at all, computer reboot not allowing you to fit it in time, there are many other reasons to include. But mostly having it be purely robot side will make it start as fast as possible. Some of my teams programmers will have to reply if you need more precise answers, but there are plenty of teams out there that have been burned by relying on the smart dashboard.

#Storytime?
__________________

12 Years and counting! Over a third of my life has been spent with FRC.
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2017, 15:06
frcguy's Avatar
frcguy frcguy is offline
#GearsAllDay
AKA: Nicholas Dal Porto
FRC #5940 (B.R.E.A.D.)
Team Role: Tactician
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Burlingame, CA
Posts: 912
frcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond repute
Re: Set Auto Selector choices on default dashboard from Java robot code?

Quote:
Originally Posted by RoboChair View Post
Some people have had auto fail, not run at all, computer reboot not allowing you to fit it in time, there are many other reasons to include. But mostly having it be purely robot side will make it start as fast as possible. Some of my teams programmers will have to reply if you need more precise answers, but there are plenty of teams out there that have been burned by relying on the smart dashboard.

#Storytime?
Highly recommend the onboard switch method. We had a rotary switch on our robot last year and it worked wonders for setting auto. It allowed us to have an extremely customizable range of autos that we could instantly set and never failed during a match.
__________________


2017: Team 5940 (Silicon Valley Regional/San Francisco Regional)
2016: Team 5940 (Silicon Valley Regional Rookie All-Star and Quarterfinalist, Curie Quarterfinalist)

Volunteer: 2016 (Chezy Champs Field Reset, Capital City Classic FTA, MadTown ThrowDown FTA)
Reply With Quote
  #6   Spotlight this post!  
Unread 30-01-2017, 15:27
wesleyac's Avatar
wesleyac wesleyac is offline
Registered User
AKA: Wesley Aptekar-Cassels
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Davis, CA
Posts: 61
wesleyac is a splendid one to beholdwesleyac is a splendid one to beholdwesleyac is a splendid one to beholdwesleyac is a splendid one to beholdwesleyac is a splendid one to beholdwesleyac is a splendid one to beholdwesleyac is a splendid one to beholdwesleyac is a splendid one to behold
Re: Set Auto Selector choices on default dashboard from Java robot code?

It's not quite as cut-and-dry as Devin makes it sound, but it's true that we've used an auto selector switch in the past with great success.

The main issue with the default WPILib one* (or at least the implementation that many team seem to use) is that it has a network read to figure out what auto mode to run at the start of auto. We don't want to use that, because we tend to do a lot of buzzer-beater autos (2016 two-ball, 2015 chokehold, 2014 three ball, etc). Having the round trip latency from a network read would have killed us.

Other than that though, we tend not to trust NetworkTables/SmartDashboard. We've used them in the past (including last year, just not for auto selection) and have seen a lot of really weird difficult to debug issues. 1678 often ends up distrusting/not using wpilib stuff (I think that this is my second post today about it, and it's barely lunchtime ). I don't mean for this to be a cargo cult thing, but we really have seen a lot of issues with NetworkTables and SmartDashboard. I've seen it not connect, not send values, display old values, and randomly decide to stop working.

In the past, we've used a bank of switches to select auto modes, because it's easy and reliable. We may be switching to a custom web dashboard this year, but just because we're confident that we can pull it off.

Bottom line is that we used a switch bank for autos because it's reliable and simple, and SmartDashboard is neither of those, in our experience.

*Note that I haven't actually used this in quite a while, so it's possible that this has changed.
__________________
Quote:
Originally Posted by The programming team
Define "works."
Reply With Quote
  #7   Spotlight this post!  
Unread 30-01-2017, 15:31
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,274
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Set Auto Selector choices on default dashboard from Java robot code?

I highly recommend switches attached to your Driver Station, not to your Robot. Much more time to fix errors in the switches on the DS (up until start of match) than the Robot (can't get back onto the field).

Use something like this. It works like a USB joystick with a lot of buttons.
https://smile.amazon.com/dp/B00UUROWWK
__________________

Reply With Quote
  #8   Spotlight this post!  
Unread 30-01-2017, 17:09
Joey1939's Avatar
Joey1939 Joey1939 is offline
Registered User
AKA: Joey Holliday
FRC #1939 (Kuhnigits)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Kansas City, Missouri
Posts: 143
Joey1939 has a spectacular aura aboutJoey1939 has a spectacular aura aboutJoey1939 has a spectacular aura about
Re: Set Auto Selector choices on default dashboard from Java robot code?

Quote:
Originally Posted by wesleyac View Post
...The main issue with the default WPILib one* (or at least the implementation that many team seem to use) is that it has a network read to figure out what auto mode to run at the start of auto. We don't want to use that, because we tend to do a lot of buzzer-beater autos (2016 two-ball, 2015 chokehold, 2014 three ball, etc). Having the round trip latency from a network read would have killed us...
I was thinking about this the other day. Isn't NetworkTables implemented so that it is a server running on the RoboRIO. Meaning that when a value is changed on driver station, the change is pushed immediately to the RoboRIO, and therefore, there would be no network latency from the RoboRIO reading from its local server? I'm not sure if I'm interpreting this correctly.

I second trying to find an alternative way to set your autonomous. Last year at worlds, we didn't run an autonomous in several matches because we couldn't get the SmartDashboard to connect before the match started. We will probably stick with it though because it's just the easiest option.
__________________



Last edited by Joey1939 : 30-01-2017 at 17:12.
Reply With Quote
  #9   Spotlight this post!  
Unread 30-01-2017, 17:19
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,274
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Set Auto Selector choices on default dashboard from Java robot code?

Quote:
Originally Posted by Joey1939 View Post
I second trying to find an alternative way to set your autonomous. Last year at worlds, we didn't run an autonomous in several matches because we couldn't get the SmartDashboard to connect before the match started. We will probably stick with it though because it's just the easiest option.
Which is one of many reasons I don't like Smart Dashboard for use during competition. Debugging/development is fine. Relying upon it for competition is asking for trouble.

Switches on the Robot (either via AIO or DIO) is very easy to do. Switches on the Driver Station is a little harder, and comes with many advantages.
__________________

Reply With Quote
  #10   Spotlight this post!  
Unread 30-01-2017, 20:54
CurlyFries CurlyFries is offline
Registered User
AKA: Troy Martin
FRC #2512 (Duluth East Daredevils)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2014
Location: Duluth, MN
Posts: 22
CurlyFries is an unknown quantity at this point
Re: Set Auto Selector choices on default dashboard from Java robot code?

We have had the SmartDashboard "de-sync" in a couple of matches. You can set a default that will run if it does this, but that could lead to not so good things. We're planning on making a file on the roborio that we can edit before a match and then read from to determine autonomous. The only things we'll have to watch out for are making sure that the format we use to enter data into the file stays constant and we'll need to remember to re-create the file if ever we need to re-image the roborio during comp.
Reply With Quote
  #11   Spotlight this post!  
Unread 31-01-2017, 07:51
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 395
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Set Auto Selector choices on default dashboard from Java robot code?

We simply used SendableChooser last year. The only problems we had with it were due to SFX being terrible (it required us to double-select everything, and sometimes it forgot our team number, but besides that everything worked fine). There was plenty of time before auto started for NetworkTables to sync.
__________________
Creator of SmartDashboard.js, an extensible nodejs/webkit replacement for SmartDashboard


https://ligerbots.org
Reply With Quote
  #12   Spotlight this post!  
Unread 31-01-2017, 08:01
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 535
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Set Auto Selector choices on default dashboard from Java robot code?

We have had good success with the dashboard displaying the selection and using joysticks to adjust the choice.

We have had the failure of setting it in the dashboard, and having it not work. This was years ago, so we don't do that anymore, may work fine now.

*We are a Labview team
__________________
The sooner we get behind schedule, the more time we have to catch up.


Last edited by tr6scott : 31-01-2017 at 13:48. Reason: * Labview data
Reply With Quote
  #13   Spotlight this post!  
Unread 31-01-2017, 11:36
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: 336
fovea1959 will become famous soon enough
Re: Set Auto Selector choices on default dashboard from Java robot code?

Against all the advantages of onboard autonomous selection, doing it at the drive station handles the situation where the gates are closed on the field and everyone realizes that *no one* set the autonomous mode. You get one last chance to mouse it in....

We have not had problems with disconnects between requested autonomous and what we got, and we had upwards of 80 matches in the last year.
Reply With Quote
  #14   Spotlight this post!  
Unread 31-01-2017, 13:21
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 213
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Set Auto Selector choices on default dashboard from Java robot code?

I would also like to chime in and say that we have never had any problems with the smartdashboard not syncing properly and we have been using it to select auto modes for 3 years now.
Reply With Quote
  #15   Spotlight this post!  
Unread 31-01-2017, 13:38
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 440
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
We have user sendable chooser for years now for auto selection through smart dashboard, haven't had a problem since 2013 (selected auto mode on dash wasn't being sent out to the robot randomly and required robot reboot iirc).

Sent from my 6045I using Tapatalk
__________________
http://team2168.org
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 14:52.

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