Yup, Gyro’s the way to go. All you need to do is create a heading vector from the driver’s controller (for instance, left stick x + y), rotate that vector by the robot’s heading, then use that vector as your translation vector in the swerve math (Vx and Vy, or FWD and STR, in Ether’s derivation).

You’re correct. Your gyro should give you the angle the robot is facing relative to the angle it was at when it was calibrated (let’s assume for now that’s forward). To transform the joystick inputs into field-relative coordinates, follow these steps:

Convert the joystick cartesian coordinates (x,y) into polar coordinates (r,θ)

Subtract the gyro angle from the joystick angle

Convert back to cartesian coordinates

Your new x,y coordinates are now “field-relative” as you described

If you’re using LabView I’m pretty sure you can just plug in the gyro readout to the Holonomic Drive block, making it one thing LabView makes way easier!