Go to Post Warning: this reply is just an approximation of what I meant to convey - engineers cannot possibly use just written words to express what they are thinking. Raul - Raul [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 15-01-2014, 09:26
Intern Intern is offline
Registered User
FRC #3596
 
Join Date: Jan 2014
Location: South Milwaukee
Posts: 17
Intern is an unknown quantity at this point
Java help? for 3596

Our team(3596) has a lot of new programmers... two of us it is our second year, we did not code a thing last year, hello world does not help alot, we learn most of this really fast,we have recently made a drive code and layout for the Xbox controller, is there any tips on how to learn java for our new programmers.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-01-2014, 10:04
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 434
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Java help? for 3596

Have you checked out the guides available at http://wpilib.screenstepslive.com/s/3120?

For Java, start taking a look through this section:
http://wpilib.screenstepslive.com/s/3120/m/7885
__________________
http://team2168.org

Last edited by otherguy : 15-01-2014 at 10:04. Reason: typo
Reply With Quote
  #3   Spotlight this post!  
Unread 15-01-2014, 10:46
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,728
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Java help? for 3596

Our team did a presentation on Command Based Java this past fall, if you'd like the presentation I can send it to you.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-01-2014, 19:04
Intern Intern is offline
Registered User
FRC #3596
 
Join Date: Jan 2014
Location: South Milwaukee
Posts: 17
Intern is an unknown quantity at this point
Re: Java help? for 3596

can you send this to us our programming captain would like a copy for us
Reply With Quote
  #5   Spotlight this post!  
Unread 15-01-2014, 20:22
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 434
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Java help? for 3596

If you decide to use the Command Based Robot project (vs SimpleRobot or IterativeRobot), then I would suggest the following resources (in addition to the link I posted above):

Complimenting the cookbook are a series of videos on youtube under this account:
  1. Introduction: http://www.youtube.com/watch?v=v0vt9yKLxUQ
  2. Claw: http://www.youtube.com/watch?v=PpDX0CAcUNc
  3. Elevator and Wrist: http://www.youtube.com/watch?v=j2Xz8bRRcF0
  4. Command Groups http://www.youtube.com/watch?v=QRv98SaVS6E
  5. Drivetrain http://www.youtube.com/watch?v=BZ9l4DAaUAI
  6. Autonomous http://www.youtube.com/watch?v=5rJLi-QOflc


And for completeness, and your awareness, last year introduced a tool called Robot Builder. It's a GUI that allows you to generate the command based robot project java code automatically. Resources on that tool can be found here: http://wpilib.screenstepslive.com/s/3120/m/7882
__________________
http://team2168.org
Reply With Quote
  #6   Spotlight this post!  
Unread 16-01-2014, 07:39
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,728
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Java help? for 3596

Quote:
Originally Posted by Intern View Post
can you send this to us our programming captain would like a copy for us
For anybody that is interested here is a link to the presentation and the accompanying code to go along with it. If you have any questions please feel free to email me.
Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2014, 19:57
Ipiano's Avatar
Ipiano Ipiano is offline
Registered User
AKA: Andrew Stelter
FRC #3018 (Nordic Storm)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Mankato, Minnesota
Posts: 27
Ipiano is an unknown quantity at this point
Re: Java help? for 3596

I would HIGHLY recommend using the command-based pattern, alongside the RobotBuilder program.

RobotBuilder can be found in the SunSpotFRCSDK directory under the user directory on the C Drive, in the tools folder. The program itself allows you to define the hardware and "commands" you will have, and then it generates the "skeleton" code which has all of the constructors for everything, and all that's left to do is write the logic that runs it how you want. In addition, the program automatically sets up everything so that you can use the smartdashboard (also in the tools folder) and put the robot in "test" mode(an option like teleop or autonomous) and manually drive/test all sensors and actuators.
__________________
________
Genius is one percent inspiration and ninety-nine percent perspiration.
--Thomas A. Edison
Reply With Quote
  #8   Spotlight this post!  
Unread 20-01-2014, 21:33
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: Java help? for 3596

I don't think I can stress this enough, but I REALLY discourage the use of the CommandBase template. I've tried coding with it, but this system only seems to complicate the robot code.

Each part of the robot needs to be broken down into subsystems and then the commands for that subsystem are contained within a separate class. I find that our code flows much more intuitively if we combine data and behavior into one class for each subsystem program the usage of it in a procedural manner.

The CommandBase seems to strip a lot of the control from the user. You're pretty much stuck with the system that the CommandBase provides. You can accomplish exactly the same thing in both CommandBase and Simple/Iterative Robot templates, but if the CommandBase system does not fit what you want to achieve, you are going to have a bad time. With the Simple and Iterative Robot templates, you can decide the precise execution of the actuators on the robot and easily set up your own system for how to do so.

Also, for a team with less experienced programmers, the CommandBase system seems much more complex. I can't say I speak from experience, but if you encounter a problem when writing your code, it will be harder to diagnose where the problem is located. Even if you use RobotBuilder, you'll likely encounter logical errors that will be difficult to debug for novice programmers.

The CommandBase template did come with one thing that I really liked and that was the inclusion of the RobotMap class. It's used to contain a listing of static fields of all the digital and analog input/output channels from the cRIO modules and the sidecar. This was a great idea! Every team should do that.
__________________
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
  #9   Spotlight this post!  
Unread 21-01-2014, 07:07
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,728
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Java help? for 3596

Quote:
Originally Posted by nyaculak View Post
I don't think I can stress this enough, but I REALLY discourage the use of the CommandBase template. I've tried coding with it, but this system only seems to complicate the robot code.

Each part of the robot needs to be broken down into subsystems and then the commands for that subsystem are contained within a separate class. I find that our code flows much more intuitively if we combine data and behavior into one class for each subsystem program the usage of it in a procedural manner.

The CommandBase seems to strip a lot of the control from the user. You're pretty much stuck with the system that the CommandBase provides. You can accomplish exactly the same thing in both CommandBase and Simple/Iterative Robot templates, but if the CommandBase system does not fit what you want to achieve, you are going to have a bad time. With the Simple and Iterative Robot templates, you can decide the precise execution of the actuators on the robot and easily set up your own system for how to do so.

Also, for a team with less experienced programmers, the CommandBase system seems much more complex. I can't say I speak from experience, but if you encounter a problem when writing your code, it will be harder to diagnose where the problem is located. Even if you use RobotBuilder, you'll likely encounter logical errors that will be difficult to debug for novice programmers.

The CommandBase template did come with one thing that I really liked and that was the inclusion of the RobotMap class. It's used to contain a listing of static fields of all the digital and analog input/output channels from the cRIO modules and the sidecar. This was a great idea! Every team should do that.
Not to sound rude but, I actually disagree with everything you've stated and actually believe the opposite of it all. As an ex-teacher and a java developer I've found the command based system to be much easier to teach and debug than the iterative platform. The students are also able to pick it up extremely easy are able to easily debug what is going on.

Last edited by notmattlythgoe : 21-01-2014 at 07:11.
Reply With Quote
  #10   Spotlight this post!  
Unread 21-01-2014, 13:22
krieck's Avatar
krieck krieck is offline
Registered User
AKA: Keith
FRC #2846 (Firebears)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Minnesota
Posts: 49
krieck is an unknown quantity at this point
Re: Java help? for 3596

The command based architecture does add a learning curve, but if you take the time, it should become intuitive. It should allow your program to scale up to a large, sophisticated program. More important, it should allow multiple programmers to work on different subsystems and commands without stepping on each other's toes too much.

I also highly recommend the RobotBuilder, although you absolutely need to take the time to understand all the code it generates.
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 12:42.

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