YAGSL 2025 Simulation Issues

Happy Build Season y’all!

So I’m updating our code to 2025 and I’m having issues running a simulation. I’ve installed all of the YAGSL dependencies, but I get the following stack trace when I try to run a simulation:

Error at swervelib.SwerveDrive.lambda$new$0(SwerveDrive.java:203): Unhandled exception instantiating robot swervelib.SwerveDrive java.lang.NoSuchMethodError: 'void org.ironmaple.simulation.drivesims.SwerveModuleSimulation.<init>(edu.wpi.first.math.system.plant.DCMotor, edu.wpi.first.math.system.plant.DCMotor, double, double, edu.wpi.first.units.measure.Voltage, edu.wpi.first.units.measure.Voltage, edu.wpi.first.units.measure.Distance, edu.wpi.first.units.measure.MomentOfInertia, double)'
        at swervelib.SwerveDrive.lambda$new$0(SwerveDrive.java:203)
        at org.ironmaple.simulation.drivesims.SwerveDriveSimulation.lambda$new$0(SwerveDriveSimulation.java:89)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575)
        at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
        at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
        at org.ironmaple.simulation.drivesims.SwerveDriveSimulation.<init>(SwerveDriveSimulation.java:90)
        at swervelib.SwerveDrive.<init>(SwerveDrive.java:206)
        at swervelib.parser.SwerveParser.createSwerveDrive(SwerveParser.java:168)
        at swervelib.parser.SwerveParser.createSwerveDrive(SwerveParser.java:115)
        at frc.robot.subsystems.SwerveSubsystem.<init>(SwerveSubsystem.java:34)
        at frc.robot.RobotContainer.<init>(RobotContainer.java:28)
        at frc.robot.Robot.<init>(Robot.java:18)
        at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:370)
        at edu.wpi.first.wpilibj.RobotBase.lambda$startRobot$1(RobotBase.java:490)
        at java.base/java.lang.Thread.run(Thread.java:840)

I can share our code if need be but it kinda looks like a MapleSim issue? I’m not sure, I’ve never used MapleSim before, I just installed it because YAGSL told me to, lol. Just curious if y’all are running into the same issues and if you know how to fix it. Thanks a ton! :slight_smile:

EDIT: I should clairify that I don’t actually know that it’s a simulation issue as I haven’t had a chance to deploy it to the real bot yet, but it kinda looks like a simulation thing.

YAGSL 2025 is not yet released. We only have a working version for wpilib beta-3. If you want to use sim try the YAGSL-Example which has a known working vendordep with dependencies

Ah, I see! I just saw “2025” in the vendor dep list and thought I was good to go. My bad!
image

1 Like

I had that error too. If you go back one revision on MapleSim (I think it was 0.3.29 to 0.3.28, going off memory), it will actually fix the error and you can simulate.

There are some other issues with YAGSL, like the SparkMax/SparkFlex can’t do PID mode because YAGSL was using an older API, and it crashes the code. (We found this on our kitbot yesterday)

We are just too early still, and need to be patient (I agree it’s tough).

PS, it’s fun to drive the 2025 kitbot on the 2024 maplesim simulated field (using AdvantageScope’s 3d field viewer set to 2025), you randomly crash into the stage near the reef, and if you try to hit the algae/coral stack on red, it won’t let you because the field dimensions changes.

Edit2: I vaguely remember having to back in revisions on one or two other vendor dependencies, see where the error comes up, go back a little or to the beta versions, and it will work.

1 Like

That was an oops on our end, we merged it without fully checking it was ready to go. It’s been reverted so should no longer appear in that list. Sorry for the confusion!

2 Likes