Documentation
Features and Resources
Features and resources are located on the discussions page here https://github.com/BroncBotz3481/YAGSL-Example/discussions
How to create a swerve drive?
YAGSL is unique in the fact that you can create a swerve drive based entirely off of JSON configuration files. The JSON configuration files should be located in the deploy
directory. You can also create the Configuration objects manually and instantiate your Swerve Drive that way.
How to create a SwerveDrive using JSON.
This example program creates the SwerveDrive
in the SwerveSubsystem
, as you should only interact with it in the SwerveSubsystem if you are using command based programming.
This way is fast and easy, no more large unmaintainable and daunting constants file to worry about! To create a JSON directory look at the JSON documentation.
Creating a swerve drive.
Migrating Old Configuration Files
Delete
wheelDiamter
,gearRatio
,encoderPulsePerRotation
fromphysicalproperties.json
Add
optimalVoltage
tophysicalproperties.json
Delete
maxSpeed
andoptimalVoltage
fromswervedrive.json
IF a swerve module doesn't have the same drive motor or steering motor as the rest of the swerve drive you MUST specify a
conversionFactor
for BOTH the drive and steering motor in the modules configuration JSON file. IF one of the motors is the same as the rest of the swerve drive and you want to use thatconversionFactor
, set theconversionFactor
in the module JSON configuration to 0.You MUST specify the maximum speed when creating a
SwerveDrive
throughnew SwerveParser(directory).createSwerveDrive(maximumSpeed);
IF you do not want to set
conversionFactor
inswervedrive.json
. You can pass it into the constructor as a parameter like this
Contributions
This library is based off of 95's SwervyBot code in addition to a wide variety of other code bases. A huge thank you to every team which has open sourced their swerve code!
Last updated