Go to Post Iteration is something everyone can do. - [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!  
Unread 31-08-2016, 22:55
wesleyac's Avatar
wesleyac wesleyac is offline
Registered User
AKA: Wesley Aptekar-Cassels
FRC #1678
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Davis, CA
Posts: 43
wesleyac is a glorious beacon of lightwesleyac is a glorious beacon of lightwesleyac is a glorious beacon of lightwesleyac is a glorious beacon of lightwesleyac is a glorious beacon of light
1678 code release

1678 is proud to present our code for our 2016 robot, Adrian!

Some cool features of our code include:

If you're interested in building the code, you'll need a computer running linux or mac (although all of our students use linux, so I'm not sure if it still builds on mac).

You'll need to install bazel. Once you've done that you can run:

Code:
bazel build //frc1678 --cpu=roborio # Builds the code
./deploy # Deploys the code to the robot

We're also releasing our code for our 2015 robot Lemon Drop.

If you have any questions about our code, feel free to ask! Most of our students spend all their waking hours on chief, so we should get back to you quickly
__________________
Quote:
Originally Posted by The programming team
Define "works."
Reply With Quote
  #2   Spotlight this post!  
Unread 01-09-2016, 01:16
azaclauson azaclauson is offline
Registered User
FRC #5593
 
Join Date: Jul 2016
Location: Tasmania
Posts: 17
azaclauson is an unknown quantity at this point
Re: 1678 code release

I've got a question .

Was there any particular reason not to use Commands?

It looks like your 2016 program would have suited the command based approach so I'm wondering if you tried it and encountered some shortcomings or something else?
Reply With Quote
  #3   Spotlight this post!  
Unread 01-09-2016, 02:08
wesleyac's Avatar
wesleyac wesleyac is offline
Registered User
AKA: Wesley Aptekar-Cassels
FRC #1678
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Davis, CA
Posts: 43
wesleyac is a glorious beacon of lightwesleyac is a glorious beacon of lightwesleyac is a glorious beacon of lightwesleyac is a glorious beacon of lightwesleyac is a glorious beacon of light
Re: 1678 code release

There are a few reasons that we didn't use wpilib's command based system. The first one is that our tendency is to look at what we want to do, and decide and create the architecture based on that - if we choose to use wpilib's command based system, we don't have very much flexibility to change it.

Another reason is that programmers on our team tend to distrust wpilib. I've seen what I think it should do and what it's actually doing vary far too many times for me to trust it. We've gotten to the point of isolating all calls to wpilib to one wrapper thread, just so we don't have to deal with interfacing with it directly anymore.

I haven't looked into command based programming much, but it looks like it has the following problems:
  • Poor/no (?) threading support
  • only runs when it gets DS packets

We end up having a similar system to command based programming in some places (lemonscript, the drivetrain subsystem, etc), but this allows us to implement it in a way that fits into our codebase well, and also lets us only use it where it makes sense to use it - in other places different methods work just as well, or better.
__________________
Quote:
Originally Posted by The programming team
Define "works."
Reply With Quote
  #4   Spotlight this post!  
Unread 08-12-2016, 23:44
apache8080 apache8080 is offline
Lead Programmer, Drive Coach, Scout
AKA: Rishi Desai
FRC #5677
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Jose, CA
Posts: 36
apache8080 is on a distinguished road
Re: 1678 code release

Is lemonscript what allows you guys to avoid using wpilib through your main code?

After looking at your code a little closer, it seems like you guys are using lemonscript as a scripting language for autonomous loops. I get how this works during the autonomous period since the robot doesn't need to actually be communicating with the DS during that time other than when auto begins and when it ends. I don't get how you guys are getting joystick input during teleop. Does lemonscript handle this in someway?

This may be a dumb question but thanks for the help.

Also thanks for the great resources.
__________________
Rishi Desai

Team 5677, 2016-Present
Team 3256, 2013-2016
My GitHub

Last edited by apache8080 : 08-12-2016 at 23:48.
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 08: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