Command-Based Programming Patterns

Hey all,

So we used the Simple Robot Template this year for the programming of our robot. It works, but it’s not the best way to code, especially when your expecting a few new members on the programming team. I’ve tried to port our code to use the Command Pattern, but I’m not sure how to structure it.

So, I’ve come for some help. How do you guys structure your command-based programs?

WPI has a very nice overview and tutorial on using the command based framework at: https://wpilib.screenstepslive.com/s/3120/m/7952

It is a very powerful framework, but expect it to take some time to wrap your head around it. It might be a challenge to switch mid-season.

Looking at the other frameworks I have used before (not robotics related). It’s not quite that powerful, in my option.

Also, I have looked at those docs. The “Converting a Simple Autonomous program to a Command based autonomous program” seems new, so I’ll have a look at that. The things is though, I’m looking for advice on general program structure, not on making commands, command groups, and subsystems.

Also, the season is pretty much over for us.

If you’re mainly interested in the structure of the program, then check out our (unfinished) code for this year. The structure is all there, even though it’s only about 85% done.

I’m actually kind of proud of it, since last year was pretty disorganized.

Rotoraptors-ArialAssist.zip (525 KB)


Rotoraptors-ArialAssist.zip (525 KB)

Neat. Thanks for that. I’ll have a look over it and see what I can get from it.