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
  • Getting Started
  • Documentation
  • YAGSL Checklist
  • Module example configuration
  • Example pidfproperties.json
  • Example physicalproperties.json

Was this helpful?

Edit on GitHub
  1. Devices
  2. Motor Controllers

TalonFX

PreviousSparkFlexNextAbsolute Encoders

Last updated 1 year ago

Was this helpful?

Getting Started

The TalonFX is the motor controller used to control Kraken X60's and Falcon 500's

They are commonly used as drive motors since they can be more powerful and efficient than REV NEO's.

import com.ctre.phoenix6.hardware.TalonFX;
import com.ctre.phoenix6.controls.DutyCycleOut;

TalonFX motor = new TalonFX(10);
motor.setControl(new DutyCycleOut(1.0)); // 100% full speed positive.

Documentation

This device can be upgraded via CTRE Tuner X.

Pay close attention to the LED status code to help you debug this at any time. Remember that any settings changed in Tuner X for the Talon FX are overwritten on startup of YAGSL.

YAGSL Checklist

Module example configuration

The following example is one for a module configuration file, e.g. frontleft.json, frontright.json, backleft.json, and backright.json.

{
  "drive": {
    "type": ,
    "id": ,
    "canbus": 
  },
  "angle": {
    "type": ,
    "id": ,
    "canbus": 
  },
  "encoder": {
    "type": "cancoder",
    "id": 11,
    "canbus": null
  },
  "inverted": {
    "drive": ,
    "angle": 
  },
  "absoluteEncoderOffset": -18.281,
  "location": {
    "front": -12,
    "left": -12
  }
}

Example pidfproperties.json

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

Example physicalproperties.json

{
  "conversionFactor": {
    "drive": ,
    "angle": 
  },
  "currentLimit": {
    "drive": ,
    "angle": 
  },
  "rampRate": {
    "drive": ,
    "angle": 
  },
  "wheelGripCoefficientOfFriction": 1.19,
  "optimalVoltage": 12
}

If you are using Falcon 500 v2 (which are effectively discontinued) make sure that you apply the loctite fix described here!

https://content.vexrobotics.com/vexpro/Falcon/217-6515-753-Falcon500-V2-Upgrade.pdf
Kraken X60 Powered by TalonFXWestCoast Products
TalonFXPhoenix 6
Official Documentation source
Logo
Phoenix Tuner XPhoenix 6
Tuner X install and documentation
Logo
Logo