[wpimath] Use units for LinearSystemId Kv and Ka (#2852)

This commit is contained in:
Prateek Machiraju
2020-11-12 01:33:04 -05:00
committed by GitHub
parent f24f282442
commit ac3c336b98
6 changed files with 72 additions and 23 deletions

View File

@@ -29,7 +29,8 @@
TEST(StateSpaceSimTest, TestFlywheelSim) {
const frc::LinearSystem<1, 1, 1> plant =
frc::LinearSystemId::IdentifyVelocitySystem(0.02, 0.01);
frc::LinearSystemId::IdentifyVelocitySystem<units::radian>(
0.02_V / 1_rad_per_s, 0.01_V / 1_rad_per_s_sq);
frc::sim::FlywheelSim sim{plant, frc::DCMotor::NEO(2), 1.0};
frc2::PIDController controller{0.2, 0.0, 0.0};
frc::SimpleMotorFeedforward<units::radian> feedforward{