Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Team 254 Presents: 2015 FRC Code (http://www.chiefdelphi.com/forums/showthread.php?t=137843)

Ryan Johnson 27-07-2015 12:04

Team 254 Presents: 2015 FRC Code
 
Hi everyone,

Team 254 is happy to share the code base for our 2015 robot, Deadlift.

This year’s software includes new features such as a test harness and simulator code to run the program on a computer, web-based graphing tools, constants editor, and autonomous selection, blocking autonomous routines, and a controller that calculates and follows a trapezoidal motion profile, on the fly. Please take a look at the following repositories:

Robot Code: https://github.com/Team254/FRC-2015
Simulated Robot Hardware: https://github.com/Team254/Sim-FRC-2015
Simulator: https://github.com/tombot/FakeWPILib

orangemoore 27-07-2015 12:07

Re: Team 254 - 2015 FRC Code
 
I am really excited to look through this! Thanks for posting this.

AdamHeard 27-07-2015 12:34

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by notmattlythgoe (Post 1491452)
That doesn't mean anything. All of the commits on our team are tagged with the same name because they are done on the same computer.

You know what also doesn't mean anything?

Implied slander from an anonymous account.

notmattlythgoe 27-07-2015 12:35

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by AdamHeard (Post 1491453)
You know what also doesn't mean anything?

Implied slander from an anonymous account.

Truth.

Anupam Goli 27-07-2015 13:04

Re: Team 254 - 2015 FRC Code
 
So would it be possible to use the simulator and run our own code on it at any point, or are there any steps to make it work?

AlexanderTheOK 27-07-2015 13:11

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by AdamHeard (Post 1491453)
You know what also doesn't mean anything?

Implied slander from an anonymous account.

While it does look rather accusatory (the comment by Treefaceman that is) I still find the observation interesting. I've always found one of the nicest things about any revision control (svn or github) was that it sped up our understanding of the stranger bugs:
Code:

#define true ((rand()&15)!=15)
by letting us know who wrote the code in which it was introduced.

If a team of 254s caliber is seemingly forgoing this utility I would personally like to know why. (Different internal system for tracking bugs? Mentors reviewing code before it goes on github? All just speculation of course.)

JamesTerm 27-07-2015 13:43

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by AlexanderTheOK (Post 1491462)
While it does look rather accusatory (the comment by Treefaceman that is) I still find the observation interesting. I've always found one of the nicest things about any revision control (svn or github) was that it sped up our understanding of the stranger bugs:
Code:

#define true ((rand()&15)!=15)
by letting us know who wrote the code in which it was introduced.

If a team of 254s caliber is seemingly forgoing this utility I would personally like to know why. (Different internal system for tracking bugs? Mentors reviewing code before it goes on github? All just speculation of course.)

I like using the "blame" utility in SVN where beside every line of code adds a column of who wrote it and which revision of when it was added/edited. Actually though what really happens (from our workplace) is that each engineer is responsible for their own "module ", This seems to work best for us... there by... reducing the need for "blame".

On a side note... what does that #define line of code do? Is that some fuzzy logic?

AlexanderTheOK 27-07-2015 13:51

Re: Team 254 - 2015 FRC Code
 
It was a prank a friend of mine played on me a few years ago (not while programming robots). Basically, true is true... Most of the time... It's not as easy to detect as #define true false. We had a whole slew of these we did back and forth.

artK 27-07-2015 14:16

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by Treefaceman (Post 1491449)
Couldn't help but notice that nearly all the commits were from Jared and Tom....

Nonetheless, excellent work!

I was a programmer with 254 from 2011-2014. As others mentioned, a lot of the commits are done from Tom or Jared's computer, but students and mentors write the code. 254 programmers usually followed pair/group programming practices, forcing students (and mentors who might be there) to check our work with each other, and a lot of work ends up getting done on a couple of computers. Additionally, when testing the code on the robot, you can only deploy code from one computer at a time, so writing on multiple machines is an unnecessary hassle most of the time.

Quote:

Originally Posted by AlexanderTheOK (Post 1491462)
If a team of 254s caliber is seemingly forgoing this utility I would personally like to know why. (Different internal system for tracking bugs? Mentors reviewing code before it goes on github? All just speculation of course.)

Github isn't designed for our practices of code writing. (Though a version control system that works for arbitrary groups of people committing as one would be cool). And for bugs, we usually just chased them down when we found them, getting help for them as needed.

Joey1939 27-07-2015 15:36

Re: Team 254 - 2015 FRC Code
 
I followed the directions here to run the robot code in the simulator. I got the following error.

Code:

run_sim.rb:6:in `exists?': no implicit conversion of nil into String (TypeError)
        from run_sim.rb:6:in `<main>'


thatprogrammer 27-07-2015 18:01

Re: Team 254 - 2015 FRC Code
 
Some questions (not a very advanced programmer, yet)
1. How do you run autonomous mode despite the looper? If you tried your approach on a normal iterative robot template, the loop would run on the wait commands, preventing it from advancing.
2. You need to generate splines to create paths for motion profiling, right?
3. What is the peacock motor?
Some more questions, but I'll wait for answers to to these first.

Jared 27-07-2015 18:05

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by Joey1939 (Post 1491486)
I followed the directions here to run the robot code in the simulator. I got the following error.

Code:

run_sim.rb:6:in `exists?': no implicit conversion of nil into String (TypeError)
        from run_sim.rb:6:in `<main>'


run_sim.rb takes two arguments, the robot code directory FRC-2015 and the sim directory, Sim-FRC-2015. It sounds like you're giving it only one argument.

Demian Martinez 27-07-2015 23:40

Re: Team 254 - 2015 FRC Code
 
Will we be seeing a build blog anytime soon? Thanks!

thatprogrammer 27-07-2015 23:43

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by Demian Martinez (Post 1491530)
Will we be seeing a build blog anytime soon? Thanks!

They said it's unlikely in the post of their technical binder.

Demian Martinez 27-07-2015 23:50

Re: Team 254 - 2015 FRC Code
 
Quote:

Originally Posted by thatprogrammer (Post 1491532)
They said it's unlikely in the post of their technical binder.

That sucks :(. Was looking forward to it.


All times are GMT -5. The time now is 09:14.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi