Why wont our swerve drive get aline properly

I dont know how to show code but everything else works except our wheels and now they wont aline properly half work half dont and then they all break

https://photos.app.goo.gl/tqqzA2Mre7X2qBNr9 video of robot

Swerve modules are very complex components with many failure modes. You’ll need to provide very detailed descriptions of what behaviors you’re observing, as well as how your robot is set up.

You can put code on GitHub for easy sharing.

A picture (or video) is worth a thousand words

4 Likes

Make sure you zero your modules

2 Likes

Did you super-glue the magnet in place for the absolute encoder?

3 Likes

Yes we have super glued them in place

Here is the robot code i will have a video shortly

I have zerod them before and have done it multiple times

video of robot https://photos.app.goo.gl/tqqzA2Mre7X2qBNr9

Your locations seem very off. You robot is rectangular yet you have a polygon drive base defined in your config files.

Also did you zero with all of the bevels facing LEFT?

Also this is not right

You can find the correct ones here.

image
i have my variables here and i pretty sure i need to use absolute encoder offset and i dont know why it is 1.000

Please update to the latest version, i published 2024.7.0.0 a little over a week ago.

i have updated it and im getting the same results as before.

And for our conversion factor with the link you gave me we have our absolute encoders they are chained with our sparkmaxs and would we follow the example for the conversion factors it list in the beginning

What absolute encoders are you using? Your configs say cancoder but cancoder’s can’t connect directly to SparkMAX’s

I think cancoders but the robot has successfully worked flawlessly before until i updated our library

But last year our 2 seniors who knew everything have gone to collage and i joined in their last year

What swerve modules are you using, with what gearing?
What drive motor controllers are you using?
What absolute encoders are you using?
What gyro are you using?

You know I created YAGSL right? Everything you need to know is at Welcome to Yet Another Swerve Document | YAGSL

i would highly reccommend reading through all of it, however if you dont be sure to read

and create your configuration with this site which is linked in the docs.
https://broncbotz3481.github.io/YAGSL-Example/

and there’s pretty much always someone able to help at the discord which is also linked in the docs.

You NEED to understand how to configure a swerve drive and currently your config is very VERY broken and i can’t see your updates bc you haven’t pushed them to github. If you give us all of the info we can help you create your config.

If you dont know what any of the parts ask ASK I promise you someone on your team knows! (These are very expensive parts that get replaced often between seasons)

1 Like

Mod note: Edited image to remove possible identifying information.

First line (partially obscured) reads “Sds mk 4i”

Your buddy’s numbers are a bit ambiguous:

From MK4i Swerve Module – Swerve Drive Specialties :

Your assertion is the steer ratio is 21:1, but the manufacturer says its closer to 21.4275:1 . This does matter for the issues you are describing.

Same thing goes for the drive ratio - there’s two possibilities of what starts with a 6.

I think it’s a useful illustration of some of the conversation struggles so far in this thread.

Here’s the real crux that I think you need to internalize: It’s important to give the right information to people trying to help. This can be hard if you don’t currently know what is important.

So here’s the rule of thumb: If you don’t know how much detail you need to provide, assume you didn’t provide enough.

This implies two things to me:

First: Give more details. More than you think anyone needs. Links to product pages are great. List out your assumptions in your head. Lay out our logic, what you know for sure works (and why you think it works), what you aren’t sure about, what you know for sure you need answered.

Laying out your thoughts in an organized fashion has a secondary benefit: it forces you to review your own assumptions. Often, you’ll find something that you missed yourself, and can correct it without waiting for an answer from another person.

Second: assume you’ll miss something. Expect someone will ask for additional details. Many times over.

Missing a piece of info isn’t a reflection on you personally - it’s a reflection on the fact you’re still learning what is and isn’t important. It’s a curve we all have to go through, and a curve you see people progressing through very frequently on this site, due to how many students here there are.

But the thing to emphasize: The easiest way to stop progressing through this curve is to get frustrated, and expect someone else to do the analysis for you. This is the mentality to reject with vigor - don’t let yourself fall into the “well, I couldn’t possibly figure this out, I give up, I’ll wait for someone else to fix it”.

4 Likes