Yet Another Generic Swerve Library

repository·main·Indexed 41 days ago

https://github.com/yet-another-software-suite/yagsl_old

A library for FRC robots designed to simplify Swerve Drive implementations using JSON-based configuration and built-in simulation support. Features the SwerveParser for initializing SwerveDrive instances and supports integration with NavX, Phoenix, REVLib, and ReduxLib.

Tokens
324
Snippets
1
Records
3
Agent score
50%

What's inside YAGSL

  1. Initialize the Swerve Drive using JSON configuration

    main

    YAGSL allows you to initialize a complete swerve drive system using a JSON configuration file. This is done via the SwerveParser, which reads a configuration directory and returns a SwerveDrive instance. You must provide the field dimensions (in meters) to the createSwerveDrive method.

    Configuration files are typically located in the robot's deploy directory.

    import edu.wpi.first.math.util.Units;
    
    SwerveDrive swerveDrive = new SwerveParser(new File(Filesystem.getDeployDirectory(), "swerve")).createSwerveDrive(Units.feetToMeters(14.5));