When to invert?

Swerve Modules and Swerve Drives require some inversions to get working properly. The goal is to get everything to increase counter clockwise positive!

circle-exclamation
circle-exclamation

Swerve Motors

When you spin your motor counterclockwise the value in Shuffleboard/NetworkTables Module[...] Raw Absolute Encoder and Module[...] Raw Angle Encoder should both increase.

How to open Shuffleboard

  1. Open shuffleboard.

<figure><img src="../.gitbook/assets/shuffleboard_open_tab.png" alt=""><figcaption><p>Open network tables</p></figcaption></figure>
<figure><img src="../.gitbook/assets/shuffleboard_read_vals.png" alt=""><figcaption></figcaption></figure>
  1. Take note of the Module[...] Raw Absolute Encoder value's and use them for absoluteEncoderOffset in the module JSONs.

Spin your module counterclockwise

triangle-exclamation
Purple shows the way your bevels should be facing (photo by Team 2876)

The swerve drive should be on it's side or otherwise lifted. Your swerve module bevels must be facing the left like shown. To rotate the swerve modules they must be rotated counterclockwise like shown.

If the Module[...] Raw Angle Encoder is decreasing...

Invert your angle motor for every module that is decreasing!

If the Module[...] Raw Absolute Encoder is decreasing...

Invert the absolute encoder in the module JSON with absoluteEncoderInverted as shown here.

Spin your wheel counterclockwise

circle-exclamation

If the Module[...] Raw Drive Encoder is decreasing...

Invert your drive motor for every module that is decreasing!

Rotate your robot counterclockwise

triangle-exclamation
ID's relocated in swerve module files

You should notice the Raw IMU Yaw field in Shuffleboard increase. If it doesn't you need to invert your IMU like this.

Last updated