|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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.
|
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
|||
|
|||
|
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. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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. Last edited by BradAMiller : 22-01-2017 at 22:10. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|