|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
![]() |
|
#3
|
|||
|
|||
|
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?) |
|
#4
|
||||
|
||||
|
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. Last edited by davidalln : 23-04-2009 at 16:56. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
||||
|
||||
|
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. |
|
#8
|
|||
|
|||
|
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. |
|
#9
|
||||
|
||||
|
Re: "Java, Sun SPOT and the FIRST Robotics Competition"
Quote:
Quote:
![]() |
|
#10
|
||||
|
||||
|
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++.
|
|
#11
|
|||
|
|||
|
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 |
|
#12
|
||||
|
||||
|
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 |
|
#13
|
||||
|
||||
|
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. . |
|
#14
|
||||
|
||||
|
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. |
|
#15
|
|||
|
|||
|
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. |
![]() |
| 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 | 22-11-2008 17:34 |
| Cannot "Grab frame" with java CMUcam2 GUI | TOECUTTER | Programming | 0 | 20-01-2007 12:50 |
| Rules of Engagement and "Unfair Competition" | Richard Neese | General Forum | 2 | 24-03-2003 13:03 |
| how tall is the ramp when in "up" and "balanced" position??? | archiver | 2001 | 1 | 24-06-2002 00:54 |
| An idea to better improve the First competition...or, at least make it more "hardcore"... | archiver | 1999 | 1 | 23-06-2002 22:02 |