(JAVA) CANCoders not cancodering

So recently the team and I have discovered an issue with our CanCoders that we have on our swervedrive modules.

So our CanCoders are not booting entirely to its absolute value, and instead boots so that where the current wheels are all facing is its forwards, although being directly set in code to absolute value, although being directly set in code to head to absolute position on boot.

The rest of our robot works, and the robot itself can drive after manually setting all the wheels to 0.

You can find our configuration at the bottom of RevSwerveConfig, and our offsets are at RevSwerveConstants.

Github

Sorry if I didn’t supply everything, this is my first year setting up Swerve, and I’ve been having issue after issue.



By the way, our swerve drive currently runs off 2 cansparkmax and a cancoder per module.

Where do you send the CanCoderConfiguration to the CanCoders (i.e. by calling configAllSettings)?

so we set the config in the RevSwerveModule.java under the configEncoders() function, then apply the the offset further down with the function resetToAbsolute().

I currently updated all the code to v6 under a different branch called “cancoderv6”

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.