Open Source Code

How does everyone here feel about open sourcing your robots code? Should it be done? Do a lot of teams do it? Is it worthwhile? Where do you all open source it? Should it be done during build? After build is over? After the season is over? When the next season starts? What does CD think?

I have never seen anyone else’s code, nor do i really need to, except to see how things are implemented, which can be found in the javadocs and such.

I think code should be at the disclosure of the writers, as it is always robot specific, but algorithms can be changed to fit many robots. Also, my code is very very very very very very messy (98% is usually commented out and i have random things in places because I know what everything is for and thats all that matters), but posting it online could be next to useless, i think it might be helpful for rookie teams and such, but veteran teams should be able to write their own code.

Also, i voted for during build season because A) If people copy it, they have to make it fit their own robot in time, and B) if you don’t have the code during build season, it could become outdated and inefficient, or you may have found another way of doing it afterwards.

So i say, yes, there should be open source code (everything should be open source :P), but I don’t see how it would be all that useful. :stuck_out_tongue: Maybe more like, open source algorithms.

I think there is a place for teams with good development practices, who are building reusable libraries, etc., to publically distrubute their work. Both for educational and time saving reasons.

However, in general I do not believe most teams have any reason to distribute their code. Most FRC teams’ code is of horrible quality, and has little to no chance of reuse/modifcation by anyone other than the author. There is no reason for this type of code to be distributed.

There is also the issue of looseing competitive advantage when posting innovative code during the build season. FRC is a competition, so this is a concern, but my guess is that 99+% of teams don’t have any interesting intellectual property in their code.

From the definition of COTS parts in section 1 of the game manual:

For the purposes of the FRC, generally available software modules obtained from open sources (e.g. professional publications, commonly used FRC community-accessible web resources, industry source code repositories, etc.) that are not specifically affiliated with individual FRC teams shall be considered COTS items.

The Blue Box in <R22> clarifies this further in the last example:

… After completing the software, they post it in a generally accessible public forum and make the code available to all teams. Because they have made their software generally available (per the Blue Box in the definition of COTS, it is considered COTS software and they can use it on their ROBOT.

That would seem to add a significant incentive to open source your code: enabling re-use between seasons.

Correct me if I’m wrong, but I believe that rule only applies to sending code specifically to one/some team(s) for their robot rather than re-using your own robot’s code the following year.

It is specifically against the rules to re-use code from year to year (just as it is against the rules to re-use a design of a manipulator, etc.) unless the code has been released in a public forum (and therefore becomes a COTS “part”).

What defines an amount that isn’t able to be reused? I mean, there’s some things that have to be the same every year, so what’s the point where they draw a line? How about algorithms you use? Is it against the rules to reuse one if the implementation is going to be [almost] exactly the same?

Algorithms can be reused each year, but not substantial amounts of code unless it can be declared “COTS” by being released in a public forum.

It’s explained well in section 4.3.6 “Fabrication Schedule” of the Competition Manual. The blue box under R22 gives some examples of the rule intent.

Our team started over from scratch this year. I took over as the new programmer. I chose Java as our programming language. At first, I had troubling understanding how some of the robot programming went. I would have liked it if I could have found simple examples of robot code to be used.