35 const std::array<double, 2>& measurementStdDevs = {0.0, 0.0});
46 units::radians_per_second_t angularVelocity);
53 void SetAngle(units::radian_t angularPosition);
124 units::kilogram_square_meter_t
GetJ()
const;
129 units::kilogram_square_meter_t m_j;
Holds the constants for a DC motor.
Definition DCMotor.h:20
A plant defined using state-space notation.
Definition LinearSystem.h:35
Represents a simulated DC motor mechanism.
Definition DCMotorSim.h:21
units::newton_meter_t GetTorque() const
Returns the DC motor torque.
void SetAngularVelocity(units::radians_per_second_t angularVelocity)
Sets the DC motor's angular velocity.
void SetInputVoltage(units::volt_t voltage)
Sets the input voltage for the DC motor.
void SetState(units::radian_t angularPosition, units::radians_per_second_t angularVelocity)
Sets the state of the DC motor.
void SetAngle(units::radian_t angularPosition)
Sets the DC motor's angular position.
const DCMotor & GetGearbox() const
Returns the gearbox.
units::kilogram_square_meter_t GetJ() const
Returns the moment of inertia.
units::radians_per_second_squared_t GetAngularAcceleration() const
Returns the DC motor acceleration.
units::ampere_t GetCurrentDraw() const
Returns the DC motor current draw.
double GetGearing() const
Returns the gearing;.
DCMotorSim(const LinearSystem< 2, 1, 2 > &plant, const DCMotor &gearbox, const std::array< double, 2 > &measurementStdDevs={0.0, 0.0})
Creates a simulated DC motor mechanism.
units::radians_per_second_t GetAngularVelocity() const
Returns the DC motor velocity.
units::radian_t GetAngularPosition() const
Returns the DC motor position.
units::volt_t GetInputVoltage() const
Gets the input voltage for the DC motor.
This class helps simulate linear systems.
Definition LinearSystemSim.h:30
void SetState(const Vectord< States > &state)
Sets the system state.
Definition LinearSystemSim.h:118