← Back to Projects
Competitions2024.09 – 2025.06

RoboMaster Swerve Drive Infantry Robot

Led embedded development for a swerve-drive infantry robot — custom encoder design, gimbal stabilization, omnidirectional chassis control, and power management. Won 1st place at the Southwest Regional and 3rd nationally at RoboMaster 2025.

STM32H7FreeRTOSCAN BusPIDFOCC++
RoboMaster Swerve Drive Infantry Robot

Background

RoboMaster is a full-contact robot combat competition where teams design, build, and program robots from scratch. I was the embedded lead for our swerve-drive infantry — the most mechanically complex unit on the field, requiring precise omnidirectional movement and a stabilized gimbal that can track targets regardless of chassis orientation.

What I Did

Designed a layered firmware architecture (APP / Module / BSP) in C++ with full decoupling between application logic, motor/sensor drivers, and peripheral HAL. Built a self-developed hollow-shaft magnetic encoder using the MPS MA600 chip with a field compensation algorithm, achieving <0.1° error. Implemented swerve chassis kinematics with vector decomposition, 1st-order low-pass filtering for smooth high-agility movement, and PID-based current allocation to minimize wheel slip. Developed a gyroscope-closed-loop gimbal with MIT control (position + velocity + feedforward torque in parallel) and variable-speed integration, achieving <100 ms step response to 0.1 rad with near-zero steady-state error on a 2 kg gimbal driven by a 1 Nm direct-drive motor.

Challenges

Wireless debugging was critical for fast iteration on the field. Integrated Ozone + J-Link over LAN via an onboard Linux SBC, enabling non-intrusive parameter tuning without touching the robot. Encoder field compensation required careful characterization of magnetic interference from nearby motors.

Takeaways

2025 RoboMaster Super Combat — National 1st Prize (3rd nationally, 1st in Southwest). Alliance Match Southwest — 3rd place (National 2nd Prize).

Gallery

RoboMaster Swerve Drive Infantry Robot 1
RoboMaster Swerve Drive Infantry Robot 2
RoboMaster Swerve Drive Infantry Robot 3
RoboMaster Swerve Drive Infantry Robot 4
RoboMaster Swerve Drive Infantry Robot 5
RoboMaster Swerve Drive Infantry Robot 6
RoboMaster Swerve Drive Infantry Robot 7
RoboMaster Swerve Drive Infantry Robot 8
RoboMaster Swerve Drive Infantry Robot 9
RoboMaster Swerve Drive Infantry Robot 10
RoboMaster Swerve Drive Infantry Robot 11
RoboMaster Swerve Drive Infantry Robot 12
RoboMaster Swerve Drive Infantry Robot 13
RoboMaster Swerve Drive Infantry Robot 14
RoboMaster Swerve Drive Infantry Robot 15
RoboMaster Swerve Drive Infantry Robot 16
RoboMaster Swerve Drive Infantry Robot 17
RoboMaster Swerve Drive Infantry Robot 18
RoboMaster Swerve Drive Infantry Robot 19
RoboMaster Swerve Drive Infantry Robot 20

Video