We spent quite a bit of time last night fighting the sysid routine not logging the state every time. We identified the root cause as a stateInitialized variable not being initialized. We are using Python but the problem is ultimately in the C++ lib.
I wanted to provide a quick work around that we utilized to get this working without having to build WPILib ourselves.
The API lets your pass your own recordState function so we basically duplicated the C++ version in Python without the bug. Iām including the entire SysID code for robotpy.
We worked around this by logging to the Phoenix 6 signal logger as a backup. This also allowed us to use the hoot logs with CAN signals transmitted faster than 50 Hz.