So like many of you I have time on my hands.
One area we have always needed help in is programming. The students have been
very eager and quite bright, but the programming group has not had a dedicated
mentor. As the head coach I want to better understand the Command Based programming
methodology. I have a CS degree and have programmed in both Java and C++ in my career,
however it has been some time.
I also found this wonderful tutorial from FRC 4627 from Manning Robotics
which I have watched several times. However it is for the old Command based programming
not the 2020 rewrite. I understand that RobotContainer = OI and Constants = RobotMap but there are some other significant changes.
My hope is to really grasp this and run a programming boot camp over the summer.
Does anyone know of any other tutorials, video would be great, on the paradigm?
There is definitely not going to be much as of yet that specifically targets the new framework. With the framework having only being released ~3months ago, and most of that time having been build season, there hasn’t exactly been time to develop updated tutorials for the rewrite.
The only other really significant changes that I’ve noticed are the use of dependency injection for commands, lambdas for passing data outside of command’s subsystem to commands, and more pushing to have as much of your logic in the RobotContainer as possible through the availability of:
inline Command Declarations
Inline CommandGroup Declarations
Chaining Trigger Objects, my personal favorite, with the and(), or(), and negate() methods.
and I’m sure i missed a few things!
As for other really useful resources, I found the CommandBased WPILIB Examples to be a great source for looking at how some common things may be done within the new framework.
The Docs are good enough to get through it. I actually went digging through the wpilib source to try and figure out what the Scheduler was doing to try and figure it out because the docs weren’t telling me what I wanted to know. I don’t recommend that route.
I think the thing that has helped me the most, and the thing that helps the students the most, is to visualize the problems and the state of the robot.
Using shuffleboard has been a game changer for our students. They learn how to add their components to tabs in Shuffleboard, to include the subsystem itself (helps to see what is scheduled and when), we run ALL of our commands from Shuffleboard to include tuning values like motor speeds etc, as that gives the students a very easy way to see what’s going wrong with their code.
Introduce Command-Based for sure, as I think it’s really simple for kids to understand, once they are over the hump. Do it in a way that helps the visual learners see what is going on, and you’ll be able to get to everything much more quickly in a build season.
I think they’re good enough for an experienced software developer AND someone who has been mentoring (or around) FRC for a while. And maybe that’s the intended target! My students struggled with it initially and needed alot more guidance as compared to some other FRC topics.