Summary

  • Designed and programmed robot subsystems teleoperation and autonomous movement in Kotlin.
  • Developed custom path following using PID and motion profiling for a swerve drivetrain.
  • Implemented systems for knowledge transfer between members of the team.

FIRST Robotics Competition

The FIRST Robotics Competition (FRC) is a competition where teams are given around a 6 week timeline to analyze a game and then design and build a robot to compete in the game. I was on my school’s team for all four years of high school and was on leadership for two of those years.

Programming

For my first year on the team, I was responsible for the code framework for most of the subsystems on the robot. This involved making basic state machines for each subsystem and programming motor states to then be enhanced using various feedback loops.

The next year I was introduced to feedback loops which we used for our elevator for the game Destination: Deep Space. For this game, since there were predefined positions that we would need to go to score, PID loops in conjunction with vision-assisted alignment would automate scoring for the driver. Although I had little background in tuning control loops, I soon became interested in other methods of control with which I would expand on through my FTC team.

One major change that we made in our codebase during my final year on the team was switching to a command-based paradigm. Like the “state-machine” framework that we used in the past, we could focus on the behavior of the robot, but now, given that WPILib, the library used in the competition, had extensive support for command-based, it meant that members would have less overhead in trying to understand the codebase.

This year we also decided to switch to a holonomic drivetrain. Part of the reasoning behind this was since the game had not changed, we felt comfortable pushing our technical boundaries and due to the relatively flat and open nature of the field, there would be minimal damage to swerve modules.

In the past, we used a west-coast drivetrain which meant that the heading of the robot affected the direction it was moving. This made path planning convenient since there were more constraints on the robot in terms of its heading. With a swerve drivetrain, since there is no real “forward” direction, there are many ways to reach a given heading and velocity combination. Because of this, we had to write our own path following algorithm to meet our needs. When designing our controller, we took inspiration from WPILib and a popular path-planning library in FTC called Road Runner. In our controller, we used a PID loop for each axis the robot could move on (forwards, sideways, and rotational) to ensure that the robot would follow the pregenerated trajectory.

Mentoring

After taking a break from the team for a year, I came back as a mentor for the controls subteam. Since I was a member of the team, we were lucky enough to have an ex-member mentor who stayed with the team which meant that he was the main point of knowledge transfer between each year. From mentoring my old FTC team I realized the importance of knowledge transfer in ensuring that a team didn’t have to start from square one each year. Because of this, I wanted to focus my mentoring to creating ways for new members to easily pick up on whatever would be needed to succeed in the team. This also involves developing systems for the team to remain autonomous, regardless of whether the team does have a mentor or not.

Looking Ahead

My technical experiences in FRC were a significant factor in my decision to pursue robotics and autonomy in college and hopefully as a career. As part of this, I took ECE 486 - Control Systems to gain a better understanding of control systems and how to use them in a real-world application.