[wpilib] Add mechanism specific SetState overloads to physics sims (#5534)

This commit is contained in:
Ryan Blue
2023-08-12 18:21:07 -04:00
committed by GitHub
parent 8121566258
commit a4b7fde767
12 changed files with 112 additions and 6 deletions

View File

@@ -48,6 +48,17 @@ class DCMotorSim : public LinearSystemSim<2, 1, 2> {
units::kilogram_square_meter_t moi,
const std::array<double, 2>& measurementStdDevs = {0.0, 0.0});
using LinearSystemSim::SetState;
/**
* Sets the state of the DC motor.
*
* @param angularPosition The new position
* @param angularVelocity The new velocity
*/
void SetState(units::radian_t angularPosition,
units::radians_per_second_t angularVelocity);
/**
* Returns the DC motor position.
*