Go to Post "We're too close for missiles, switching to Poof balls!" "Just one more day on the driving code, then I'll switch to autonomous." - Rick TYler [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Old 01-03-2017, 12:33 PM
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 566
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Why the sudden burst of code postings?

You might have noticed that there's a sudden burst of teams posting links to their prior year's code and CAD drawings on Chief Delphi. Wondering why? Read on.

R13 of the 2016 Rules states:

Quote:
Software and mechanical/electrical designs created before Kickoff are only permitted if the source files (complete information sufficient to produce the design) are available publicly prior to Kickoff.
While we don't know what the rules are for 2017, that section has been present for many years and I would not$@#bet against$@#a similar section being present again for 2017.

So, if you have that great robot vision program from previous years, or that crazy 5 CIM continuously variable gearbox from last year's bot, and want to use it on this year's robot, you need to publish the design.

What does publish mean? The examples in the rules all say:
  • post it in a generally accessible public forum
  • make the code available to all Teams

A story. Two years ago at a competition I was asked to consult on a robot's control system issue. We spent quite a bit of time going through the source code of the robot to see what the issue was. Reading the source code, it was clear to me that the code represented many years worth of work. I took a note of the team's number because I was interested in reviewing the code later at home.

After the competition, I took a look around for the team's code, and wasn't able to find it online anywhere. That's not right.

The concept behind R13 is that the work product -- the robot and its code -- represents the work of the current team. Requiring sharing of designs and source code helps level the playing field and increases the quality of robots from all teams. It deliberately reduces the (big) advantage that veteran teams have over new ones.

Finally, a personal note. I love reading team's robot code, and would love to see more published code to look at.

So, there you go. Publishing your code and designs = good.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson
Reply With Quote
  #2   Spotlight this post!  
Old 01-03-2017, 12:48 PM
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,712
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: Why the sudden burst of code postings?

With that said, here is 2363's 2016 code.
Reply With Quote
  #3   Spotlight this post!  
Old 01-03-2017, 02:23 PM
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,539
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Why the sudden burst of code postings?

Likewise, 3946's code back to our rookie year.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Old 01-03-2017, 02:30 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: 56
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: Why the sudden burst of code postings?

Quote:
Originally Posted by MrRoboSteve View Post
I love reading team's robot code, and would love to see more published code to look at.
I agree wholeheartedly. There are many many times I've looked at a veteran team's code (Thanks 254 and 2481!) and leveraged the ideas (hopefully making them better along the way). Our team has been made much better off building from examples of more experienced teams!!!

Edit: Well, I'll join in too: https://github.com/RobotCasserole1736

Last edited by gerthworm : 01-03-2017 at 04:30 PM.
Reply With Quote
  #5   Spotlight this post!  
Old 01-03-2017, 02:38 PM
bobbysq bobbysq is offline
Registered User
FRC #4646 (Team ASAP)
Team Role: Leadership
 
Join Date: Apr 2016
Rookie Year: 2015
Location: Des Moines, IA
Posts: 265
bobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud ofbobbysq has much to be proud of
Re: Why the sudden burst of code postings?

https://github.com/frc4646

Check here for everything. It'll have all of our code as soon as we start it, finished or not.
Reply With Quote
  #6   Spotlight this post!  
Old 01-03-2017, 02:57 PM
vScourge's Avatar
vScourge vScourge is offline
Videogame Developer
AKA: Adam Pletcher
FRC #4096 (Ctrl-Z)
Team Role: Coach
 
Join Date: Jan 2014
Rookie Year: 2012
Location: Champaign, IL
Posts: 31
vScourge is on a distinguished road
Re: Why the sudden burst of code postings?

A great, filterable directory of released robot code:

FIRSTWiki Robot Code Directory
Reply With Quote
  #7   Spotlight this post!  
Old 01-03-2017, 02:58 PM
Bkeeneykid's Avatar
Bkeeneykid Bkeeneykid is offline
#wheatcoastneatcoast
AKA: Devin Keeney
FRC #1982 (Cougar Robotics); Season Long Fantasy FIRST (F3)
Team Role: Student
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Lenexa, Kansas
Posts: 293
Bkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud ofBkeeneykid has much to be proud of
Re: Why the sudden burst of code postings?

I've always found making a standalone post kinda tacky personally. It's not warranting of taking up more space. There are places for this: your TBA profile, your FIRSTwiki page, et cetera. But since we're all piling on here, here ya go:
https://github.com/SMNWrobotics

Notable things include our semi-beta scouting app in the FRC2016 repo, made in Xojo and what we used with four other teams last year at GKC. Never found it polished enough to show it off, but in case you are interested.

EDIT: Sniped on FIRSTwiki. Please, take ten minutes and add your team's info there if you can. It really helps us out a ton!
__________________

F4 Network Website Designer

2010-2012: A Whole Buncha FLL Teams; Team Spirit, Gracious Professionalism Award winner
2015-Current: FRC 1982, Captain, Electrical Lead
Beginning FIRST Volunteer

Moderator on the FIRSTwiki
Reply With Quote
  #8   Spotlight this post!  
Old 01-03-2017, 04:02 PM
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 505
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: Why the sudden burst of code postings?

Well, we were going to clean this up for public release, but I guess were too lazy for that...

Of some interest maybe onboard vision processing, in labview. There are some of out bot log files for our matches, which don't do much not knowing the bot, but the code is there to do the recording if interested.

Also there are a wealth of information in the commits, but seeing I just uploaded this from our private stash, you maybe missing gems, like "my hands are typing words."

Anyways, it's out there, and posted in a public forum.

https://github.com/TORC2137
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #9   Spotlight this post!  
Old 01-03-2017, 04:21 PM
frcguy's Avatar
frcguy frcguy is offline
Unregistered Unuser
AKA: Nicholas Dal Porto
FRC #5940 (B.R.E.A.D.)
Team Role: Tactician
 
Join Date: Dec 2015
Rookie Year: 2012
Location: Burlingame, California
Posts: 844
frcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond reputefrcguy has a reputation beyond repute
Re: Why the sudden burst of code postings?

I guess I'll get in on this.

Our Github can be found here: https://github.com/bread5940. All our code is in there - for both our robots and random projects. Several things may be of interest. FRC-2016-BREAD-Codebase is all the code for our competition bot last season. It includes some cool stuff like modular autonomous, a full set of systems tests that are run before each match, a camera implementation that overlays the stream with lines for targeting, and other fun stuff. There's a full set of Javadocs generated for it, and you can find the link to those in the readme. Some other notable things: 2017beta is some code we wrote that features some of the new changes for the upcoming season, including the new camera server and imports for the new Talon SRX plugins. There's some random vision processing stuff on there as well, mainly experimentation from the off season. If anyone has any questions feel free to PM me and I'll pass them along to the appropriate people on the team.

Thanks!
__________________


2016: Team 5940 (Silicon Valley Regional Rookie All-Star and Quarterfinalist, Curie Quarterfinalist)

Volunteer: 2016 (Chezy Champs Field Reset, Capital City Classic FTA, MadTown ThrowDown FTA)
Reply With Quote
  #10   Spotlight this post!  
Old 01-03-2017, 04:25 PM
Hitchhiker 42's Avatar
Hitchhiker 42 Hitchhiker 42 is offline
Roboter
AKA: Mark Lavrentyev
FRC #4557 (FullMetal Falcons)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2015
Location: Cromwell, CT
Posts: 466
Hitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to beholdHitchhiker 42 is a splendid one to behold
Re: Why the sudden burst of code postings?

Robot Code 2016 is our robot code for this previous year. Also, what Devin said.
__________________



2016 - NE District Championship Entrepreneurship Award
2016 - Hartford District Industrial Design Award
2016 - Waterbury District Engineering Inspiration Award
Reply With Quote
  #11   Spotlight this post!  
Unread 01-03-2017, 10:34 PM
mikhalev mikhalev is offline
Registered User
FRC #2122
 
Join Date: Dec 2014
Location: Boise
Posts: 1
mikhalev will become famous soon enough
Re: Why the sudden burst of code postings?

Team Tators has some code/CAD to post also.

Our CAD postings are up here. The only thing we have up there currently is a roboRIO mount and port protector.

Our offseason robot code is up here. This is the first time we as a team have used Java for a robot, actually. Some interesting things about what we did:
  • We used gradle + a custom script called build.sh to build and deploy code to the robot. Since we used gradle, we could also use external libraries easily, even between team members computers.
  • We split up the robot code into 4 parts.:
    Desktop, which does not depend on WPILib at all and opens a GUI simulation of the robot.
    Rio, which actually runs on the roboRio and contains all of the WPILib-specific code.
    Core, which contains all code common to both rio and desktop.
    And config, which contains YAML files which can be modified to easily change the behavior of the robot.
  • We have code for interfacing with an ADXRS453 gyro here. This differs from WPILib's implementation in that it measures the delay of each run of the Notifier, providing for more accurate rate integration.
  • We have our auton modes written in our config files, which allows for quick and easy tweaks without having to reupload code.

We are also releasing our vision code for the same robot here. This is mostly written in Kotlin, and uses OpenCV and NetworkTables to process images from a Raspberry Pi Camera and send angle values back to the roboRIO for targetting.

That's basically it.
Reply With Quote
  #12   Spotlight this post!  
Unread 01-03-2017, 11:18 PM
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,069
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: Why the sudden burst of code postings?

Quote:
Originally Posted by mikhalev View Post
  • We have code for interfacing with an ADXRS453 gyro here. This differs from WPILib's implementation in that it measures the delay of each run of the Notifier, providing for more accurate rate integration.
This caught my eye because we also wrote our own ADXRS453 class last season. Ours was almost entirely a copy of the wpilib ADXRS450 driver, with a couple minor tweaks: https://github.com/Team254/FRC-2016-...S453_Gyro.java

Note that your implementation for the ADXRS453 does rate integration in software at 120Hz based on a Notifier callback. The wpilib implementation does rate integration in an FPGA accumulator at 1KHz.

Your method is certainly adequate for FRC use (and it's all we could do before the cRIO era), but it isn't correct to say that it is more accurate than wpilib's implementation.
Reply With Quote
  #13   Spotlight this post!  
Unread 01-03-2017, 11:39 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,033
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Why the sudden burst of code postings?

+1
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #14   Spotlight this post!  
Unread 01-04-2017, 12:24 AM
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,070
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Why the sudden burst of code postings?

Quote:
Originally Posted by Jared Russell View Post
This caught my eye because we also wrote our own ADXRS453 class last season. Ours was almost entirely a copy of the wpilib ADXRS450 driver, with a couple minor tweaks: https://github.com/Team254/FRC-2016-...S453_Gyro.java

Note that your implementation for the ADXRS453 does rate integration in software at 120Hz based on a Notifier callback. The wpilib implementation does rate integration in an FPGA accumulator at 1KHz.

Your method is certainly adequate for FRC use (and it's all we could do before the cRIO era), but it isn't correct to say that it is more accurate than wpilib's implementation.
For the ADXRS453, its actually not a FPGA accumulator. Its a HAL level notifier running at 200Hz. It was originally at the Java level, but that took about 50% of the CPU if I recall correctly, so it ended up being built at the HAL level.

However I will agree that the wpilib implementation is still probably more accurate. When a notifier comes from the FPGA, it actually pings a Java thread, which then enters Java. So there where always be a context switch whenever entering the Java code. This was another reason the code was done at the HAL level in WPILib. (Note there are some issues with both SPI and Notifiers not being RT threads, that will probably be fixed for 2018, as it was discovered too late and determined to not be critical enough to fix for 2017. However we have some graphs that show that the timers hit pretty much at 5ms every single time with very few misses.)
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #15   Spotlight this post!  
Unread 01-04-2017, 12:51 AM
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,069
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: Why the sudden burst of code postings?

Quote:
Originally Posted by Thad House View Post
For the ADXRS453, its actually not a FPGA accumulator. Its a HAL level notifier running at 200Hz. It was originally at the Java level, but that took about 50% of the CPU if I recall correctly, so it ended up being built at the HAL level.
Bleh, now that you mention it I remember that it is a HAL accumulator, but the 200Hz bit is news to me; all Java code and documentation suggests that the period requested by spiInitAccumulator will be honored. Stuff like that ought to be documented.
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 02:36 PM.

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