mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +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
@@ -47,7 +47,8 @@ class Robot : public frc::TimedRobot {
|
||||
// Outputs (what we can measure): [position], in radians.
|
||||
frc::LinearSystem<2, 1, 1> m_armPlant =
|
||||
frc::LinearSystemId::SingleJointedArmSystem(frc::DCMotor::NEO(2), kArmMOI,
|
||||
kArmGearing);
|
||||
kArmGearing)
|
||||
.Slice(0);
|
||||
|
||||
// The observer fuses our encoder data and voltage inputs to reject noise.
|
||||
frc::KalmanFilter<2, 1, 1> m_observer{
|
||||
|
||||
@@ -45,7 +45,8 @@ class Robot : public frc::TimedRobot {
|
||||
// Outputs (what we can measure): [position], in meters.
|
||||
frc::LinearSystem<2, 1, 1> m_elevatorPlant =
|
||||
frc::LinearSystemId::ElevatorSystem(frc::DCMotor::NEO(2), kCarriageMass,
|
||||
kDrumRadius, kGearRatio);
|
||||
kDrumRadius, kGearRatio)
|
||||
.Slice(0);
|
||||
|
||||
// The observer fuses our encoder data and voltage inputs to reject noise.
|
||||
frc::KalmanFilter<2, 1, 1> m_observer{
|
||||
|
||||
Reference in New Issue
Block a user