38 double gearing, units::meter_t drumRadius,
39 units::meter_t minHeight, units::meter_t maxHeight,
41 const std::array<double, 1>& measurementStdDevs = {0.0});
59 units::kilogram_t carriageMass, units::meter_t drumRadius,
60 units::meter_t minHeight, units::meter_t maxHeight,
62 const std::array<double, 1>& measurementStdDevs = {0.0});
131 units::second_t dt)
override;
135 units::meter_t m_drumRadius;
136 units::meter_t m_minHeight;
137 units::meter_t m_maxHeight;
139 bool m_simulateGravity;
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 elevator mechanism.
Definition: ElevatorSim.h:20
bool HasHitUpperLimit() const
Returns whether the elevator has hit the upper limit.
units::meters_per_second_t GetVelocity() const
Returns the velocity of the elevator.
void SetInputVoltage(units::volt_t voltage)
Sets the input voltage for the elevator.
ElevatorSim(const LinearSystem< 2, 1, 1 > &plant, const DCMotor &gearbox, double gearing, units::meter_t drumRadius, units::meter_t minHeight, units::meter_t maxHeight, bool simulateGravity, const std::array< double, 1 > &measurementStdDevs={0.0})
Constructs a simulated elevator mechanism.
units::ampere_t GetCurrentDraw() const override
Returns the elevator current draw.
bool WouldHitUpperLimit(units::meter_t elevatorHeight) const
Returns whether the elevator would hit the upper limit.
bool HasHitLowerLimit() const
Returns whether the elevator has hit the lower limit.
Vectord< 2 > UpdateX(const Vectord< 2 > ¤tXhat, const Vectord< 1 > &u, units::second_t dt) override
Updates the state estimate of the elevator.
units::meter_t GetPosition() const
Returns the position of the elevator.
bool WouldHitLowerLimit(units::meter_t elevatorHeight) const
Returns whether the elevator would hit the lower limit.
ElevatorSim(const DCMotor &gearbox, double gearing, units::kilogram_t carriageMass, units::meter_t drumRadius, units::meter_t minHeight, units::meter_t maxHeight, bool simulateGravity, const std::array< double, 1 > &measurementStdDevs={0.0})
Constructs a simulated elevator mechanism.
This class helps simulate linear systems.
Definition: LinearSystemSim.h:31
Definition: BatterySim.h:14
Eigen::Vector< double, Size > Vectord
Definition: EigenCore.h:12