So if you’re already familiar with the nuts-and-bolts of how to write software, the stuff to fill in is how to decide what your software needs to do. Basically, your next month will be a crash-course in vocabulary and all the details of robot hardware.
Some specific things to start with:
Wpilib’s Zero to Robot should give a good walkthrough of the basic steps required to get a robot up and running. For you, this is an overview of the basic and minimum steps you’ll be taking to make your software do meaningful things on an FRC robot.
The hardware components overview is also great - again, think of it as a vocab and basic component placement lesson. Understanding the hardware getting programmed will be key to understanding what to write for programming.
Keep in mind - the vast majority of teams get by with very little code - examples and discussion you find here and on the FRC discord server reflect a very small subset of the community. Most of the people have very grey beards, metaphorically or literally.
As another sample, here’s the offseason training we’ve been working our team through. Take it with a grain of salt - it’s far from perfect, too big and too wordy for biting off quickly, and refers to a lot of development techniques and tools specific to our team. But, it does reflect a purposeful pedagogy that is intended to bring a student up from zero to “just dangerous enough to make a good robot”.
Python is a simple, powerful language that acts as a great base for almost any application.
The best part is, there are a dedicated group of maintainers who keep it up to date! The installation and functionality of RobotPy are really well described here. My team has used it for many years, and I also try to help out when I can.
I’d be happy to talk more about using Python and getting set up if you want. Or just OOP in FRC in general. Or, feel free to check out my team’s repository. I feel as though we’ve really grabbed the Python command framework by the horns!
P.S. we use swerve in the branch I shared. Feel free to look at the DeepSpace branch for a mecanum perspective or master for a tank setup.
OP, stick to Java or C++. Python (and other splitoffs such as Kotlin and Rust) will work, but if you have any issues, the FTA’s will only help for the languages that are officially supported (Java, C++, and LabView). You may be able to get help from teams? But looking at previous years breakdowns of who is using what language, Python is an extremely small subset of teams (small being 77 teams in 2019).
To your questions, the WPILib docs are what you should check out first. Many teams also upload their code to GitHub, so you can see the wide array of how teams code, from the basics to the cutting edge of the programming spectrum. I shouldnt need to tell you to build program within your means though.
My beard is more salt and pepper currently and my wife made me stop wearing suspenders… but I digress.
Much thanks to all that read and replied. I’m definitely going to be digging into those links over break. The vocabulary is definitely a challenge. Most of the robotics knowledge seems to lie with the kids at the moment which is extra scary as it’s a young team. So we have to find a way to make sure our older students actually teach the younger (and me) instead of just doing everything.
In addition to the great Java resources above, I recommend mounting the Rio on a board, wire up pneumatics, motors, and sensors, and go to town without worrying about a robot. With the docs in hand you’ll be able to figure out how things work.
I would advise against learning a new language in a month. For now, consider programming a practice robot in LabVIEW (shudder) and teaching the students concepts during the season. Transitioning to Java next year will be easy once you’ve got the ideas down. Plus, you can have the whole summer to enact the change. It only takes one or two dedicated students to take the helm.
Lots of great advice in here. The WPILib documentation is just an awesome resource for the pieces you need to learn. Whatever language you decide to use, (…cough, cough, JAVA!!!, cough…) running through the Zero to Robot tutorial is a quick introduction and also a big confidence booster. It’s the “Hello, World!” of FRC.
And while you’ll learn the most from wiring up a Roborio on a sheet of plywood, no CD thread would be complete without somebody mentioning the Romi. The Romi is a small Arduino+Raspberry Pi robot that can be programmed using the same tools, languages, and WPILib libraries as a full-size FRC robot. They are relatively inexpensive, and I usually recommend sending one home with every student or mentor who is interested in programming.
Of course there are differences between working with the Romi and working with a full-size robot, but being able to test your robot coding skills in the comfort of your own living room is an enormous benefit. Speaking for myself, I never completed my own personal “Zero to FRC Robot” journey until I had a Romi.
You can order FIRST-approved Romis (Romii?) direct from Pololu.
Great community here. Was in same spot 5 years ago.
WPILib team does/did an excellent job with both the software and the documentation.
I have zero hesitation recommending you switch to Java.
The VScode plug-ins are awesome. So are the examples.
The command based framework is something to quickly learn and embrace. Beginner programmers don’t need to know how the whole thing works to be productive.
ROMI is a great suggestion so you aren’t waiting on the build team, which is waiting on the CAD team, which is waiting on…. Gives you a dedicated platform for learning and teaching the structure of the code.
Book mark the Java doc pages listed here…. Hasn’t been updated for this season…
Reach out whenever you have a question…. If you are writing a lot of code you are probably doing it wrong…
Personally, I feel that these issues are easily avoidable for a beginner team with the right guidance. Python is a somewhat simple language compared to something of C++, and I feel as though that its simplicity contributes to my team’s lack of issues.
If competition-time failure is a concern, then yes, do not use these unsupported languages.
The same could be said of C++, actually, despite your statement that Python is simpler than C++ (which it is). C++ is pretty easy to teach as long as you don’t program like it’s 1999 with manual memory allocation and pointers. Basically, don’t write C++ like a Java programmer.
Here’s how 3512 does it: Intro to C++ - FRC Team 3512. The veteran students answer questions rookies have, and I wasn’t involved in training at all the last few years. Once you have examples of clean codebases, it’s pretty easy to pattern match it for future years.