mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Update drake with upstream (#3484)
Our patches for the DARE and [[noreturn]] attributes were merged upstream. We missed their monthly release window by a day, so we'll use a commit hash for now.
This commit is contained in:
@@ -25,10 +25,14 @@ void SolveDAREandVerify(const Eigen::Ref<const MatrixXd>& A,
|
||||
EXPECT_GE(es.eigenvalues()[i], 0);
|
||||
}
|
||||
// Check that X is the solution to the discrete time ARE.
|
||||
MatrixXd Y = A.transpose() * X * A - X -
|
||||
A.transpose() * X * B * (B.transpose() * X * B + R).inverse() *
|
||||
B.transpose() * X * A +
|
||||
Q;
|
||||
// clang-format off
|
||||
MatrixXd Y =
|
||||
A.transpose() * X * A
|
||||
- X
|
||||
- (A.transpose() * X * B * (B.transpose() * X * B + R).inverse()
|
||||
* B.transpose() * X * A)
|
||||
+ Q;
|
||||
// clang-format on
|
||||
EXPECT_TRUE(CompareMatrices(Y, MatrixXd::Zero(n, n), 1E-10,
|
||||
MatrixCompareType::absolute));
|
||||
}
|
||||
@@ -48,10 +52,14 @@ void SolveDAREandVerify(const Eigen::Ref<const MatrixXd>& A,
|
||||
EXPECT_GE(es.eigenvalues()[i], 0);
|
||||
}
|
||||
// Check that X is the solution to the discrete time ARE.
|
||||
MatrixXd Y = A.transpose() * X * A - X -
|
||||
(A.transpose() * X * B + N) * (B.transpose() * X * B + R).inverse() *
|
||||
(B.transpose() * X * A + N.transpose()) +
|
||||
Q;
|
||||
// clang-format off
|
||||
MatrixXd Y =
|
||||
A.transpose() * X * A
|
||||
- X
|
||||
- ((A.transpose() * X * B + N) * (B.transpose() * X * B + R).inverse()
|
||||
* (B.transpose() * X * A + N.transpose()))
|
||||
+ Q;
|
||||
// clang-format on
|
||||
EXPECT_TRUE(CompareMatrices(Y, MatrixXd::Zero(n, n), 1E-10,
|
||||
MatrixCompareType::absolute));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user