Class SysIdRoutineLog

java.lang.Object
edu.wpi.first.wpilibj.sysid.SysIdRoutineLog
Direct Known Subclasses:
SysIdRoutine

public class SysIdRoutineLog
extends Object
Utility for logging data from a SysId test routine. Each complete routine (quasistatic and dynamic, forward and reverse) should have its own SysIdRoutineLog instance, with a unique log name.
  • Constructor Details

    • SysIdRoutineLog

      public SysIdRoutineLog​(String logName)
      Create a new logging utility for a SysId test routine.
      Parameters:
      logName - The name for the test routine in the log. Should be unique between complete test routines (quasistatic and dynamic, forward and reverse). The current state of this test (e.g. "quasistatic-forward") will appear in WPILog under the "sysid-test-state-logName" entry.
  • Method Details

    • motor

      public SysIdRoutineLog.MotorLog motor​(String motorName)
      Log data from a motor during a SysId routine.
      Parameters:
      motorName - The name of the motor.
      Returns:
      Handle with chainable callbacks to log individual data fields.
    • recordState

      public void recordState​(SysIdRoutineLog.State state)
      Records the current state of the SysId test routine. Should be called once per iteration during tests with the type of the current test, and once upon test end with state `none`.
      Parameters:
      state - The current state of the SysId test routine.