Pigeon makes CAN cut out and Swerve stop working

Added pigeon to swerve drive (SDS MK4I running on WPI). We also have a Navx on it, and the code works with the Navx. However, changing nothing else and only switching to WPI_Pigeon2 instead of AHRS, swerve modules go to weird angles and seem to think they’re correct (they’re using CANcoders and Talonfxs). Additionally, occasionally CAN will cut out on some deploys, with all devices saying they have stale frames.
Code: https://github.com/Team4028/wpiScratchSwerve
Edit: Pigeon 2 connected to CANbus and powered with 12v 500mA vrm.

A) check your gyro angle, and see what it tells you.
B) try using get Yaw, and creating a rotation2d from that. Then using that for swerve.

What is the CAN Bus utilization? If you aren’t using CAN FD it’s possible the Pigeon put you over the edge. 4 CANcoders and 8 TalonFXs are already quite a bit.

1 Like

It’s possible that it’s coincidental that you noticed these symptoms after switching out the navx for a Pigeon 2.0.

This symptom…

… sounds like this issue:

And this…

…sounds like it may be related to this, which is still an issue any time you see a “Kill -9” message when deploying new code:

Yes, it is probably coincidence. At the time I posted the error was only happening with the pigeon, however now it happens with both gyros. I am still working to diagnose the root cause, but it may have to do with CAN bandwidth or the issue you linked.

The team I’m on ran into a can utilization issue. If it is a CAN utilization issue you should see can connection dropping momentarily while you run the motors. For example, If you were running a Talon SRX forward (green led) you would see an irregular times solid orange led (waiting for command once enabled). Hope this helps!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.