Teamwork & Hardware Abstraction
At MARS 2614, we believe that “The robots are the vehicle; the students are the cargo.” Writing code isn’t just about building a winning robot—it is mostly a way to learn, use Teamwork, and make sure everyone is Included.
However, robot code can quickly become scary. If a robot is just one huge pile of code, newer students might feel scared they will break the entire robot with a single typo. This slows down work and makes older programmers accidently block younger kids from trying.
MARSLib fixes this problem by using Hardware Abstraction (the IO Layer pattern). By splitting up the code that talks to the hardware from the math that controls it, we force everyone to work together as a team.
Parallel Work
Section titled “Parallel Work”In a normal robot codebase, nobody can test the shooter or drive base code until the physical robot is completely built.
With MARSLib’s abstraction, work happens in parallel (at the same time):
- Student A (Beginner): Can write the
FlywheelIOSimclass, learning how basic physics and math work. - Student B (Intermediate): Can write the
FlywheelIOTalonFXclass, focusing entirely on learning the motor hardware and CAN IDs. - Student C (Advanced): Can write the smart math controls inside
FlywheelSubsystem—testing their tuning entirely using the computer’s simulated physics.
Nobody is blocked. Multiple students can work on the same system at the same time. By the time the real robot is handed to the software team, all three parts have already been written and tested.
Safe Code for All Experience Levels
Section titled “Safe Code for All Experience Levels”Because the IO abstraction acts as a clear wall, it puts code in a safe “sandbox” for developers to learn and experiment:
- Focused Learning: A newer programmer asked to add a new motor to the intake doesn’t have to understand how the entire robot’s complex loop operates. They only need to safely edit
IntakeIO.java. - “No Robot Left Behind”: True to Phil Tucker’s dream of giving everyone a chance, students do not have to fight for time on the one real robot. Because the hardware is split off, 10 different students can be testing 10 different mechanisms at the same time on their own laptops using
dyn4jphysics simulation. - Easy Mentorship: Older students can build the frame of the code and let newer students fill in the details. This safely guides learning without risking the main code’s health.
By using hardware abstraction, MARSLib ensures that everyone—no matter their skill level—can help the team and the robot.