Motor Controllers
YAGSL supports most common FRC motor controllers (except Venom's) and while we recommend using a brushless motor with an integrated encoder if at all possible we support brushed motors with external quadrature encoders as well ONLY with SparkMAX's.
The integrated encoder value will show up in shuffleboard under swerve/modules/.../Raw Motor Encoder
as directly outputting the encoder value from the motor.
Motor Checklist
Swerve Motor Wrapper
YAGSL created wrappers over all supported Motor Controllers to uniformly fetch and set data that is needed for a Swerve Drive to operate. This wrapper is called SwerveMotor
. All SwerveMotor
's can be fetched via the SwerveModule
configuration object SwerveModuleConfiguration
motor definitions angleMotor
and driveMotor
. The SwerveModule
is able to be fetched by SwerveDrive.getModules()
easily.
Motor Controller Configuration
Only CTRE devices currently support the canbus
option, if your device is using the roboRIO canbus
you must use the value of null
or "rio"
for supported CTRE devices. If you are using a CANivore, and the device is on the CANivore bus, the name must match the CANivore name.
Inside any module JSON such as frontleft.json
,frontright.json
,backleft.json
,backright.json
this is what you would see to configure a motor controller.
Possible Motor Controller Types
At this time I do not provide documentation on brushed motor utilization, like sparkmax_brushed
and talonsrx
.
Last updated