Mechanisms

This section serves to provide API usage of mechanisms supported by Phoenix 6.

Swerve

Documentation on the Phoenix 6 Swerve API

Swerve Overview
Differential

Documentation on the Phoenix 6 Differential Mechanism APIs

Differential Overview

Generating Mechanisms

Mechanisms such as swerve or an elevator can be generated using Tuner X, greatly simplifying the setup process and eliminating many sources of error.

Additionally, the corvus CLI tool can be used from a terminal to generate a mechanism from a JSON specification, including a full swerve project. corvus can be downloaded from the CLI Tools download page.

To view a list of available commands, run corvus either with no parameters or with --help.

Running the corvus CLI summarized help message

As an example, to generate an example Elevator subsystem for a Java robot program, run:

./corvus json elevator "Elevator.json"
./corvus elevator java -i "Elevator.json" -o "src/main/java/frc/robot/subsystems/Elevator.java"