mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpimath] Add full state support to LinearSystemId functions (#6554)
Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
committed by
GitHub
parent
7fbbecb5b7
commit
7fc17811fa
@@ -74,8 +74,10 @@ TEST(ElevatorSimTest, Stability) {
|
||||
sim.Update(20_ms);
|
||||
}
|
||||
|
||||
frc::LinearSystem<2, 1, 1> system = frc::LinearSystemId::ElevatorSystem(
|
||||
frc::DCMotor::Vex775Pro(4), 4_kg, 0.5_in, 100);
|
||||
frc::LinearSystem<2, 1, 1> system =
|
||||
frc::LinearSystemId::ElevatorSystem(frc::DCMotor::Vex775Pro(4), 4_kg,
|
||||
0.5_in, 100)
|
||||
.Slice(0);
|
||||
EXPECT_NEAR_UNITS(
|
||||
units::meter_t{system.CalculateX(frc::Vectord<2>{0.0, 0.0},
|
||||
frc::Vectord<1>{12.0}, 20_ms * 50)(0)},
|
||||
|
||||
Reference in New Issue
Block a user