|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#46
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
In addition to what Greg mentioned I would add checked exceptions which would make it safe to use exceptions in WPILibJ because you can have the compiler force you to handle every exception. I know a lot of Java developers dislike checked exceptions but I believe this is one place where it is useful.
|
|
#47
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
Find out what speed you (really) REQUIRE before using speed as a selection criterion. Quote:
Quote:
chews up most of my time when developing robot-ish software; not the robot software itself. Or you might not ![]() Blake |
|
#48
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
hm...I really like this idea. Now whether the programming team, mainly one guy, chooses to accept this idea, I'm pretty sure that all of a sudden, our programming base will expand simply because we have so many kids who are, or can be, good with Java. The school offers many classes not to mention I know for a fact that we have a couple of Java wizes in our school.
I like this. . |
|
#49
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I teach high computer science, and we have used the RidgeSoft IntelliBrain robots in class, which are programmed in Java.
Aside from the exception handling which has been mentioned, I would absolutely add event handling. Programming multiple sensors with the IntelliBrain (which has a MUCH more limited processor than the cRIO) is easy because of the way Java handles events. When I first learned Java (when the AP CS course moved from C++ to Java) the event and exception handling were among the first really cool things I noticed about Java. As for speed, I agree with gblake. It really depends on how you compile the code Running robots in the standard JVM would be slow. But I have written plenty of programs for OS X using XCode to compile Cocoa native applications for the Macintosh, and they run just as fast as Objective-C programs. As for tools, there may be a relative lack of robot specific libraries for Java, but there are some. Mindstorms and the aforementioned IntelliBrain robots can be programmed in Java. There are other platforms that use Java as well. The biggest thing to remember is that this is an addition. You don't have to use Java if you don't want to. But it will open up programming to more students, because Java is the language most will have learned in their HS computer science classes. |
|
#50
|
|||
|
|||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
On one hand, this is cool. I use Java, I like Java, I think Java is a great language.
On the other hand: ANOTHER PROGRAMMING SYSTEM???!!!! That means that I get to go through the whole C++/C/labVIEW decision process again, and if we decide to use it help bring the programming team up to speed on a new IDE, language, etc. |
|
#51
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
nathanww has a certain point and for teams who are still jumping around with programming have yet another option.
But for us, bringing kids up to par with the programming won't be so hard considering that the school has a curriculum in place for this already. |
|
#52
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Actually, I believe the java stuff could use eclipse also, so no changing IDE's.
![]() |
|
#53
|
|||
|
|||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
|
#54
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
even if it does use eclipse (the base of Windriver), there will definably be some differences, (like a cRIO connection thing) so you will have to learn some more stuff (though generally the same)
|
|
#55
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Java is what they use mainly where I go to college for CS, and I think this is partly because it is a more homogenous system for teaching than C or C++, where there could be many compilers and oddities between OSes (BTW, there is about an even mix of Linux, Windows, and OS X amongst the CS students there.)
Sun SPOTS are really interesting looking devices, but I think they have been poorly marketed. Anyway, they seem to handle Java in real-time pretty well, they are being used in a couple of cases as sensor networks. From what I can deduce from the press releases and the Java on FIRST website (http://sunspotworld.com/frc/Welcome.html) they will implement Java similarly. The Sun SPOTS have an ARM processor (the cRIO, a Freescale PPC) and they use the Squawk VM, which is specifically designed for embedded apps. This VM is running right on top of the hardware, so the user code isn't that far from the hardware. It certainly isn't farther from the hardware than VxWorks or LabVIEW, so Java code might be quicker than these methods, but that remains to be seen. As for Garbage Collection, each virtual machine has to implement that, thus Squawk's is almost certainly different than the 'typical' Java VM. From their site, they say they have three methods for GC which are user selectable (although they may not be in our case.) One successful example of using Java in robots is Basil (Google Jim and Louise Gunderson.) They've got a few Javelin stamps wired to a *ton* of sensors and outputs. There are countless other examples too. I believe there are a couple of hardware Java VMs too. A few students have shown interest in learning Java on my team, and I'm planning on holding class sessions during the summer. We transitioned directly from C to LabVIEW, so a major part of the class will be OO concepts. Sorry for the dissertation, but hopefully this is useful. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SECOND Robotics Competition "Underdrive" | Tanner | Off-Season Events | 2 | 11-22-2008 05:34 PM |
| Cannot "Grab frame" with java CMUcam2 GUI | TOECUTTER | Programming | 0 | 01-20-2007 12:50 PM |
| Rules of Engagement and "Unfair Competition" | Richard Neese | General Forum | 2 | 03-24-2003 01:03 PM |
| how tall is the ramp when in "up" and "balanced" position??? | archiver | 2001 | 1 | 06-24-2002 12:54 AM |
| An idea to better improve the First competition...or, at least make it more "hardcore"... | archiver | 1999 | 1 | 06-23-2002 10:02 PM |