Go to Post As for Dave and the stairs, just ignore him like the rest of the FRC GDC does... ;) - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #46   Spotlight this post!  
Unread 25-04-2009, 08:28
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: "Java, Sun SPOT and the FIRST Robotics Competition"

Quote:
Originally Posted by Ice Berg View Post
Can someone who knows more about this me give a few reasons why Java would be better or worse than c++.
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.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
  #47   Spotlight this post!  
Unread 25-04-2009, 09:31
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,939
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: "Java, Sun SPOT and the FIRST Robotics Competition"

Quote:
On the down side, Java will run quite a bit slower.
This might be a distinction without a difference - Depending on the Java Virtual Machine you are using, Java Byte Code can run plenty fast for plenty of applications - This only becomes important if you are running out of clock cycles - And, for my 2 cents, if I start doing any work likely to exhaust the clock cycles of a microcontroller, I'm going to want to offload the microcontroller (attach a fast General Purpose computer (a co-processor) to do the intense math or other heavy lifting).

Find out what speed you (really) REQUIRE before using speed as a selection criterion.

Quote:
The garbage collection causes hiccups where the OS is doing something besides running your code.
In full fledged Java implementations, you can invoke garbage collection as often as you want. This doesn't explicitly prevent the VM from deciding to run it; but it does give you a chance minimize how often the VM will surprise you by cleaning up after yourself.

Quote:
C++ probably has more robotics usage, so more code to borrow from.
Yes and no - I suspect that if you look at the robot code as the core of a large collection of general purpose development and debug code, and environments, you might find that there are plenty of Java infrastructure tools that make it worth your while to use Java. It is that infrastructure that
chews up most of my time when developing robot-ish software; not the robot software itself.

Or you might not

Blake
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
  #48   Spotlight this post!  
Unread 25-04-2009, 21:05
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
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. .
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
  #49   Spotlight this post!  
Unread 25-04-2009, 21:59
mathking's Avatar
mathking mathking is offline
Coach/Faculty Advisor
AKA: Greg King
FRC #1014 (Dublin Robotics aka "Bad Robots")
Team Role: Teacher
 
Join Date: Jan 2005
Rookie Year: 1999
Location: Columbus, OH
Posts: 638
mathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond reputemathking has a reputation beyond repute
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.
__________________
Thank you Bad Robots for giving me the chance to coach this team.
Rookie All-Star Award: 2003 Buckeye
Engineering Inspiration Award: 2004 Pittsburgh, 2014 Crossroads
Chairman's Award: 2005 Pittsburgh, 2009 Buckeye, 2012 Queen City
Team Spirit Award: 2007 Buckeye, 2015 Queen City
Woodie Flowers Award: 2009 Buckeye
Dean's List Finalists: Phil Aufdencamp (2010), Lindsey Fox (2011), Kyle Torrico (2011), Alix Bernier (2013), Deepthi Thumuluri (2015)
Gracious Professionalism Award: 2013 Buckeye
Innovation in Controls Award: 2015 Pittsburgh
Event Finalists: 2012 CORI, 2016 Buckeye
  #50   Spotlight this post!  
Unread 25-04-2009, 22:10
nathanww nathanww is offline
Hacker
FRC #1678 (Citrus Circuits)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2007
Location: Davis, CA
Posts: 224
nathanww is just really nicenathanww is just really nicenathanww is just really nicenathanww is just really nice
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.
__________________
Get yer robot source code here!
  #51   Spotlight this post!  
Unread 25-04-2009, 22:12
ttldomination's Avatar
ttldomination ttldomination is offline
Sunny
no team
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2007
Location: Roanoke, TX
Posts: 2,066
ttldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond reputettldomination has a reputation beyond repute
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.
__________________
1261: 2007-2012
1648: 2013-2014
5283: 2015
  #52   Spotlight this post!  
Unread 25-04-2009, 22:49
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,075
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: "Java, Sun SPOT and the FIRST Robotics Competition"

Actually, I believe the java stuff could use eclipse also, so no changing IDE's.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #53   Spotlight this post!  
Unread 25-04-2009, 22:58
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: "Java, Sun SPOT and the FIRST Robotics Competition"

Quote:
Originally Posted by nathanww View Post
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.
Get used to it - we have enough tricks up enough sleeves to power an innovation revolution, and we ain't stopping until each of your sleeves are full!
  #54   Spotlight this post!  
Unread 26-04-2009, 09:39
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: "Java, Sun SPOT and the FIRST Robotics Competition"

Quote:
Originally Posted by virtuald View Post
Actually, I believe the java stuff could use eclipse also, so no changing IDE's.
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)
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
  #55   Spotlight this post!  
Unread 02-05-2009, 23:37
daneelshof's Avatar
daneelshof daneelshof is offline
Programming Mentor
FRC #1619 (Up-A-Creek Robotics)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Broomfield, Colorado
Posts: 30
daneelshof has a spectacular aura aboutdaneelshof has a spectacular aura about
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.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 06:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi