YAGSL
  • Welcome to Yet Another Swerve Document
    • Resources
  • Overview
    • What we do
    • Our Features
      • Telemetry
      • Simulation
      • Lock Pose
      • Max Speed
      • Chassis Speed Discretization
      • Vision Odometry
      • Heading Correction
      • Auto-centering Modules
      • Offset Offloading
      • Cosine Compensation
      • Module Auto-synchronization
      • Angular Velocity Compensation
    • Changelog
    • Java API
    • Example Code
    • Config Generator
    • 💸Donations
    • 👕Merch
    • Discord
  • Fundamentals
    • Swerve Drive
    • Swerve Modules
  • Bringing up swerve
    • Preface
    • Swerve Information
    • Check your gyroscope
    • Check your motors
    • Creating your first configuration
  • Configuring YAGSL
    • Getting to know your robot
      • Gear Ratio
    • Dependency Installation
    • Configuration
      • Swerve Drive Configuration
      • Physical Properties Configuration
      • PIDF Properties Configuration
        • PIDF
      • Swerve Module Configuration
      • Controller Properties Configuration
      • Device Configuration
    • Code Setup
    • Standard Conversion Factors
    • How to tune PIDF
    • When to invert?
    • Flowcharts
    • The eight steps
    • Swerve Drive Drift
    • SparkMAX Common Problems
    • Verifying your Module Locations
    • Tuning out Drift
  • Devices
    • Gyroscope
      • NavX
      • Pigeon
      • Pigeon 2.0
      • ADXRS450
      • ADIS16448
      • ADIS16470
    • Motor Controllers
      • SparkMAX
      • SparkFlex
      • TalonFX
    • Absolute Encoders
  • Analytics and Debugging
    • FRC Web Components
    • Advantage Scope
  • Product Guides
    • Java API
    • PathPlanner
    • ❌Tuning PID with REV Hardware Client
    • ❌Drive Code
  • Legacy Documentation
Powered by GitBook
On this page
  • How I found these?
  • MAX Swerve
  • Swerve Drive Specialties (SDS)
  • Thrifty Swerve
  • Plummer Industries

Was this helpful?

Edit on GitHub
  1. Configuring YAGSL

Standard Conversion Factors

This page serves a standard set of conversion factors for a few typical modules.

How I found these?

    // Angle conversion factor is 360 / (GEAR RATIO)
    //  In this case the gear ratio is 12.8 motor revolutions per wheel rotation.
    //  The encoder resolution per motor revolution is 1 per motor revolution.
    double angleConversionFactor = SwerveMath.calculateDegreesPerSteeringRotation(12.8);
    // Motor conversion factor is (PI * WHEEL DIAMETER IN METERS) / (GEAR RATIO).
    //  In this case the wheel diameter is 4 inches, which must be converted to meters to get meters/second.
    //  The gear ratio is 6.75 motor revolutions per wheel rotation.
    //  The encoder resolution per motor revolution is 1 per motor revolution.
    double driveConversionFactor = SwerveMath.calculateMetersPerRotation(Units.inchesToMeters(4), 6.75);
    System.out.println("\"conversionFactors\": {");
    System.out.println("\t\"angle\": {\"factor\": " + angleConversionFactor + "},");
    System.out.println("\t\"drive\": {\"factor\": " + driveConversionFactor + "}");
    System.out.println("}");

MAX Swerve

"conversionFactors": {
    "angle": {"gearRatio": 46.42},
    "drive": {"gearRatio": 5.50, "diameter": 3}
}
"conversionFactors": {
    "angle": {"gearRatio": 46.42},
    "drive": {"gearRatio": 5.08, "diameter": 3}
}
"conversionFactors": {
    "angle": {"gearRatio": 46.42},
    "drive": {"gearRatio": 4.71, "diameter": 3}
}

Swerve Drive Specialties (SDS)

"conversionFactors": {
	"angle": {"gearRatio": 21.4285714286},
	"drive": {"gearRatio": 8.14, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 21.4285714286},
	"drive": {"gearRatio": 6.75, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 21.4285714286},
	"drive": {"gearRatio": 6.12, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 12.8},
	"drive": {"gearRatio": 8.14, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 12.8},
	"drive": {"gearRatio": 6.75, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 12.8},
	"drive": {"gearRatio": 6.12, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 12.8},
	"drive": {"gearRatio": 5.14, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 18.75},
	"drive": {"gearRatio": 7.13, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 18.75},
	"drive": {"gearRatio": 5.9, "diameter": 4}
}
"conversionFactors": {
	"angle": {"gearRatio": 18.75},
	"drive": {"gearRatio": 5.36, "diameter": 4}
}

Thrifty Swerve

The following example is for 18T Output Gear, and 12T pinion gear with a 3in wheel controlled by NEOs. Please refer to the chart above for your configuration.

The steering motor gear ratio is 25:1

"conversionFactors": {
	"angle": {"gearRatio": 25},
	"drive": {"gearRatio": 15, "diameter": 3}
}

The following example is for 16T Output Gear, and 12T pinion gear with a 3in wheel controlled by NEOs. Please refer to the chart above for your configuration.

The steering motor gear ratio is 25:1

"conversionFactors": {
	"angle": {"gearRatio": 25},
	"drive": {"gearRatio": 16.9, "diameter": 3}
}

Plummer Industries

"conversionFactors": {
	"angle": {"gearRatio": 28},
	"drive": {"gearRatio": 4, "diameter": 2.5}
}
"conversionFactors": {
	"angle": {"gearRatio": 28},
	"drive": {"gearRatio": 3.25, "diameter": 2.5}
}
"conversionFactors": {
	"angle": {"gearRatio": 28},
	"drive": {"gearRatio": 4, "diameter": 2.5}
}
"conversionFactors": {
	"angle": {"gearRatio": 28},
	"drive": {"gearRatio": 3.25, "diameter": 2.5}
}

PreviousCode SetupNextHow to tune PIDF

Last updated 4 months ago

Was this helpful?

Thrifty Swerve Gear Ratio Table
Thrifty Swerve Gear Ratio Table