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

Was this helpful?

Edit on GitHub
  1. Overview
  2. Our Features

Angular Velocity Compensation

PreviousModule Auto-synchronizationNextChangelog

Last updated 7 months ago

Was this helpful?

YAGSL utilizes a method pioneered by Jack-in-the-bot for angular velocity compensation. To enable this you would use SwerveDrive.setAngularVelocityCompensation(true, true, 0.1); where the first parameter is the enabled state in teleop, second is enabled in autonomous, and third is the coefficient to use.

When enabling for the first time if the skew is significantly worse try inverting the value.

  1. Tune by moving in a straight line while rotating.

    • Testing is best done with angular velocity controls on the right stick.

  2. Change the value until you are visually happy with the skew.

  3. Ensure your tune works with different translational and rotational magnitudes.

  4. If this reduces skew in teleop, it may improve auto.

Created by in PR

yapplejack
#231