01

01 Background

FIRST is an international organization that operates robotics competitions for grade-school students. Their most popular is the FIRST Robotics Competition (FRC), which takes place every January. Thousands of students spend 10 weeks with their teams building a 125-lb robot to play a 3 vs. 3 game that changes every year. The students are encouraged to use 3D printing, metalworking techniques, CAD, and Java programming to design and build their robots.

Although I'd been on a robotics team in high school, we competed in the smaller FIRST Tech Challenge (FTC) competition. When I moved to Pittsburgh recently, I wanted to pass on the robotics knowledge I had gained and sought out a local FRC team: Sarah Heinz Advanced Robotics Program (Team SHARP) based out of the Sarah Heinz House located in the North Side of Pittsburgh.

Team SHARP 3260 in Pittsburgh, PA

Team SHARP 3260 in Pittsburgh, PA

I spent time understanding the programming team's key challenges and quickly learned that their biggest pain point every year was lack of time with the robot because the hardware design took 90% of the available build time. This had led to flaky software in the past and no time to tackle more complex logic.

Leveraging my industry experience, I explained to the team that we could build a simulation of the robot to experiment until the real robot was finished. We set to work and ultimately built something resembling a videogame that helped springboard the programming team in the 2020 season. Check out the results on our GitHub.

02

02 Design

The system works as three separate modules communicating over fast UDP using JSON. The first mimics an Xbox controller (so the students wouldn't always be forced to share a real one), the second runs their custom Java code, and the third runs the physics simulation of the robot and field. For the physics simulation, I chose to use OpenSceneGraph for lightweight 3D visualization and Box2D for the physics.

A simulated robot being teleoperated around a virtual field.

A simulated robot being teleoperated around a virtual field.

03

03 Results

Just a couple short weeks later, the simulator solved an unforseen problem: the pandemic hit, and unfortunately all the FRC competitions were canceled for the year. The students still yearned to continue working on the robot, but couldn't meet at the lab, so I launched an online weekly lab meeting to continue working on the robot using the simulator through the summer!

The simulated LIDAR in the sim allowed us to make a 100% autonomous robot.

The simulated LIDAR in the sim allowed us to make a 100% autonomous robot.

To teach the team about autonomous operations, I added a simulated LIDAR to the physics simulation. Over 10 weeks through the summer, we co-programmed a highly sophisticated AI that could distinguish robots from balls on the field, collect and score balls, and navigate the field on its own without any human intervention. We shared our results with the rest of the community to some amazing feedback. The students are continuing to use the code and are planning to purchase a $100 LIDAR with the same specs as the simulated one to attempt to augment their gameplay in 2021.


Final Result