I know some vendors have released their 2025 libraries, and some are still working on it. I expect YAGSL has to wait until they are all out for release. Is there an ETA? Will there be a delay from the vendor libraries all being out and YAGSL 2025 being released? Thanks!
We hope for all vendors to be updated in a week
Will YAGSL be made available through the new vendor dependency importing tool in WPILIB VS code?
Absolutely! We just have to wait on our depdencies.
We are using yagsl beta 2025.1.3 and everything is working great except for the drive wheel velocity. They are moving too slow and by a factor of 12.17 (pretty close to inches to feet). Is this a bug in beta or is it there a mistake in our conversions?
Yes, that was fixed in versions above 2025.1.3 if you’re seeing this
Thank you! That fixed the ratio error but we are still having trouble accelerating. When we hold the velocity constant the modules are smooth but when the commanded velocity changes, they jitter.
That would be tuning i think
We have the same issue. Everything else seems to work great except drive. What PID values do you recommend trying? We use MK4i L2 with Neos
The feedforward in YAGSL now has a Ka term for acceleration calculated using coefficient of friction. You will definitely see spikes when changing velocity when robot is off the ground. See how it behaves when on the ground. PID tuning should also be done on the ground. That was probably less of an issue in 2024.
I don’t think much testing has been done with the new feedforward since the velocity term was fixed. I hope to do that by Monday on our chassis. @nstrike @FRC8513
Thank you for the information. We did end up putting it in the ground and drove better when translating, but rotation was jittery and very difficult to control. I also ran into an issue where after I rotated the robot 180 degrees, the swerve modules got confused and started driving in different directions.
Is this only an issue with Neos? Or have teams reported issues with the Vortex or Kraken motors?
We experience the exact same thing. Did you guys found a solution for this? or was it plain tuning
thanks
Same with Vortex. I think it’s a change for all motors. I’ll have to check
I should be able to do some testing tomorrow and I’ll report back then if I find any suggested changes. I haven’t seen issues with the angle motors. It’s the drive feedforward I’m looking into.
Thank you! Yes angle control works perfect, hopefully this drive issue can be figured out soon
So @nstrike pointed me to the YAGSL functions to change the drive motor feedforward. You can use that to replace the default feedforward which tries to calculate kA based on a max acceleration and coefficient of friction.
The SwerveDrive class has a replaceSwerveModuleFeedforward(
) that takes kS, kV, kA. In YAGSL-Example the SwerveSubsystem has a wrapper of the same name. If you want to get the 2024 behavior with just kV, you can calculate kV as nominal voltage (typically 12) / speed at nominal voltage. For example you should add this code after creating swerveDrive,
replaceSwerveModuleFeedforward(0.0, 12.0 / Constants.MAX_SPEED, 0.0);
You can use swerveDrive.swerveDriveConfiguration.physicalCharacteristics.optimalVoltage
to use voltage from the config json instead of a hard coded number. Only use MAX_SPEED if that is set to the true speed at 12V. This simple approach will probably be good enough for a lot of teams. We had great performance in our off season project with just this and the P of PID. To test this you should set PID=0 and run the drive at a couple constant speeds. The measured should be close to the desired. Then tune P to improve the response.
If you are going to use sysId to get the motor parameters, you would use this same method and put the measure kS, kV, kA values in. @oshriNoN
If you’re not familiar with motor feedforward parameters, this has a good explanation.
Introduction to DC Motor Feedforward — FIRST Robotics Competition documentation
That already worked amazing! The drive motors are no longer jittery and are driving great.
I am still having one issue. We use a Navx2 micro for our gyro. Whenever we rotate the robot past 180 degrees, the swerve modules lose track of the heading and point in different directions while jittering.