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
  • DevilBotz 2876 Swerve Bring-Up Checklist
  • Printable version
  • Resources
  • Swerve Orientation Diagram
  • Step 1: Module Types
  • Step 2: Build Specific Details
  • Step 3: Electrical Characteristics
  • Step 4: Absolute Encoder Offsets
  • Step 5: Input data into the configuration webpage

Was this helpful?

Edit on GitHub
  1. Bringing up swerve

Creating your first configuration

PreviousCheck your motorsNextGetting to know your robot

Last updated 3 months ago

Was this helpful?

DevilBotz 2876 Swerve Bring-Up Checklist

Compliments of the !

Updated: 2024-02-03

Printable version

Resources

  • -

  • -

    • for configuring Spark Max Motor Controllers and other Rev devices

  • -

    • for configuring CanCoders and other CTR devices

Swerve Orientation Diagram

Note: When viewed from the top, make sure the sides of the wheel with the bevel gear are pointing to the left

Step 1: Module Types

Model, Version, Etc

Motor

Controller

Absolute Encoder

IMU

Step 2: Build Specific Details

  1. Measure the module center relative to the robot center

Module
X "Front" (Inches)
Y "Left" (Inches)

Front Left (FL)

+

+

Front Right (FR)

+

-

Back Left (BL)

-

+

Back Right (BR)

-

-

  1. Measure the wheel diameter in inches

    • Note: Most encoders now normalize the reported values to -1 to 1, so the Encoder Resolution when computing the conversion factors should generally be “1”. Only known exception is the TalonSRX.

  2. Find the drive/angle gear ratio from the swerve module manufacturer specs

  3. (Optional) Calculate the

    • Drive Motor Conversion Factor (meters/rotation) = (PI * WHEEL DIAMETER IN METERS) / (GEAR RATIO * ENCODER RESOLUTION)

    • Angle Motor Conversion Factor (degrees/rotation) = 360 / (GEAR RATIO * ENCODER RESOLUTION)

Motor
Wheel Diameter (meters)
Gear Ratio
Encoder Resolution (CPR)
Conversion Factor

Drive

1

Angle

N/A

1

Step 3: Electrical Characteristics

  1. Set/Verify the CAN IDs for each module

Note: Update the FW for each module and reset any stored settings to factory defaults

Module
Motor CAN IDs
Motor CAN IDs
Encoder CAN/Channel ID

Drive

Angle

Absolute Encoder

Front Left (FL)

Front Right (FR)

Back Left (BL)

Back Right (BR)

  1. Check Inversion

    1. Rotate the drive wheel CCW (moving “forward”)

      • The built-in encoder value should increase. If not, invert the drive motor.

    2. Rotate the angle wheel CCW (when viewed from the top)

      • The built-in encoder value should increase. If not, invert the angle motor.

      • The absolute encoder value should increase. If not, invert the absolute encoder.

    3. Rotate the entire robot CCW. The gyro angle (yaw) should increase. If not, invert the IMU

Note: If you are using the hardware utilities for accessing the motors controllers and/or absolute encoders, the RoboRio must not be active on the CAN bus. The most reliable way to disable the RoboRio, without affecting the CAN BUS termination, is to temporarily disconnect it from power by pulling the 10A fuse on the Power Distribution Panel (PDP) feeding the RoboRio and then power cycle the robot.

Module
Inverted?

Drive

Angle

Absolute Encoder

IMU

Front Left (FL)

Front Right (FR)

Back Left (BL)

Back Right (BR)

Step 4: Absolute Encoder Offsets

  1. Turn Robot On (Disabled so the wheels can be turned manually)

  2. Measure the absolute encoder value for each module

Module
Angle Absolute Offset (degrees)

Front Left (FL)

Front Right (FR)

Back Left (BL)

Back Right (BR)

Step 5: Input data into the configuration webpage

Manually Turn All 4 wheels so that they are all pointing forward and forward rotation results in increasing drive encoder values (see the black arrows in ).

Open the webpage and import your data into the config files.

https://broncbotz3481.github.io/YAGSL-Example/
https://github.com/thenetworkgrinch/YAGSL-gitbook/blob/main/bringing-up-swerve/broken-reference/README.md
Orientation Diagram
DevilBotz 2876
YAGSL Wiki
https://yagsl.gitbook.io/yagsl/
REV Robotics Hardware Client
https://docs.revrobotics.com/rev-hardware-client/
Phoenix Tuner X
https://v6.docs.ctr-electronics.com/en/stable/docs/tuner/index.html
149KB
2024-02-03 DevilBotz 2876 Swerve Bring-Up Checklist.pdf
pdf