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 Physical Properties (modules/physicalproperties.json)
  • Fields
  • Example Configuration File

Was this helpful?

Edit on GitHub
  1. Configuring YAGSL
  2. Configuration

Physical Properties Configuration

PreviousSwerve Drive ConfigurationNextPIDF Properties Configuration

Last updated 3 months ago

Was this helpful?

Swerve Module Physical Properties (modules/physicalproperties.json)

This JSON configures the physical properties shared with all the Swerve Modules. It maps 1:1 with which creates .

Use the Standard Conversion Factors page to set the conversion factors for your robot if you're using a COTS swerve module!

Fields

Name
Units
Required
Description

conversionFactors

Y

Conversion factor composition. Factor is calculated on startup.

optimalVoltage

Voltage

Y

Optimal voltage to compensate to and base feedforward calculations off of.

currentLimit

N

The current limit in AMPs to apply to the motors. Stator limit for SparkMAXs, Supply limit for TalonFXs.

rampRate

N

The minimum number of seconds to take for the motor to go from 0 to full throttle.

friction

N

The minimum voltage to move the wheel or module. Defaults to 0.2 for drive motors, and 0.3 for angle motors.

robotMass

Lb (Pounds)

N

Default is 50kgs.

steerRotationalInertia

KilogramMetersSquare

N

The rotational inertia in KilogramMetersSquare . Defaults to 0.03.

wheelGripCoefficientOfFriction

Coefficient of Friction on Carpet

N

The grip tape coefficient of friction on carpet. Used to calculate the practical maximum acceleration.

MotorConfig

Name
Units
Required
Description

drive

Number

Y

Drive motor value.

angle

Number

Y

Angle motor value.

Conversion Factor Composition

Name
Units
Required
Description

drive

Y

Drive conversion factor composition

angle

Y

Angle conversion factor composition

Drive Conversion Factor Composition

Name
Units
Required
Description

diameter

Inches

Y

Diameter of the wheel.

gearRatio

Number

Y

Gear ratio of the drive motor to wheel.

factor

Number

N

Pre-calculated conversion factor.

Angle Conversion Factor Composition

Name
Units
Required
Description

gearRatio

Number

Y

Gear ratio of the angle/steering/azimuth motor to wheel.

factor

Number

N

Pre-calculated conversion factor.

Example Configuration File

{
  : {
	"angle": {"gearRatio": 28.125},
	"drive": {"diameter": 4, "gearRatio": 6.75}
  },
  "currentLimit": {
    "drive": 40,
    "angle": 20
  },
  "rampRate": {
    "drive": 0.25,
    "angle": 0.25
  },
  "wheelGripCoefficientOfFriction": 1.19,
  "optimalVoltage": 12
}

More info .

PhysicalPropertiesJson
SwerveModulePhysicalCharacteristics
Conversion Factor Composition
MotorConfig
MotorConfig
Drive Composition
Angle Composition
MotorConfig
here