Go to Post Don't date anyone on your team unless you are POSITVE that you will be able to handle yourself professionally, not only during your relationship, but even after it ends. - Jaine Perotti [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-11-2011, 20:56
shuhao shuhao is offline
Registered User
FRC #4069 (Lo-Ellen Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Sudbury
Posts: 138
shuhao is an unknown quantity at this point
Question Rookie team seeking some programming advice

We're a rookie team this year and we were hoping to seek some advice about the coding for FRC.

Here's our situation:

We want to use Java to program our robot as it's the most familiar to all of the programmers on the team. However, I just learned that it's Java ME, which means some of the stuff we want to use (such as certain linear algebra libraries for AI) may not be compatible. I've taken a look at C/C++, but I'm not sure if it's doable under Linux. I only saw mentions saying that Java can be developed under Netbean under Linux (Anyway to change that to eclipse by any chance?). Is Java the best choice here?

Since our programming team (which includes myself as the lead programmer) has little experiences on "bare metal", how should we gain more experience? Is it beneficial to start something such as a mock interface and some code (maybe some algorithm such as object tracking instead actual control)?

Thanks for any input.
Reply With Quote
  #2   Spotlight this post!  
Unread 30-11-2011, 21:35
flameout flameout is offline
AKA Ryan Van Why
FRC #0957 (SWARM)
Team Role: Alumni
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Oregon
Posts: 168
flameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to allflameout is a name known to all
Re: Rookie team seeking some programming advice

Quote:
Originally Posted by shuhao View Post
We want to use Java to program our robot as it's the most familiar to all of the programmers on the team.
This is a really good reason, especially for a rookie team.

Quote:
However, I just learned that it's Java ME, which means some of the stuff we want to use (such as certain linear algebra libraries for AI) may not be compatible.
Many things are hard to find in FRC's Java -- you have to know where to look to find the network API, for instance. However, I found out (after build season was over) that it is there.

With respect to the linear algebra libraries, that is a concern. However, I don't think it's a large concern -- the vast majority of teams don't use non-FRC libraries of any sort.

