![]() |
"Java, Sun SPOT and the FIRST Robotics Competition"
This just came up in Google Reader; after a quick search I couldn't find it posted anywhere here and thought it might be interesting to many CD'ers:
http://blogs.sun.com/roger/entry/java_sun_spot_and_the |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
That's very interesting. Java on FIRST robots... not bad. Its really good to get options out there to students, and the more programming languages able to run on FIRST robots the better it is for students.
Let the C++ vs Java rivalry begin. :D |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
This is not related to SUN but it's so welcoming to see some familiar pits in the article pictures!
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Note to self: Review Java....
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I hate Java (its a religious thing though, no actual reason), but this is pretty cool. Now if they would just get rid of vxWorks and let us use Linux on there we'd be really set...
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I think this move will attract a lot of people, especially in schools that offer computer science courses in Java. There are probably quite a number of them, too, since AP Computer Science works in Java.
I'm going to speak with my school's computer science teacher. Maybe she can get her students involved with the team also! Maybe we can also get the College Board to work with FIRST to make a new case study revolved around the new library. Who's with me? :p |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I think that Java working with devices is a great step...I personally do not like Java at all but it's nice to see how popular FIRST has become that you can even program in Java now. It might bring an increase to the amount of students that join robotics teams.
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I'm excited to dive into Java as an alternative after a subpar experience with LabVIEW this year. I do have a few questions about how much of the more advanced/third party Java solutions we can use that will still be executable on the cRIO. Unfortunately, I didn't get a chance to drop in and say hi to the people from Sun at the competition over the weekend.
For example, can we use Java-based wrappers and implementations for other languages such as JRuby (my guess is yes, because Java is compiled into bytecode anyways, so whatever third-party libraries used should be compiled with it)? And will there be the ability to use a testing framework such as JUnit (with the emulator, it might be possible. I'd just rather not have to build and load every time I need to test out a small tweak or new feature, especially in the process of developing said feature)? |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Wow - This dovetails very nicely with the Java client I have been developing for the 5th Gear FRC robotics simulator - That Java client replaces human players with computer control of one or more of the simulation's virtual robots - Blake
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I think it's great to offer alternative platforms for development. With that said, I think Sun and or WPI will need to offer some good examples in Java before it will really catch on in our community.
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I also hope that they release it before fall like their website says. Or at least release it in beta stages (they obviously have somewhat of an alpha product as they had a robot running on Java at CMP).
It was reasonable for NI and WPI/WindRiver to release their programs and languages in the fall because nobody had the cRIO until then. But now that teams have a cRIO, they can beta and submit patches or feedback during practice in the summer. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
As a teacher of AP and IB computer science and an FRC advisor, I like this opportunity a lot. It will make the learning curve for new programmers much less steep on the average, since the overwhelming majority of high school CS classes are Java based. While there are things I don't like about it, the way Java handles events and exceptions will make robot programming much easier for students to pick up. In particular this should be a good avenue for making sensors more easily used.
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
The build system uses nant, and they will have plugins for the NetBeans IDE and maybe the Eclipse IDE as well. (As a side note, it was probably not a good idea to ask the father of the Java language why they are using a Sun IDE rather than one developed by IBM.) The cRio will basically be formatted for c++ with the initial program being a bootstrapper to start the JVM. It sounded like this initial JVM will then listen for communication with the development PC and start a second VM with the robot code in it. Hopefully this means that it will be much easier to reprogram and test without the 30 second start up time. All of this, of course, was in pre beta and could very easily change before it is released. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
One mentor came by the booth and wasn't aware of the three button reboot, so they were power cycling the entire robot each time they deployed. Is this a similar situation? Or are you unable to simply reboot the controller? Or is your controller taking 30 seconds to reboot? Greg McKaskle |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Hang on, let me get this straight....
Is Labview still available to teams to program the robot? Is it that Java is replacing Labview or we're just gonna' have a 3rd programming language available? |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
However, at one of the feedback sessions they did mention considering dropping C (not C++, just C) support: Only one team reported using it, and they were planning to move away from it any way. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
It'll be interesting to see what happens here since Sun is now being bought out:
http://www.pcworld.com/article/16340...n_for_74b.html Whenever a new owner comes in, a lot of old projects within a company being bought out can get axed rather suddenly. Hopefully this isn't one of them. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Heh, the cRIO is getting complicated :ahh:. So long as the other two languages aren't glitched by adding another one in, I see this as an opportunity for other teams. We'll stick with the C++ core with a Java display on the front-end. That hits all of the strong points on our team. :cool:
I can't wait to have the "But there are no memory leaks in Java!" discussion...just wait, it will happen. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
What I want to know, is whether this is going to open the door a little be more for other platforms to program on.(aka mac os, linux, ??solaris??).
None the less, this looks like an exciting thing to come out to the world of FRC. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
{edit} Sorry, I meant these 3 platforms: Windows, OS X, and Linux. I assume they figured that very few robot people would be interested in using it on Solaris, but I'm sure they could make that work too. {/edit} |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
Don't even get me started on the ridiculous amount of time it takes to build a LabVIEW program this year. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
you can reboot by pressing the reset button on the crio. the programmers on our team have a rebooting tool, a small philips screwdriver that fits perfectly in the button. it's faster than the complete power cycle, and as fast (if not faster) as Reset target server (or whatever it is called, using WR)
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
After speaking with a number of teams, many do not know about the 3 finger reboot. Also, some of those that did know didn't know that if it doesn't display "Robot Rebooting" on the driver station screen that robot didn't reboot.
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
Thats what the FPGA is for, it takes care of the nasty latency dependent stuff for us (among other things). Quote:
From the experience I've had so far, porting software to vxWorks is really annoying (even nix-like software) because it has random oddities in its networking library (and other libraries too). The biggest advantage I see for linux would be that theres a *ton* of software that would pretty much *just work* without too much modification. Not so with vxWorks. Then we wouldn't be just talking about java bots, we could have python bots or ruby bots... :p |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
In any case, I value the flexibility quite a bit more than I value the realtimeness. Cmon, a robot controlled by a shell script... would be pretty amusing. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
B) We were half hoping that someone, somewhere would port lolcode to vxWorks... |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
I'm still holding out for Ruby on the cRIO. Although our codin' mentor respectfully disagrees (sorry, Ian :D)
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
I'm interested in a "Ruby is good at A, B and C but it is bad at X, Y and Z", not in starting a flame war. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
It's also good for making certain teams' website people cringe.
(If you want an amusing read about ruby, go for who's poignant guide to ruby. It has pictures ^^) (I has a var?) |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
Ruby is equivalent to Python in terms that it is great at small programs, algorithms, and the such (and I like Rails), but I would never use it for a full application, let alone a robot. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Ruby is like Cobol, just with a different syntax. It's yet another programming language. The difference is in the libraries that you can use without writing them.
In a robot context there isn't a big advantage between Basic, C, Cobol, C, C++, Fortran, Java, Javascript, Perl or Ruby. You are doing basic math / geometry calcs, basic data in (joysticks) and data out (motors). The problem you face in a Ruby (Java, Perl, etc) world is to get the programmers to use existing library code and to not reinvent the world. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
With a vxWorks JVM implementation, you could run Armed Bear Common Lisp on the compactRIO, which would be incredible. I'd love to port WPILib or something similar to Common Lisp.
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
It's not only geometry/basic math calculations, But I agree with the fact that for most robot's that's fine. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Remember that there will be a Java VM on the cRIO (the Squawk VM), so in theory any language that compiles down to JVM bytecode should run on the cRIO. Think JRuby (Ruby), Jython (Python), Scala, Clojure, Groovy, etc.
That said, Squawk implements Java ME, not Java SE, which could cause some problems, as some of those language implementations may be geared towards Java SE. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
Quote:
:D |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Can someone who knows more about this me give a few reasons why Java would be better or worse than c++. I know that it is simpler to learn, and that many students know it from taking AP compsci (myself included), but because I don't know c++ I don't really know what negative effects switching to Java would have. Each programmer will have his or her preference, but I want to know what the major benefits and drawbacks will be using Java in place of c++.
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Java is a safe language, with references, but not pointers. Java does garbage collection so that you don't leak memory in the same way. Java has a simpler and more consistent syntax. Java, being a teaching language, presumably has material aimed at teaching to HS students.
On the down side, Java will run quite a bit slower. The garbage collection causes hiccups where the OS is doing something besides running your code. C++ probably has more robotics usage, so more code to borrow from. While doing the comparisons, LV is a safe language with no pointers. LV does garbage collection upon completion, but not during execution. LV has the simplest syntax of the bunch. I expect that LV is faster than Java and slower than C++. Oh, and there is that graphics and dataflow thing. This is my input from a thousand foot perspective. I can't say much more until it is in my hands and we can do side-by-side-by-side comparisons. Perhaps if you learn all three you can update my comparison. Greg McKaskle |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
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 |
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. :D. |
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. |
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???!!!! :eek: :eek: :eek: :eek: :eek: 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. |
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. |
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Actually, I believe the java stuff could use eclipse also, so no changing IDE's. :)
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
|
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. |
| All times are GMT -5. The time now is 07:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi