[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:
Tyler Veness
2021-07-22 17:48:48 -07:00
committed by GitHub
parent 1ef826d1da
commit ab8e8aa2a1
10 changed files with 97 additions and 212 deletions

View File

@@ -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));
}