Our team is programming a swerve drive. Each module contains a Falcon 500 (driving) and a Neo 775 (rotation). When we try to characterize it using Sysid, the error “Error -3 CTR: CAN frame not received/too-stale.” is displayed on Driver Station and nothing runs. We wrote and deployed our own drive code and it worked, so we believe that this is a Sysid problem.
If we can’t fix this problem soon, is there a way we can write our own characterization code from scratch?
We tried those changes and it said that something was wrong with the configuration of the robot, so our original NavX config is correct.
It seems like the System Identification program is running, but the motors won’t. It said the left and right sides moved 0 units.
Interesting… At this point I’ve extended beyond my area of expertise so I’d defer to one of the WPILib experts (calcmogul and Oblarg are good guys to ask about SysId). My only suggestion is just to keep checking your code and making sure all the configuration is the same and that you enable in autonomous mode.
Some teams on the FRC Discord have done this in Java, but the results have been mixed; Java isn’t a good language for deterministic data sampling due to garbage collection being uncontrollable.
WPILib is looking into using CAN streaming and DMA for 2024 to get more consistent data sampling in Java because it would let teams do system ID in their actual robot code and let us remove the buggy and error-prone project generation code from SysId.
With Java data collection, Kᵥ tends to be fine, but nondeterministic sampling causes Kₐ to usually be off by a factor of two or more. frc-characterization’s Java data collection had the same issue, which is why SysId (frc-characterization’s replacement) used a C++ robot program with real-time thread priority for data collection instead.
That came with drawbacks though like not being able to sample data in teams’s actual robot code, and random connection issues and CAN timeouts that we’ve never been able to troubleshoot (none of the SysId devs have actual hardware to use for testing).
I’ve faced this same issue on CTRE in robot code, haven’t tried SysID recently. Opening up Phoenix Tuner and starting the diagnostic server manually seems to make the issue go away as a workaround.