So, we were testing our robot yesterday, and the swerve subsystem didn’t run. None of the sparkmaxes (except CAN ID 10) seem to show up on our Driver Station. It’s definitely a CAN fault, but we’ve checked, and CAN seems wired correctly. The status lights on the sparkmax are normal as well. We were wondering what the problem could be other than wiring?
Could the issue be something beyond the Sparkmaxes? Hypothetically if your loop broke after the Sparkmaxes it still wouldn’t work.
Are all the CAN lights flashing correctly?
What’s your swerve setup? CANivore, Pigeon, CANcoders?
The sparkmaxes are flashing correctly. Our swerve setup is different in that we don’t use CANivore, Pigeon or CANcoders. The CAN goes through the sparkmaxes, PDH, and Roborio only
Could you please be more specific? What colour are the sparkmaxes flashing?
Couple thoughts
-
Connect to the Hardware Client and see if the CAN devices are showing up there. While there can also make sure firmware is updated.
-
If the device is showing in the Driver Station, usually that is one with a fault. Does CAN ID 10 show a fault. It is often in the drivetrain I assume, but hopefully is the only one with that ID. Is the CAN wire fully seated for that Spark Max?
-
I’d go on to say being able to plug in fewer devices between RIO and termination until all are working, but I think it must be CAN device 10 causing trouble. One thing also we learned in lower CAN ID devices can be more impactful because of the higher priority.
Realising that I should put it in a bit more context, CAN ID 10 is one of the arm motors, and it does bridge the can connections of the swerve motors to the arm. We also just figured out that there was some power going through the metal tubing in that area near CAN 10.
UPDATE: We got it working ! Turns out the problem was that the CAN wires were very short and there wasn’t enough connections, and had to be replaced in order to function properly.