YAGSL 2025: A Leap Forward in Swerve Drive Control and Simulation!

Use the conversion factors from here instead of the simplified one you’re currently using. Also switch to driveFieldOrientedAngularVelocity

Your robot is doing that bc it thinks you are facing the wrong way. This is bc of robot relative control. If you turn your robot it will suddenly act how it’s supposed to

How would we account for the steering gear ratio difference between mk4i and mk4n? We’re planning on using 2 mk4n’s in the front of the robot and 2 mk4i’s in the back of the robot. We’re getting the 16 tooth gear kit to solve the drive speed difference, but we’re not sure how to solve the steering module difference. I’m just looking at the docs and our 2024 YAGSL information from last year, but that has all the steering gear ratios as the same number instead of being able to change that for each module. Here’s our Github if that helps. https://github.com/o-bots7160/2024-Robotics-Season

Edit: We’re planning on changing over to command-based this season if that also changes anything

I believe that I had removed support for this, but i can add it back next week.

Good news! I didn’t break support for this! To do this you can override with a conversionFactors field in the module JSON in the new format.

So I changed to AngularVelocity how ever I am have some issues with that as well. When I try to drive forward my max speed is super slow, and if I strafe around after I let go of the joystick it tends to drive the other way really quick, and if I try to rotate it works until I let go after rotating a lot then it will try to go the other way and will throw me off ~10-20 degrees were I wanted it to be.

When driving forward I noticed my dashboard was saying I am driving backwards.
image

I tried turning my robot around in DirectAngle and it still tries to spin out. Even while on blocks or the ground.

This is an issue that is going to be fixed in the latest version. We found it yesterday. This is fixed in 2025.1.3 or 2025.1.4.

You can tune your drive PID to compensate and infact you probably should tune your drive pid

Tl;dr I had used inches as meters for the drive feedforward.

1 Like

Is it possible to clone the example repository on the github, change the configs and start running 2025 official YAGSL? Or do we have to wait for the official vendor dep in WPILIB?

You can absolutely do that, however i would recommend that you clone the dev branch, delete swervelib folder then install using the url

Should I use the configuration tool in the docs? Just want to make sure I’m not having conflicting versions of the config generator and YAGSL.

Yes please! I regularly update the one in the docs

1 Like

We’re doing this in order to get the 2025 version. We cloned the repo and deleted the swerving folder, but where is the link that we’re supposed to download from? The one we found was in the example repository and was the 2025.1.2 release instead of the 2025.1.3 release that we saw on the changelog.

Wait until the official version is released which will be in Monday at the latest