Java Questions and Concerns

Hello ChiefDelphi! I have what is, hopefully, a quick question… or a few questions.

EDIT: Yes, I realize that the cRIO could have issue running Java SE which is why they use a variant of Java ME. A man who has been using Java SE for so long can hope we move past Java ME some day.

With the beta-testing of SmartDashboard 2.0 and its development, does this mean we will be getting JavaSE 7 in order to use JavaFX? That would be awesome in introducing the availability of Generics, a more commonly used Java Version, and a much more vast array of tools… like PROPER Enumerations.

On an unrelated note, is it legal to construct a library for use by a future team of programmers to provide extra Math Functions, Handlers, Helpers and so on to ease the learning process? Or is that within competition rules?

One more question if we will be allowed to use JavaSE 7.

Do you think we will be allowed to use the Reflection API? It is unlikely to be useful but if there is something I can do with it and it is available I will find it because Reflection can be AWESOME especially for a library (if that is within competition rules).

We can only speculate at the answer for your other hypothetical questions, but for this question at least there is a concrete answer found in R13 (section 4.4) of the game manual:

ROBOT elements created before Kickoff are not permitted. ROBOT elements, including software, that are designed before Kickoff are not permitted.

Exceptions include the following:

[/li]> [li]battery assemblies per R5-A, and
[/li]> [li]software and designs with source files publicly available prior to Kickoff.
[/li]> [/LIST]

Specifically, example 5:

Example 5: A different Team develops a similar solution during the fall, and plans to use the developed software on their competition ROBOT. After completing the software, they post it in a generally accessible public forum and make the code available to all Teams. Because they have made their software publicly available before Kickoff, they can use it on their ROBOT.

In other words, your described scenario is valid provided you make the library available to the general public prior to kickoff.

Perfect, I am all for Open Source.

And I am to some degree looking for speculation. I have heard from several sources, including previous posts in this forums that “we will have Java 7” next year, to paraphrase.

My question relating to Reflection could apply to any case where you alter internal variables. With Reflection you could even modify Private Variables as long as you have the source code available to name the Field, Method, Constructor or so on. I think it would be useful for publicly available libraries especially BUT its ability to modify variables and parameters otherwise invisible makes it a risky feature to allow. Even if you are only allowing access to the Reflection API.

To make it factually substantial sources could be stated or provided but I think to some degree news relating to the future of programming in the FRC is not disseminated enough.

Just curious: what extra Math Functions did you have in mind?

I suppose my main focus would be on teaching recursion and the core computer science curriculum as well as extra bits, albeit without the over-abstraction. Since I have no implementation as of now I can show you what I am basing it off of.

This Interpolation Class and This Math Class. The Math Class would not nearly be as extensive except I would centralize the functions offered by Squawk and Java ME into the class just for ease of use. Likely the interpolation class would come with either a JavaFX or Javax.Swing demo to demonstrate how the functions work and what results they yield for values.

I mention interpolation specifically because the problem I have seen from past code, at least for my team, is that the implementation for acceleration and deceleration are somewhat jittery although it is likely Linear Interpolation would be enough. Also what I do depends on if we do get Java SE 7, I could make a much more powerful library in that case that wraps around the WPI Core Classes.

Other stuff I would probably add, since this is focused on my team though it will be open source, is Thread Management and Implementation as well as Event Timing. What I want to do and what I will do all depends on what I can do with the robot after the competition. And I am not the best at coming up with things off the top of my head so sorry if any of it seems redundant.

It was stated during the NI Q/A for the RoboRIO that we would be using Java SE Embedded. Unfortunately, the NI Q/A is no longer available online.

At this point, there is a lot more information available about the RoboRIO then there was about the cRIO in March of 2008. Not to say it can’t be better, however.

Ah, thanks. After you said that I did a bit more research and I found a bit more information. But hey, any information is better than no information (or bad information for that matter).

I am now a bit more excited for next year so I can use SE. Though I will still have to switch between new and old robots, a non-issue though.

Again, thanks!