Team 4048 - swerve drive code for LabVIEW

We’ve just released a LabVIEW version of our swerve drive code. We previously released Java code for the same hardware. This code uses the AndyMark am-3009 swerve modules that use a CIM to drive the wheel, a PG71 with quad encoder for steering, and an optional analog absolute encoder for initial alignment. Steering PID control is implemented via a Talon SRX and an optional gyro (Pigeon IMU) can be added for field-centric driving. There is also logic for minimizing wheel movement during steering changes. The swerve logic is isolated from the hardware code to hopefully make it easier to adapt to other hardware. It’s written using LabVIEW 2018 (FRC 2019) and CTR-E Phoenix (for Talon SRX).
Here’s the github repo.
A list of our public software can be found on our web site here:

1 Like

What type of joysticks do you use?

We’re using Logitech Attack 3 joysticks. We sometime use Logitech Extreme 3D Pro joysticks but the ones were have are right handed which is a problem when using one per hand. The Attack 3 are “ambidextrous” so to speak.