35 const std::array<double, 2>& measurementStdDevs = {0.0, 0.0});
48 units::kilogram_square_meter_t moi,
49 const std::array<double, 2>& measurementStdDevs = {0.0, 0.0});
60 units::radians_per_second_t angularVelocity);
Holds the constants for a DC motor.
Definition: DCMotor.h:20
A plant defined using state-space notation.
Definition: LinearSystem.h:31
Represents a simulated DC motor mechanism.
Definition: DCMotorSim.h:19
units::ampere_t GetCurrentDraw() const override
Returns the DC motor current draw.
void SetInputVoltage(units::volt_t voltage)
Sets the input voltage for the DC motor.
DCMotorSim(const DCMotor &gearbox, double gearing, units::kilogram_square_meter_t moi, const std::array< double, 2 > &measurementStdDevs={0.0, 0.0})
Creates a simulated DC motor mechanism.
void SetState(units::radian_t angularPosition, units::radians_per_second_t angularVelocity)
Sets the state of the DC motor.
units::radians_per_second_t GetAngularVelocity() const
Returns the DC motor velocity.
units::radian_t GetAngularPosition() const
Returns the DC motor position.
DCMotorSim(const LinearSystem< 2, 1, 2 > &plant, const DCMotor &gearbox, double gearing, const std::array< double, 2 > &measurementStdDevs={0.0, 0.0})
Creates a simulated DC motor mechanism.
This class helps simulate linear systems.
Definition: LinearSystemSim.h:31
void SetState(const Vectord< States > &state)
Sets the system state.
Definition: LinearSystemSim.h:107
Definition: XboxControllerSim.h:13