Go to Post It's not fair. it's not right, but stuff like this happens. If you don't get picked for finals tomorrow, get in those stands and cheer for those who did. Remember, this is FIRST. - wilsonmw04 [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 22-01-2017, 20:41
RobotMom97 RobotMom97 is offline
Registered User
no team
 
Join Date: Jan 2017
Location: Michigan
Posts: 2
RobotMom97 is an unknown quantity at this point
Java Connection Problems

I have heard that last year there was a delay in connecting to the FIRST competition field if you used Java coding. Did anyone experience this that can share any insight? Also do you know if the problem has been addressed this year? Thanks for any input.
Reply With Quote
  #2   Spotlight this post!  
Unread 22-01-2017, 21:57
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: 408
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: Java Connection Problems

We used Java last year. Sometimes we were very fast, sometimes slower.

There are a number of things that affect connection speed.

Generally things happen in this order:
1. Scores from the last match are finalized, and the FMS begins reconfiguring the network.
2. The configuration process took at least 90s to 2 minutes.
3. Radios connect to the field access point
4. Robot-Driver station connectivity can begin

In our case at the Tech Valley regional, the biggest delay was often in FMS configuration. Often we were on the field, and booted, before the score from the last match posted.

In some of our matches our delay was in robot boot times, especially the radio. Usually the RoboRio would boot, and run the code, before the radio was booted.

So, while it's true C++ code starts faster on the RoboRio (the Java JVM takes a bit to load before it can start the code), in most cases the slight delay (a few seconds at most) doesn't matter. I can't speak to LabView, but I suspect it's equally irrelevant.
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2017, 17:40
RobotMom97 RobotMom97 is offline
Registered User
no team
 
Join Date: Jan 2017
Location: Michigan
Posts: 2
RobotMom97 is an unknown quantity at this point
Re: Java Connection Problems

I had heard that because the field was running on LabVIEW, it took longer for the Java to connect. I just want to make sure that we don't run into this problem if we choose to code in Java. Do you know if there was a delay in communication due to the different program languages? Or if they have addressed the issue?
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2017, 00:23
thatnameistaken thatnameistaken is offline
Registered User
AKA: Joshua Johnston
FRC #2191 (Flux Core)
Team Role: College Student
 
Join Date: Oct 2012
Rookie Year: 2013
Location: Hamilton, NJ
Posts: 62
thatnameistaken is on a distinguished road
Re: Java Connection Problems

While we run LabVIEW, I've never in my 4 years on the field noticed an alliance partner take an oddly long time to connect outside of booting late or FMS issues that affected the whole alliance. I can also tell you that when the FMS was late to configure for the next match, all 3 alliance members tended to gain connection simultaneously.

I've never once heard of Java bots being slow to connect until this thread.
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2017, 01:32
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 148
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: Java Connection Problems

Let me chime in as an FTA and WPILib developer. None of the officially supported languages (or Python or C# for that matter) take any longer than the others to connect on the field. @bdaroz has a good summary of the events that go on after a match, although FIRST has made some improvements to the radio configuration step. Last year configuration only took 15-30 seconds. The main bottleneck for connecting to the field in 2016 was radio boot time: While being far more reliable in operation than the dlink's were, they take a long time to start up.

Now, that's not to say that it isn't possible to create code that takes a very long time to start up and go green on the field. Java, like any language, can be abused. But if you're using the standard WPILibJ templates and not going too crazy, you should be fine.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-01-2017, 22:07
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Java Connection Problems

The code in the roboRIO, NetworkCommunications task, that connects the robot to the Driver Station is the same for any language running on the robot.

When you see the "Communications" indicator turn from red to green on the field, that means that the Driver Station has connected with the robot. Then a few seconds later, the "Robot Code" turns green indicating that the code is advertising that it's running.

This page:

https://wpilib.screenstepslive.com/s...-by-ni-labview

describes those indicators.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute

Last edited by BradAMiller : 22-01-2017 at 22:10.
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 07:15.

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