Yagsl swerve drive problem

today we tried our swerve code for the first time (mk4i L2, vortex’s, pigeon2, cancoders) we are using yagsl example code with the configurationchanged for our robot and changed the default command to the driveFieldOrientedAnglularVelocity

when we enable the swerve wheels just drive in full speed without us touching the controller

the angle motors also freaked out. when I lowered their pid it was slower but still moved without us touching the controller

please help

our code: https://github.com/ori-coval/1954-swerve-copy

Absolutely sounds like something is inverted somewhere and running away from the setpoint, thus never getting there.

we didn’t have time to check inverts and will check that next time
i also guessed it is the problem but I want to check because we have very limited work time(1 time a week for 4 hours)

I guess my bigger question is why would it try to move without us touching the controller

1 Like

This is where seeing the setpoint, commanded value and actual value really helps. Even if those values are just being printed out the the dashboard.

Debugging blind-ish sucks.

As far as the moving without a controller input, you may be initializing to a setpoint, the motors move slightly in the wrong direction in an attempt to reach it, and then it’s a run-away train the wrong way down the tracks.

you can also use advantage scope , me and my stunning team (4586) have been working recently a lot on Telemetry in swerve and Advantage scope really helps from we can tell.

2 Likes