BaseFalconSwerve MK4i wheels go in all different directions

We are having an issue with SDS MK4i modules running the BaseFalconSwerve library. Though we’ve zeroed out the wheels many times, and they begin pointing in the right direction, they quickly become unaligned. When we disable the robot, the pods spin around the z axis a few times. We are unable to get the robot running and we compete this week. Any help would be greatly appreciated.

I think this thread will help you out. Swerve Modules Rotate Upon First Enable - #27 by Chris_Ely

And before that check this full thread. @dirtbikerxz has solutions in there. After restarting the Robot We need to re align the wheels at the start · Issue #8 · Team364/BaseFalconSwerve · GitHub

After making changes to our code, we can get it to go forwards, backwards, and to strife pretty good, but turning won’t work as well.
We have published our code to GitHub if anyone wants to help us.

1 Like

Hey there, I’m helping this team debug, any help would be appreciated.

We put the optimizeTurn method in place and we have the TimerDelay in place and our wheels upon teleop disable are spinning around. When we enable teleop again, the wheels spin back around. The robot does drive forward/backward and strafe, but it won’t turn, the wheels point to the corners of the bot instead of at a nice inward 45.

1 Like

Solved! In constants, we had to set the following:
angleMotorInvert = true
driveMotorInvert = true
canCoderInvert = false


Awesome, glad you were able to resolve this.

1 Like

Yes, thanks for your help @Akash_Rastogi!

Thank you all for your help!

I have the same issue where the right thumbstick is not rotating the chassis and instead the modules form and X pointing towards the middle of the chassis instead of forming an O allowing the chassis to rotate. We are using mk3 modules and NOT the MK4i. Our code basis is here:GitHub - github3658/BaseFalconServe

Where in the constants file did you add these lines? Can we see an example please and thank you.

So sorry, I posted our github repo, but just realized this code was for a team I was helping. They were using mk4i I believe.

I don’t have access to their repo.

The place where you may want to try a change is here:

You correctly have it set to pull from the MK3 chosen module config, but you could change those values if you had to.

I would first test to make sure when you give positive power, the motors turn in the positive direction though to ensure you don’t have an issue with motor inversion somewhere.

Our team also has MK3 pods. Our codebase is here if you’d like to take a look. Just so you know it’s a hodge podge of multiple libraries since we use falcons for drive and neos for turn:

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