Creating your first configuration

DevilBotz 2876 Swerve Bring-Up Checklist

Compliments of the DevilBotz 2876arrow-up-right!

Updated: 2024-01-24

Printable version

Resources

Swerve Orientation Diagram

circle-exclamation

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 meters

  2. Determine the reported internal encoder resolution

    • 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.

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

  4. Calculate the drive/angle conversion factors

    • 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)

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

Drive

1

Angle

N/A

1

Step 3: Electrical Characteristics

circle-exclamation
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)

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. 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 Orientation Diagram).

  3. Measure the absolute encoder value for each module (the offset is the negative of the value reported)

Module
Angle Absolute Offset

(rotations 0-1)

(degrees 0-360)

Front Left (FL)

Front Right (FR)

Back Left (BL)

Back Right (BR)

Step 5: Input data into the configuration webpage

Open the webpage and import your data into the config files. https://broncbotz3481.github.io/YAGSL-Example/arrow-up-right

https://github.com/Flint221/YAGSL-gitbook-fork-flint221/blob/main/bringing-up-swerve/broken-reference/README.mdchevron-right

Last updated