The problem
We have a mecanum drive (with 1 Falcon 500 per wheel). We are using CAN this year. Every time we run the drivetrain the motors intermittently start and stop (See this video).
If you look closely, you can see that the indicator light seems to flash orange in between red flashes, which may indicate some sort of CAN issue according to this chart from CTRE. This is supported by the fact that we are getting a “CAN frame not received / too-stale” error.
At the same time another Falcon motor that we are using for our index system seems to work fine without any stopping (you can see the index spinning smoothly at the end of the video). Also, the motors that display the stopping behavior seem to change every time we disable and re-enable the robot.
What we’ve tried
-
Visually checked the can wiring (although not
-
Checked for and removed all prints, waits and delays
-
Reversing motor controller assignments to see if is a problem with motors
-
All motor controllers seem to be plugged in and receiving signal (we haven’t actually looked too closely at the motors while we run)
-
Switching to differential drive
We’re considering just redoing all the CAN wiring to see if that fixes things, but other than that, how could we solve this problem?
Our Code
-
Here is our github: NAHSRobotics-Team5667/FRC_2021
-
Drivetrain Subsystem: NAHSRobotics-Team5667/FRC_2021/blob/main/src/main/java/frc/robot/subsystems/DriveTrainSubsystem.java
-
Drivetrain Command: NAHSRobotics-Team5667/FRC_2021/blob/main/src/main/java/frc/robot/commands/DriveTrainCommand.java
Have you experienced anything like this? Where do you think the problem might lie?