Quote:
I've taken a look at C/C++, but I'm not sure if it's doable under Linux.
I recall there being a project to compile C++ for FRC on Linux, but it's not done by FIRST, so I'd recommend against it (you're at the mercy of whoever's putting it together; if you choose to do it yourself, it's just a lot of extra work).

Quote:
I only saw mentions saying that Java can be developed under Netbean under Linux (Anyway to change that to eclipse by any chance?). Is Java the best choice here?
We did all of our programming under Linux -- Java in NetBeans worked fine without the need for any tweaking. If Linux is all you have (or are willing to use), then it's a fine choice.

The programming environment uses NetBeans plugins -- I don't think it's possible to use Eclipse instead.

Quote:
Since our programming team (which includes myself as the lead programmer) has little experiences on "bare metal", how should we gain more experience? Is it beneficial to start something such as a mock interface and some code (maybe some algorithm such as object tracking instead actual control)?

Thanks for any input.
Other than learning the language (which you already know), there's not much I can think of that would help you learn this system. You can look through last year's WPILib documentation, code from other teams (C++ and Java's versions of WPILib are virtually identical), and download the plugins for last year. The development environment set up for teams can hardly be described as "bare metal" (there's a lot of libraries and virtually no low-level programming with this control system), so learning embedded programming is not necessary.

Good luck!
Reply With Quote
  #3   Spotlight this post!  
Unread 30-11-2011, 21:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Rookie team seeking some programming advice


Quote:
Originally Posted by flameout View Post
The development environment set up for teams can hardly be described as "bare metal" (there's a lot of libraries and virtually no low-level programming with this control system)
Ditto that.

@ shuhao: And if you were wanting to program "bare metal", Java would seem not to be the best choice anyway, since it's intended to be abstracted from the machine by the VM.

If you haven't yet experienced the joys of programming something that reacts to the outside world in realtime through sensors and actuators, the paradigm shift associated with that kind of programming may be one of your hurdles. If you're looking for a way to get a head start, that might be a fruitful area for study.


Reply With Quote
  #4   Spotlight this post!  
Unread 30-11-2011, 22:02
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Rookie team seeking some programming advice

Most of the underlying math primitives (e.g. forward and inverse trig, exponents, square roots, etc.) are present in the FRC Java implementation - they went ahead and implemented more than the bare bones J2ME spec requires (albeit in a different package structure than J2SE...you need to do some digging to find where some of the classes live).

This does mean that adding J2SE JARs is generally not going to work. That said, I have found that this is seldom a big problem in FRC. Linear algebra and hardcore AI are not used by most teams, and those that do usually supply their own matrix math functions (for example). If you have the source for a library you would like to use, you may be able to get it to compile for FRC Java by changing the import statements for certain math/container functions and classes to point to the correct FRC Java packages. However, if your library uses a lot of J2SE-only classes, this approach would not work.
Reply With Quote
  #5   Spotlight this post!  
Unread 30-11-2011, 22:44
shuhao shuhao is offline
Registered User
FRC #4069 (Lo-Ellen Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Sudbury
Posts: 138
shuhao is an unknown quantity at this point
Re: Rookie team seeking some programming advice

Quote:
If you haven't yet experienced the joys of programming something that reacts to the outside world in realtime through sensors and actuators
Unfortunately I have not, which is why I don't know how practical it is to attempt to develop AIs, as I don't know how long it will take to hammer out all the issues with basic control.

I have a good understanding of the theory for AIs that's like these, but I have yet to find the the time to implement the theories behind them, especially on actual hardware, rather than simulated environments.

And since we are a rookie team, we have no prior experiences telling us how long it takes to write basic functions etc.

Quote:
supply their own matrix math functions (for example)
Good idea. Gonna get the team to start porting/writing a basic linear algebra library.


Edit:

Just noticed http://www.chiefdelphi.com/forums/sh...ad.php?t=87260

Since my primary language (also currently as lead programmer) is Python, and I have some numpy experience (as oppose to no experience in any Java Lin. Alg library, if they manage to get it ported, and I could try helping, too), is it worth a try to get Python onto cRIO and then go from there?

A text editor (geany) + ftp (nautilus) sounds like heaven to me (minus the initial wind river stuff, but not a big deal)

Last edited by shuhao : 30-11-2011 at 22:56.
Reply With Quote
  #6   Spotlight this post!  
Unread 30-11-2011, 23:35
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Rookie team seeking some programming advice

Quote:
Originally Posted by shuhao View Post
Since my primary language (also currently as lead programmer) is Python, and I have some numpy experience (as oppose to no experience in any Java Lin. Alg library, if they manage to get it ported, and I could try helping, too), is it worth a try to get Python onto cRIO and then go from there?
As a rookie team with no students or mentors who have done robot-control software, you are going to want all the seasoned help and support you can get with that type of software. The best-supported language for FRC is LabVIEW. C++ is 2nd, and Java 3rd. Python is a distant 4th.


Reply With Quote
  #7   Spotlight this post!  
Unread 30-11-2011, 23:57
shuhao shuhao is offline
Registered User
FRC #4069 (Lo-Ellen Robotics)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Sudbury
Posts: 138
shuhao is an unknown quantity at this point
Re: Rookie team seeking some programming advice

Hm. Ok. I'll keep a distant eye on it, then.

What about unittesting? Is that commonly done?
Reply With Quote
  #8   Spotlight this post!  
Unread 01-12-2011, 00:21
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Rookie team seeking some programming advice

Quote:
Originally Posted by shuhao View Post
What about unittesting? Is that commonly done?
The stable experienced teams are more likely to have a disciplined software development methodology. Many (most?) of the rookie teams are happy just to get something working well enough to compete.


Reply With Quote
  #9   Spotlight this post!  
Unread 01-12-2011, 18:29
nyaculak nyaculak is offline
Registered User
FRC #0053 (Area 53)
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Maryland
Posts: 28
nyaculak will become famous soon enough
Re: Rookie team seeking some programming advice

Hey guys. Although my team primarily uses Java, our mentor tested out some C++ code that he compiled and ran on his Ubuntu machine. I believe he used something called ucpp

https://github.com/nikitakit/ucpp

I actually have no C++ experience, but I figured you guys should at least check this out.

Good luck!
__________________
2013 MUC DC 3rd Place, FRC DC Regional, FRC Chesapeake Regional
2012 FRC DC Regional, FRC Chesapeake Regional
ERHS Robotics Club
- FRC Team 53 "Area 53"
www.erhsroboticsclub.org
Reply With Quote
  #10   Spotlight this post!  
Unread 10-12-2011, 13:05
dcarr's Avatar
dcarr dcarr is offline
#HoldStrong
AKA: David Carr
FRC #3309 (Friarbots)
Team Role: Mentor
 
Join Date: Dec 2010
Rookie Year: 2009
Location: Anaheim
Posts: 954
dcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond reputedcarr has a reputation beyond repute
Re: Rookie team seeking some programming advice

Hi, we are having a Beta Test Seminar Right now at www.ustream.tv/channel/beta-test-conference (December 10, 10:00 AM-12:00 PM PST)
__________________
Team 3309
2016 Los Angeles Chairman's Award Winner
2016 Orange County Regional Winner with 3476 & 6220
Team3309.org
Orange County Robotics Alliance
Reply With Quote
Reply


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


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

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