Swerve spinning erratic after putting bot in Teleop mode with yagsl example code

Yeah i think you’re having problems with your connection to your pigeon or power to it.

Thanks. I have tug tested connections and it looks okay so far.
I do see consistent reading in AdvantageScope for Raw IMU Yaw also when I am pressing the forward button.

To tune your angle wheels follow this page and look at these videos.

1 Like

Thank you @Fletch1373 . I will comment out line 136 in yagsl_example/src/main/java/frc/robot/Robot.java at main · ambrish3281/yagsl_example and give it a try.

Right now, whenever I enable Teleop mode, I see all wheels moving for a few seconds until it stops. Not sure if it is related to above line of code. Will check it out by commenting it out.

Thanks a lot for all your prompt help and guidance! Team really appreciates it.

Thanks @nstrike . I will be doing this over the weekend and will let you know how it goes.
Appreciate all your help and guidance!

After changing canbus to rio below error is not seen anymore.

CAN frame not received/too-stale. Check the CAN bus wiring, CAN bus utilization, and power to the device.
from: pigeon 2 13 (“”) Status Signal AngularVelocityZWorld
at: Stack Trace not received for performance reasons.

But is that the right approach?

Thanks!

What error?

Sorry I was referencing to above error .

Is there any obvious affects from this?

I don’t see any visible difference so far.
But original problem remains the same.
There are two issues we are seeing.

  1. Everytime I enable the Robot in Driver Station, wheels spin for a few seconds and than stops.
  2. When I want to go forward in teleop with joystick, wheels are spinning in pretty much all the directions.

I am attaching both vidoes from the AdvantageScope which captures this behavior.

Any pointers/suggestions will be greatly appreciated!

Thanks a lot!

our latest code is at ambrish3281/yagsl_example

What modules are yiu using again? This can happen if you set the wring conversion factors or inversion states or if your magnets aren’t a good distance. MK4’s do not have the same conversion factors as MK4i’s

We are using MK4i

YAGS is “2025.2.0-beta2”, on Github
Should be 2025.1.3-1