Skip to content

Commit

Permalink
Merge pull request RobotLocomotion#8411 from RussTedrake/care_doc
Browse files Browse the repository at this point in the history
minor cleanup on CARE documentation.
  • Loading branch information
sammy-tri authored Mar 21, 2018
2 parents 0f0aec1 + 89d9491 commit a692ae5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions math/continuous_algebraic_riccati_equation.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
namespace drake {
namespace math {

/// Computes the unique stabilizing solution X to the continuous-time algebraic
/// Computes the unique stabilizing solution S to the continuous-time algebraic
/// Riccati equation:
///
/// @verbatim
/// S'A + A'S - S B inv(R) B' S + Q = 0
/// S A + A' S - S B inv(R) B' S + Q = 0
/// @endverbatim
///
/// @throws std::runtime_error if R is not positive definite.
Expand Down
10 changes: 10 additions & 0 deletions math/test/continuous_algebraic_riccati_equation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,16 @@ GTEST_TEST(CARE, TestCare) {
SolveCAREandVerify(A1, B1, Q, R1);
}

// Test the stabilization of the linearized pendulum (at the top).
GTEST_TEST(CARE, TestCare2) {
MatrixXd A1(2, 2), B1(2, 1), Q(2, 2), R1(1, 1);
A1 << 0, 1, 10, 0;
B1 << 0, 1;
Q << 1, 0, 0, 1;
R1 << 1;
SolveCAREandVerify(A1, B1, Q, R1);
}

} // namespace
} // namespace math
} // namespace drake

0 comments on commit a692ae5

Please sign in to comment.