What new additions did you make to software this year?

It seems like every year a team raises the bar. I typically wait for 254’s release yearly and go through every class like I am reading a book. As a team looking to improve our software, we are always looking for project ideas.

  • What software features did you add this year?
  • What cool open source software have you seen lately?
  • Anyone know what cool things 254 has in store? lol

Programming Specs
Agile Development Boards
Proper Git Branching and Committing
Commitment to Clean Code Writing

Most of the above comes from the following two books. These books change my life, quite literally. They are must reads for anyone serious about developing software and a programming team.

Clean Code - Robert C. Martin
Clean Agile - Robert C. Martin

Other extremely influential (and free) literature:
The Joel Test: 12 Steps to Better Coding - Joel Spolosky
Painless Functional Specs - Joel Spolosky
Git guides - Github
How to Write a Git Commit Message - Chris Beams

1 Like

This off-season our programming lead and I implemented a swerve drive. It’s still in development but it is one of the cooler projects we’ve done.

Here is our swerve

We also had a huge influx in rookies going from 2 programmers to like 10 or 15, so we have had to put a lot of effort in hands on training. It seemed like a chore but it’s been a great experience bc when you teach something you learn it better yourself.

I thought this may be a good thread for my first post lol.


Some highlights from the changelog

Improvements to DNN object detection accuracy
Improvements to swerve wheel odometry (ended up using camera visual odometry instead)
Added path visualization debugging output
Added obstacle avoidance to path planning, and sped up path optimization
Added an easy way to adjust the path so the intake ran over waypoints instead of the center of the robot
Use object detection code to generate and drive an optimized path through an arbitrary set of game pieces
Updated particle filter localization to use AR/VR markers in addition to DNN object detection, plus lots of other improvements to particle filter robustness
Simulation updates - auto driving, added field map(s), added simulated camera inputs


Nice. Good skills to have. At this highschool level I tend to focus on getting students excited about software more than anything. The styling and documentation skills can come later!

1 Like

Wow. Your autonomous code must be a force!

Any starting points for how you set up some of this path planning stuff, libraries you heavily used? Our autonomous system is severely lacking. Simulation too.

What do you run your object detection on? A Raspberry Pi?

1 Like

If it were me starting from scratch, I’d become familiar with the wpilib trajectory code - Step 4: Creating and Following a Trajectory — FIRST Robotics Competition documentation. If you want to do it yourself, this was our starting point : http://www2.informatik.uni-freiburg.de/~lau/students/Sprunk2008.pdf

Same with simulation, the wpilib code is the obvious place to start. I’m not that familiar with it, but I’m sure others here can help.

This year we used Jetson Nano NX’s as coprocessors. I doubt a Pi would be fast enough without a lot of extra work.


Ok, I get this information is tied to motion profiling, but it felt like a really weird place to put it. Co-processors are not a “beginning motion profiling” topic.

Edit: I see now that the above statement was actually about object detection. Putting it right next to motion-profiling without implying a context shift was very confusing.

1 Like

I totally get where you are coming from, because I had that same philosophy for many year.

The great thing is, you can have both! By imbuing your students with the desire to grow, it can both write clean code and have fun. Unfortunately I don’t have time to write out the “how-to” of it all, but I would be happy to have a chat about it at a future date.

1 Like

We actually do run trajectory generation and following on the Jetson since it is way faster than the Rio.

Motion profiling is a different subject. The code for that in our setup runs on on the motor controllers, e.g. Motor Controller Closed Loop — Phoenix documentation. The code triggering motion profile actions does run on the Jetson in our case, but that’s not new for this year so I didn’t mention it … nor would I really recommend it to other teams unless they already had success running a coprocessor for much less vital tasks.


Jetson Xavier NX*

Though it does share a footprint with the Nano, it’s more closely related the Xavier AGX, thus the name.

Slight correction.


Since C++20 isn’t here yet, 3512 wrote an autonomous mode solution that mimics coroutines (aka suspendable/resumable functions); it worked pretty well.

Here’s an example autonomous mode:

The idea is the main robot loop and an autonomous thread yield to each other so that the autonomous mode gets resumed during each periodic run, and the thread’s stack frame effectively provides the state machine bookkeeping instead of a state machine we write explicitly ourselves. Since the synchronization is written so that the threads never run concurrently, there’s no thread safety issues.

Here’s what actually emulates the coroutine.

I thought it was kinda neat, although I imagine modern command-based serves teams just as well.