OCCRA
Go to Post Valentine's day, who has time for Valentine's day?????? I have code to write!! - paulcd2000 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media  
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 08-06-2018, 05:54 PM
SDOAJ's Avatar
SDOAJ SDOAJ is offline
Registered User
AKA: Aditya Gupta
FRC #0254 (Cheesy Poofs)
Team Role: Programmer
 
Join Date: Feb 2018
Rookie Year: 2010
Location: California
Posts: 2
SDOAJ will become famous soon enough
Team 254 Presents: FRC 2018 Code

Team 254 is proud to present the code for our 2018 robot: Lockdown. If you have any questions, feel free to ask!

Some highlights from this year's code:
Reply With Quote
  #2   Spotlight this post!  
Unread 08-06-2018, 06:03 PM
SDOAJ's Avatar
SDOAJ SDOAJ is offline
Registered User
AKA: Aditya Gupta
FRC #0254 (Cheesy Poofs)
Team Role: Programmer
 
Join Date: Feb 2018
Rookie Year: 2010
Location: California
Posts: 2
SDOAJ will become famous soon enough
Re: Team 254 Presents: FRC 2018 Code

Link to the repository: https://github.com/Team254/FRC-2018-Public
Reply With Quote
  #3   Spotlight this post!  
Unread 08-06-2018, 06:14 PM
Prateek M's Avatar
Prateek M Prateek M is offline
Kotlin Master Race
FRC #5190 (Green Hope Falcons)
Team Role: Programmer
 
Join Date: May 2018
Rookie Year: 2018
Location: Cary, North Carolina
Posts: 52
Prateek M is on a distinguished road
Re: Team 254 Presents: FRC 2018 Code

Code:
double scale = 1.2 * p0.getTranslation().distance(p1.getTranslation());
I understand performing sine and cosine on the heading to get the individual dx and dy components. But why did you multiply by 1.2 * euclidean distance between the two points?

I want to congratulate you all on the wonderful season you all had! We implemented the non linear trajectory follower (software mentor Jared Russell posted a link to the paper in the FRC Discord a couple months ago) and we are liking its performance so far!

Thanks for the resources!
Reply With Quote
  #4   Spotlight this post!  
Unread 08-06-2018, 06:17 PM
solomondg's Avatar
solomondg solomondg is offline
Registered User
AKA: Solomon
FRC #2898 (Flying Hedgehogs)
Team Role: Leadership
 
Join Date: Aug 2016
Rookie Year: 2016
Location: Portland, Oregon
Posts: 114
solomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant futuresolomondg has a brilliant future
Re: Team 254 Presents: FRC 2018 Code

Fun! Some pretty cool stuff here for sure. I'm certainly a fan of all the nifty controls stuff we see out of you guys. Thanks for publicizing!
Reply With Quote
  #5   Spotlight this post!  
Unread 08-06-2018, 07:14 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 744
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Team 254 Presents: FRC 2018 Code

Code:
public static final double kJazzHandsEpsilon = 2.5;
I have found my new favorite public static final double.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-06-2018, 09:54 PM
came20's Avatar
came20 came20 is offline
Registered User
AKA: Cameron Earle
FRC #0401 (Copperhead Robotics)
Team Role: Programmer
 
Join Date: Dec 2017
Rookie Year: 2017
Location: Blacksburg, VA
Posts: 20
came20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud ofcame20 has much to be proud of
Re: Team 254 Presents: FRC 2018 Code

Code:
public final static double kPoopyShootSetpoint = .40;
What about this one?
Reply With Quote
  #7   Spotlight this post!  
Unread 08-07-2018, 11:11 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
4933T15
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,565
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: Team 254 Presents: FRC 2018 Code

Quote:
Originally Posted by Prateek M View Post
[code]
I understand performing sine and cosine on the heading to get the individual dx and dy components. But why did you multiply by 1.2 * euclidean distance between the two points?
I am guessing that Mario (the student who wrote all of our spline code) found that this led to better-looking paths. When fitting parametric quintic splines to a start and end pose, it's important that the ratio of dx to dy on the endpoints is consistent with the cos/sin of the heading, but the precise magnitude of the values can be anything.

This is also true of the second derivatives (the ratio must match the desired curvature, but the magnitudes are a free parameter). In our 2014 code (and in Pathfinder), the curvature at knot points is generally set to 0 so this isn't a problem. In our 2018 code, Mario wrote an optimizer to choose second derivatives that minimize the rate of change of curvature (maximize smoothness) over the path. You could imagine doing something similar for the magnitudes of the dx and dy components.
Reply With Quote
  #8   Spotlight this post!  
Unread 08-07-2018, 11:40 AM
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,305
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Team 254 Presents: FRC 2018 Code

Quote:
Originally Posted by came20 View Post
Code:
public final static double kPoopyShootSetpoint = .40;
What about this one?
This was the perfect constant for powering the intake motors so that they couldn't push out the cube with another cube in the way, but just enough so the cube would come out when you backed the robot up. Good for placing a cube in a precarious slot where you couldn't open the intake arms and risk knocking a cube off.
Reply With Quote
  #9   Spotlight this post!  
Unread 08-07-2018, 04:36 PM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP/Shuffleboard/WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2010
Location: MA
Posts: 358
SamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant futureSamCarlberg has a brilliant future
Re: Team 254 Presents: FRC 2018 Code

I notice you have a shuffleboard save file checked in. Do you have any feedback or suggestions?
__________________
WPILib developer
GRIP, Shuffleboard, RobotBuilder, OutlineViewer
Reply With Quote
  #10   Spotlight this post!  
Unread 08-07-2018, 04:52 PM
retrodaredevil retrodaredevil is offline
Registered User
AKA: Josh Shannon
FRC #1444 (Lightning 1444)
Team Role: Programmer
 
Join Date: Jul 2018
Rookie Year: 2018
Location: St. Louis
Posts: 3
retrodaredevil is an unknown quantity at this point
Re: Team 254 Presents: FRC 2018 Code

This might have been answered somewhere else maybe even a long time ago since this also applies to your previous code bases: Why do you use a separate thread for autonomous? Is this so you can have slightly smoother turns and speeds or so it won't crash the entire robot?

To me it seems like making everything that autonomous uses thread safe wouldn't be worth the hassle but I'm guessing there's a reason for this?
Reply With Quote
  #11   Spotlight this post!  
Unread 08-07-2018, 09:35 PM
demosthenes2k8's Avatar
demosthenes2k8 demosthenes2k8 is offline
Registered User
AKA: Matt Soucy
FRC #0166 (Chop Shop 166)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Merrimack, NH
Posts: 608
demosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud ofdemosthenes2k8 has much to be proud of
Re: Team 254 Presents: FRC 2018 Code

I'm interested in the materials that surround your code. It doesn't use much of the WPIlib base, from what I can tell, mainly just uses it for the hardware layer. How are you introducing your new students to this architecture?
__________________

GSR Dean's List Finalist 2011
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 05:54 AM.

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi