mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Use units for LinearSystemId Kv and Ka (#2852)
This commit is contained in:
committed by
GitHub
parent
f24f282442
commit
ac3c336b98
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user