Go to Post Note that these comments are based on the 2006 FRC game rules, and they may or may not apply to the 2007 game. Your mileage may vary. - dlavery [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 Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 05-01-2013, 01:14
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Video showing how to use Eclipse for FRC 2013 development without plugins

All,

Night before kickoff, I thought it would be a good idea to post a video showing you how to set up the Eclipse IDE for FRC Java development, building, and deploying to a CRIO, without an official 2013 Java plugin.

http://youtu.be/onGfI0zO4Oo

Please let me know if you have any question and if the video was helpful.

-Kev
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
  #2   Spotlight this post!  
Unread 05-01-2013, 18:45
abrightwell abrightwell is offline
Lead Software Engineer
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Charleston, SC
Posts: 20
abrightwell is an unknown quantity at this point
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Great video, thanks for taking the time to put it together. My team has been wanting to move to Eclipse for some time now, this is really going to help us get there.

What would be really interesting to see is how to use the Java ME SDK and not the full SE SDK. What do you think about setting the Execution Environment to CDC 1.1? Have you tried this approach yet? I am going to play with it on my end, but I don't have a cRIO to test a full deployment at the moment. I'd be interested to hear your thoughts.

Keep up the good work!

Last edited by abrightwell : 05-01-2013 at 18:56.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-01-2013, 20:54
gluxon's Avatar
gluxon gluxon is offline
\n
AKA: Brandon Cheng
FRC #0178 (The 2nd Law Enforcers)
Team Role: Leadership
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Connecticut
Posts: 65
gluxon has a spectacular aura aboutgluxon has a spectacular aura aboutgluxon has a spectacular aura about
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Sorry to steal your thunder, but there's been some information released on Eclipse support with the WPILibJ plugin. Take a look at the two links below for more information (and a link to the update site). This is an experimental plugin though, so take heed.

http://firstforge.wpi.edu/sf/wiki/do...avaProgramming

http://firstforge.wpi.edu/sf/docman/...tation/doc1303
Reply With Quote
  #4   Spotlight this post!  
Unread 05-01-2013, 21:41
abrightwell abrightwell is offline
Lead Software Engineer
FRC #0342 (Burning Magnetos)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Charleston, SC
Posts: 20
abrightwell is an unknown quantity at this point
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Yeah, we have looked at the eclipse plugin before... but it was the "experimental" aspect of it that drove our decision to not fully depend on it. Knowing how to build and deploy the code without an IDE (via Ant) or a supporting plugin is gold in my opinion. Though I do hope that the plugin will mature soon for convenience.
Reply With Quote
  #5   Spotlight this post!  
Unread 05-01-2013, 23:09
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Not stealing my thunder. I believe those links have always been there, and the Eclipse plugin, even the one for 2012 was always experimental (Although I used it all of 2012 without any problems).

As far as I know, there are no 2013 eclipse plugins experimental or otherwise.

The difference here, is that if you install the plugins from the link you posted you will be installing the 2012 plugin, not the 2013. And because First decides to place the new SunSpotSDK in the plugin, you will be installing the 2012, SDK, with the 2012 templates.

The 2013 classes are a little different, they include the new network tables implementations, the Taylon motor controller classes, as well as other updates. There are also 3 Jar files to incorporate in your class as opposed to 2 in 2012.

So you can install the 2012 plugins if you like, but all it will be good for is getting the build and deploy links (which cant be modified). Be sure to replace the sunspotfrcsdk folder with the 2013 version, and use the 2013 templates because they call new classes.
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner
Reply With Quote
  #6   Spotlight this post!  
Unread 06-01-2013, 00:40
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Quote:
Originally Posted by abrightwell View Post
Great video, thanks for taking the time to put it together. My team has been wanting to move to Eclipse for some time now, this is really going to help us get there.

What would be really interesting to see is how to use the Java ME SDK and not the full SE SDK. What do you think about setting the Execution Environment to CDC 1.1? Have you tried this approach yet? I am going to play with it on my end, but I don't have a cRIO to test a full deployment at the moment. I'd be interested to hear your thoughts.

Keep up the good work!
The Squawk Virtual Machine running on the cRIO is a Micro Edition Java Runtime Environment. So you are only limited to J2ME classes anyway.

If you changed your environment to CDC 1.1, everything would work the same as far as development is concerned, because your JRE setting really doesn't matter, you are not running the code on your machine so the JRE is never used. You are downloading the Java SE JDK to basically use the compiler and other tools that comes with it for development. The Java Runtime Environment doesn't include those items.

Which is why we usually set our Alternate Runtime Environment to just a JDK, because that's all we need.

So as far as code on the robot, you are limited to whats in the SunSpotFRCSDK which is a java micro variant plus some stuff that Squawk and WPILib throws in, and whatever classes you write yourself. You do not have access to the full SE resources because they simply wont run on the Squawk VM.

Hope this helps.

-Kev
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner

Last edited by NotInControl : 06-01-2013 at 14:29.
Reply With Quote
  #7   Spotlight this post!  
Unread 12-01-2013, 20:18
java4first java4first is offline
(Java) Programming Mentor
AKA: Stu
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 2011
Location: Goffstown, NH
Posts: 56
java4first is an unknown quantity at this point
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Hi -

Thanks for the video, we even managed to get this working for a couple of Macs that students are using for development. However, the problem is that it doesn't cover getting the "deploy" then "run" Ant targets working, only "build". Deploy seems to work - as it just builds the jars to deploy, but run fails because it is missing a setting for a property that has the IP address of the robot (and there may be other things once you get past this). I am guessing it's because we haven't 'configured' the plugin by adding the team number.

Has anyone figured out the last step in this process? Can you re-install last year's plug-in, and then just update to the new Java classes for this year? Or is there something simpler ...

Next year all us Eclipse users need to get together, and get at least one team on the Beta test - so that we can have an Eclipse plugin for doing development without having to resort to NetBeans. I don't care about all the new features of WPILib and any fancy wizards for coding ... I just want to be able to extend the SimpleRobot and deploy it via Eclipse.

Thanks in advance if you figured this out.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-01-2013, 02:01
markmcgary's Avatar
markmcgary markmcgary is offline
Software Mentor
FRC #4322 (Clockwork Oranges)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Fullerton, CA
Posts: 174
markmcgary is just really nicemarkmcgary is just really nicemarkmcgary is just really nicemarkmcgary is just really nicemarkmcgary is just really nice
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Quote:
Originally Posted by java4first View Post
Hi -

Thanks for the video, we even managed to get this working for a couple of Macs that students are using for development. However, the problem is that it doesn't cover getting the "deploy" then "run" Ant targets working, only "build". Deploy seems to work - as it just builds the jars to deploy, but run fails because it is missing a setting for a property that has the IP address of the robot (and there may be other things once you get past this). I am guessing it's because we haven't 'configured' the plugin by adding the team number.

Has anyone figured out the last step in this process? Can you re-install last year's plug-in, and then just update to the new Java classes for this year? Or is there something simpler ...

Next year all us Eclipse users need to get together, and get at least one team on the Beta test - so that we can have an Eclipse plugin for doing development without having to resort to NetBeans. I don't care about all the new features of WPILib and any fancy wizards for coding ... I just want to be able to extend the SimpleRobot and deploy it via Eclipse.

Thanks in advance if you figured this out.
In my 'user' folder on my Mac is an 'invisible' file named ".sunspotfrc.properties". (Yes, it starts with a dot)

Inside this file are defined these properties:

sunspot.home=/Users/mark/sunspotfrcsdk
remoteaddress=10.43.22.2
wpilibj.home=/Users/mark/sunspotfrcsdk/lib/WPILibJ

The user folder name should be your user name. The 'remoteaddress' property will be your robot CRIO IP address, based on your team number.

I hope this helps.
Reply With Quote
  #9   Spotlight this post!  
Unread 01-02-2013, 13:30
NotInControl NotInControl is offline
Controls Engineer
AKA: Kevin
FRC #2168 (Aluminum Falcons)
Team Role: Engineer
 
Join Date: Oct 2011
Rookie Year: 2004
Location: Groton, CT
Posts: 261
NotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond reputeNotInControl has a reputation beyond repute
Re: Video showing how to use Eclipse for FRC 2013 development without plugins

Quote:
Originally Posted by java4first View Post
Hi -

Thanks for the video, we even managed to get this working for a couple of Macs that students are using for development. However, the problem is that it doesn't cover getting the "deploy" then "run" Ant targets working, only "build". Deploy seems to work - as it just builds the jars to deploy, but run fails because it is missing a setting for a property that has the IP address of the robot (and there may be other things once you get past this). I am guessing it's because we haven't 'configured' the plugin by adding the team number.
So I am not sure why I didn't see any CD notifications for additional posts to this thread. I apologize for the delay in response, I believe you have overcome your problems, but I am going to answer your questions just in case anyone else stumbles upon this thread.

In the video around the 20:00 min mark, I show how to set up a deploy ant configuration to deploying code to the cRIO (not just building), and also show how to set up the debug configuration as well. The difference between these configurations and the build configuration is that you enter the IP address as an argument to the script -Dremoteaddress=10.xx.xx.xx (what ever IP your cRIO is).

Now this will work for you as long as you are updating a system that had previous FRC plugins (because you have a .sunspot.properties file in your home directory). One of the items I forgot to show in the video was updating the .sunspot.properties file.

This file lives in your home directory and was installed by the 2012 FRC Java plugins or the 2013 Netbeans plugins. So if you never installed the plugins (which you don't have too) you wont have this file, however this file tells the Build script where to find all the target files. So if you don't have a .sunspot.properties file in your home directory, create one. If you do, you can modify it. (note the period "." before the file name. ) You will need to show hidden files in order to see it. If you don't know what your home path is, type %HOMEPATH% in the run command on windows, or just open terminal on a mac. The properties file MUST BE saved in the home path or the build script in eclipse wont be able to find it, and then you won't have any ant target scripts.

The file defines the sunspot.home variable and the cRIO IP address. So it
should look something like this:

sunspot.home=C:/Documents and Settings/user/sunspotfrcsdk
remoteaddress=10.21.68.2


That's all the file needs to contain. So in this case, that path is the location of my 2013 sunspotfrcsdk folder and the remote address is the IP of my cRIO. If you have it set in the file, you do not need to set it in the arguments of the ant script like in the video. If you enter an IP address in the ant script argument, while having an IP in the properties file, the argument in the ant takes precedence over the text file.

I have been meaning to make this annotation in the video,
I just haven't had the time cause of the build season. :/

So sorry for any confusion,

Hope this helps,

-Kev
__________________
Controls Engineer, Team 2168 - The Aluminum Falcons
[2016 Season] - World Championship Controls Award, District Controls Award, 3rd BlueBanner
-World Championship- #45 seed in Quals, World Championship Innovation in Controls Award - Curie
-NE Championship- #26 seed in Quals, winner(195,125,2168)
[2015 Season] - NE Championship Controls Award, 2nd Blue Banner
-NE Championship- #26 seed in Quals, NE Championship Innovation in Controls Award
-MA District Event- #17 seed in Quals, Winner(2168,3718,3146)
[2014 Season] - NE Championship Controls Award & Semi-finalists, District Controls Award, Creativity Award, & Finalists
-NE Championship- #36 seed in Quals, SemiFinalist(228,2168,3525), NE Championship Innovation in Controls Award
-RI District Event- #7 seed in Quals, Finalist(1519,2168,5163), Innovation in Controls Award
-Groton District Event- #9 seed in Quals, QuarterFinalist(2168, 125, 5112), Creativity Award
[2013 Season] - WPI Regional Winner - 1st Blue Banner

Last edited by NotInControl : 01-02-2013 at 13:35.
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 22:16.

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