YAGSL is intended to be an easy implementation of a generic swerve drive that should work for most square swerve drives. The project is documented on here. The JSON documentation can also be found here
This example is intended to be a starting place on how to use YAGSL. By no means is this intended to be the base of your robot project. YAGSL provides an easy way to generate a SwerveDrive which can be used in both TimedRobot and Command-Based Robot templates.
Vendor URL:
https://broncbotz3481.github.io/YAGSL-Lib/yagsl/yagsl.json
Javadocs here
Library here
Code here
WIKI
Config Generation
We will be actively montoring this and fix any issues when we can!
- Development happens here on
YAGSL-Example
.YAGSL
andYAGSL-Lib
are updated on a nightly basis.
TL;DR Make your configuration here and put it into the structure bellow.
deploy
└── swerve
├── controllerproperties.json
├── modules
│ ├── backleft.json
│ ├── backright.json
│ ├── frontleft.json
│ ├── frontright.json
│ ├── physicalproperties.json
│ └── pidfproperties.json
└── swervedrive.json
import java.io.File;
import edu.wpi.first.wpilibj.Filesystem;
import swervelib.parser.SwerveParser;
import swervelib.SwerveDrive;
File swerveJsonDirectory=new File(Filesystem.getDeployDirectory(),"swerve");
SwerveDrive swerveDrive=new SwerveParser(swerveJsonDirectory).createSwerveDrive();
- Invert the gyro scope.
- Invert the drive motors for every module. (If front and back become reversed when turning)
- Invert the angle motor.
- Implement momentum velocity limitations in SwerveMath.