Go to Post Nobody wins a Regional on Thursday. - Bill Moore [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
  #1   Spotlight this post!  
Unread 09-01-2016, 08:07
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 470
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Team 1519 - 2015 Code Release (Java)

We on Team 1519 had great aspirations of polishing our code over the summer and fall this year in order to do a fall 2015 code release with some nice, well-commented software.

Alas, the summer came and went with off-season tournaments, demonstrations and some downtime. We then found ourselves beta testing the 2016 control system and never really made the time to clean up the 2015 robot code so that we could post it.

So now, here we are, the morning of kickoff, and all we can share is the code we had in the robot during the competition season - complete with warts, spaghetti, dead code, and all. It also lacks as many comments and design documentation as it should have.

Nonetheless, maybe it will be of help to some other teams. Our autonomous worked pretty well last year, and we had high levels of automation during teleop driving.

Oh, and the robot's name was "Kaizen" -- that's why you'll find the top-level folder to be named Kaizen2015.

Feel free to post questions here or to email or PM me if I don't seem to be paying attention to this thread during the build season...
Attached Files
File Type: zip Team-1519-Kaizen2015-src-code.zip (116.6 KB, 74 views)
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"

Last edited by Ken Streeter : 09-01-2016 at 08:50.
  #2   Spotlight this post!  
Unread 10-01-2016, 15:08
HanjiZoeCat950 HanjiZoeCat950 is offline
Registered User
FRC #5484
 
Join Date: Jan 2016
Location: Indiana
Posts: 1
HanjiZoeCat950 is an unknown quantity at this point
Re: Team 1519 - 2015 Code Release (Java)

Hello! I am the lead programmer for team 5484, and we are running into some issues with Java. I have our code, but it fails to deploy. I followed all of the 2016 instructions for setting up java for eclipse. When I run it, however, I get this error:

BUILD FAILED
C:\Users\Ethan\wpilib\java\current\ant\build.xml:2 20: Assertion failed boolean test.
roboRIO Image does not match plugin, allowed image version: 19

Also, where is the 2016 or 2015 java installation for the roboRIO? I am using a slightly older version, but I do not think that that is an issue.

Any help would be appreciated. Thanks!
  #3   Spotlight this post!  
Unread 10-01-2016, 17:44
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Team 1519 - 2015 Code Release (Java)

HanjiZoeCat950,
You need to image your RIO, that error is reporting the RIO should have image v19.
https://wpilib.screenstepslive.com/s...g-your-roborio

And instructions for RIO java install are
https://wpilib.screenstepslive.com/s...ller-java-only

Generally I recommend you start at the top of this list and work thru each relevant section.
https://wpilib.screenstepslive.com/s/4485
  #4   Spotlight this post!  
Unread 10-01-2016, 17:47
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Team 1519 - 2015 Code Release (Java)

Hey Ken,
So it looks like for teleop your Mecanum drive used speed-closed-loop pretty much all the time (FP closed-loop).

Did you find that helped improve driving the robot during teleop?

Kaizen looks pretty good to me, I'll take functionality over clean-up any day.
  #5   Spotlight this post!  
Unread 10-01-2016, 18:44
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 470
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Team 1519 - 2015 Code Release (Java)

Quote:
Originally Posted by ozrien View Post
HanjiZoeCat950,
You need to image your RIO, that error is reporting the RIO should have image v19.
https://wpilib.screenstepslive.com/s...g-your-roborio

And instructions for RIO java install are
https://wpilib.screenstepslive.com/s...ller-java-only

Generally I recommend you start at the top of this list and work thru each relevant section.
https://wpilib.screenstepslive.com/s/4485
+1. If you do the above, the error you are seeing will go away -- you need to get image v19 into the roboRIO.
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"
  #6   Spotlight this post!  
Unread 10-01-2016, 18:51
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 470
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Team 1519 - 2015 Code Release (Java)

Quote:
Originally Posted by ozrien View Post
So it looks like for teleop your Mecanum drive used speed-closed-loop pretty much all the time (FP closed-loop).

Did you find that helped improve driving the robot during teleop?
Yes, our mecanum drive used exclusively speed-closed-loop, with the TalonSRX performing the closed-loop control in the Talon with directly-connected USDigital encoders. We tuned the PIDF control parameters manually (we ended up only using F & P as you mention), but once they were set, we simply told the TalonSRX the parameters to use, and let the TalonSRX do all the work.

We did code a contingency "open loop" capability via a button press on the driver station in case we had an encoder failure during a match. However, we never needed to use that in any matches. A nice feature of the "open loop vs. closed loop mode" button, however, was it permitted a direct comparison to see what was being gained with the "closed loop" control -- one could drive the robot a bit in "closed loop" mode to see how it performed, then press a button to try "open loop" mode and see how it performed without the closed-loop. The difference was significant -- the closed-loop control provided greatly enhanced driver control, particularly at low speeds.

By using the speed-closed-loop control, commands to make all 4 wheels turn slowly would actually make all 4 wheels turn at the desired rate, even if one wheel had slightly greater mechanical resistance or was carrying greater load due to weight distribution, or was up on the corner of a scoring platform. This was most beneficial at low speeds, particularly when trying to move as slowly as possible, such as in the final alignment of a tote or placing an RC. The closed-loop control also helped the robot drive more consistently whether it was carrying no totes, 1 tote, or a few totes.

The other feature that really helped our driving was implementing "heading preservation" when commanding the mecanum robot to translate, but not rotate. Whenever the robot was being commanded to translate, but not rotate, the code would determine the cumulative heading error since the last time the driver had commanded a rotation, and proportionally correct the heading (using a gyro as the heading reference). What this meant is that when commanding the robot to strafe sideways or diagonally, the robot would hold the initial heading, even in varying CG situations (such as whether or not totes were being carried.) This feature was a huge help.

We implemented a "field-oriented drive" capability (it's actually nearly trivial to do so with the control paradigm used for mecanum drive) but our drivers preferred the traditional control scheme.

As an aside, we used position-closed-loop on the TalonSRX for both of our elevators. Again, we wired the USDigital encoder directly to the TalonSRX, simply set the PIDF parameters (we only needed P and D), and let the Talon do the heavy lifting. We made use of the "VoltageRampRate" feature to prevent sudden "jolts" of the elevator when starting / stopping, and were very pleased with how that worked out, too. These experiences have us sold on the TalonSRX.

Quote:
Originally Posted by ozrien View Post
Kaizen looks pretty good to me, I'll take functionality over clean-up any day.
Thanks for the kudos. Some of the code is still a mess.

It did work well, though -- I haven't yet tired of watching last year's auto: https://www.youtube.com/watch?v=rTspn46gKkg
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"

Last edited by Ken Streeter : 10-01-2016 at 19:11.
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


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

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