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
  • Swerve Module PID Configuration (modules/pidfpropreties.json)
  • Fields
  • Example Configuration File

Was this helpful?

Edit on GitHub
  1. Configuring YAGSL
  2. Configuration

PIDF Properties Configuration

PreviousPhysical Properties ConfigurationNextPIDF

Last updated 4 months ago

Was this helpful?

Swerve Module PID Configuration (modules/pidfpropreties.json)

This file configures the PIDF values with integral zone and maximum output of the drive and motor modules for every swerve module. It maps 1:1 to and is used while initializing the object.

TalonFX/Kraken/Falcon angle motors require a high PID (around ~50 kP, and ~0.32 kD).

Fields

Name
Units
Required
Description

drive

Y

The configuration which will be used for the PIDF on the drive motor.

angle

Y

The configuration which will be used for the PIDF on the angle motor.

Example Configuration File

{
  "drive": {
    "p": 0.0020645,
    "i": 0,
    "d": 0,
    "f": 0,
    "iz": 0
  },
  "angle": {
    ,
    "i": 0,
    ,
    "f": 0,
    "iz": 0
  }
}

How to tune PIDF

PIDFPropertiesJson
SwerveDriveConfiguration
PIDF with Integral Zone and Output limit
PIDF with Integral Zone and Output limit