52 Config(std::optional<ramp_rate_t> rampRate,
53 std::optional<units::volt_t> stepVoltage,
54 std::optional<units::second_t> timeout,
75 std::function<void(units::volt_t)>
m_drive;
184 m_mechanism(mechanism),
185 m_recordState(config.m_recordState ? config.m_recordState
196 units::volt_t m_outputVolts{0};
A wrapper around std::unique_ptr<Command> so commands have move-only semantics.
Definition: CommandPtr.h:29
A robot subsystem.
Definition: Subsystem.h:43
Hardware-independent configuration for a SysId test routine.
Definition: SysIdRoutine.h:24
std::function< void(frc::sysid::State)> m_recordState
Optional handle for recording test state in a third-party logging solution.
Definition: SysIdRoutine.h:37
ramp_rate_t m_rampRate
The voltage ramp rate used for quasistatic test routines.
Definition: SysIdRoutine.h:27
units::second_t m_timeout
Safety timeout for the test routine commands.
Definition: SysIdRoutine.h:33
Config(std::optional< ramp_rate_t > rampRate, std::optional< units::volt_t > stepVoltage, std::optional< units::second_t > timeout, std::optional< std::function< void(frc::sysid::State)> > recordState)
Create a new configuration for a SysId test routine.
Definition: SysIdRoutine.h:52
units::volt_t m_stepVoltage
The step voltage output used for dynamic test routines.
Definition: SysIdRoutine.h:30
Definition: SysIdRoutine.h:71
std::function< void(frc::sysid::SysIdRoutineLog *)> m_log
Returns measured data (voltages, positions, velocities) of the mechanism motors during test routines.
Definition: SysIdRoutine.h:79
std::string m_name
The name of the mechanism being tested.
Definition: SysIdRoutine.h:87
Mechanism(std::function< void(units::volt_t)> drive, std::function< void(frc::sysid::SysIdRoutineLog *)> log, frc2::Subsystem *subsystem)
Create a new mechanism specification for a SysId routine.
Definition: SysIdRoutine.h:133
std::function< void(units::volt_t)> m_drive
Sends the SysId-specified drive signal to the mechanism motors during test routines.
Definition: SysIdRoutine.h:75
frc2::Subsystem * m_subsystem
The subsystem containing the motor(s) that is (or are) being characterized.
Definition: SysIdRoutine.h:83
Mechanism(std::function< void(units::volt_t)> drive, std::function< void(frc::sysid::SysIdRoutineLog *)> log, frc2::Subsystem *subsystem, std::string_view name)
Create a new mechanism specification for a SysId routine.
Definition: SysIdRoutine.h:108
A SysId characterization routine for a single mechanism.
Definition: SysIdRoutine.h:173
SysIdRoutine(Config config, Mechanism mechanism)
Create a new SysId characterization routine.
Definition: SysIdRoutine.h:181
frc2::CommandPtr Quasistatic(Direction direction)
frc2::CommandPtr Dynamic(Direction direction)
A timer class.
Definition: Timer.h:36
Utility for logging data from a SysId test routine.
Definition: SysIdRoutineLog.h:43
void RecordState(State state)
Records the current state of the SysId test routine.
SysIdRoutineLog(std::string_view logName)
Create a new logging utility for a SysId test routine.
constexpr underlying_type value() const noexcept
unit value
Definition: base.h:2107
basic_string_view< char > string_view
Definition: core.h:501
dimensionless::scalar_t log(const ScalarUnit x) noexcept
Compute natural logarithm.
Definition: math.h:349
typename units::detail::compound_impl< U, Us... >::type compound_unit
Represents a unit type made up from other units.
Definition: base.h:1434
state
Definition: core.h:2271
Definition: SysIdRoutine.h:18
Direction
Motor direction for a SysId test.
Definition: SysIdRoutine.h:145
@ kReverse
Reverse.
Definition: SysIdRoutine.h:149
@ kForward
Forward.
Definition: SysIdRoutine.h:147
State
Possible state of a SysId routine.
Definition: SysIdRoutineLog.h:25
Definition: AprilTagPoseEstimator.h:15