Skip to content

Commit

Permalink
Merge pull request #113 from robotology/release/0.7.0
Browse files Browse the repository at this point in the history
🚀 Release 0.7.0
  • Loading branch information
GiulioRomualdi authored Jan 10, 2022
2 parents 255305d + 06fcea2 commit 83812bd
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/pages/mpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ if(!solver.initSolver()) return 1;

The optimization problem can be solved calling the following method
\code{.cpp}
if(!solver.solve()) return 1;
if(solver.solveProblem() != OsqpEigen::ErrorExitFlag::NoError) return 1;
\endcode
and the solution can be easily got by calling the following method
\code{.cpp}
Expand All @@ -161,4 +161,4 @@ Eigen::VectorXd QPSolution = solver.getSolution();
\include MPCExample.cpp

The example presented generates the following results
\image html mpc_result.png
\image html mpc_result.png
2 changes: 1 addition & 1 deletion example/src/MPCExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int main()
for (int i = 0; i < numberOfSteps; i++){

// solve the QP problem
if(!solver.solve()) return 1;
if(solver.solveProblem() != OsqpEigen::ErrorExitFlag::NoError) return 1;

// get the controller input
QPSolution = solver.getSolution();
Expand Down
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<package format="3">
<name>osqp-eigen</name>
<version>0.6.4</version>
<description>Simple Eigen-C++ wrapper for OSQP library </description>
<version>0.7.0</version>
<description>Simple Eigen-C++ wrapper for OSQP library</description>
<maintainer email="tbd@tbd.tbd">tbd</maintainer>

<license>BSD</license>
Expand Down
2 changes: 1 addition & 1 deletion tests/MPCTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ TEST_CASE("MPCTest")
startTime = clock();

// solve the QP problem
REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);

// get the controller input
QPSolution = solver.getSolution();
Expand Down
2 changes: 1 addition & 1 deletion tests/MPCUpdateMatricesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ TEST_CASE("MPCTest Update matrices")
REQUIRE(solver.updateBounds(lowerBound, upperBound));

// solve the QP problem
REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);

// get the controller input
QPSolution = solver.getSolution();
Expand Down
4 changes: 2 additions & 2 deletions tests/QPTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST_CASE("QPProblem - Unconstrained")
REQUIRE(solver.data()->setGradient(gradient));

REQUIRE(solver.initSolver());
REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);

// expected solution
Eigen::Vector2d expectedSolution;
Expand Down Expand Up @@ -85,7 +85,7 @@ TEST_CASE("QPProblem")

REQUIRE(solver.initSolver());

REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);
Eigen::Vector2d expectedSolution;
expectedSolution << 0.3, 0.7;

Expand Down
6 changes: 3 additions & 3 deletions tests/UpdateMatricesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TEST_CASE("QPProblem - FirstRun")
REQUIRE(solver.data()->setUpperBound(upperBound));

REQUIRE(solver.initSolver());
REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);

auto solution = solver.getSolution();
std::cout << COUT_GTEST_MGT << "Solution [" << solution(0) << " "
Expand All @@ -80,7 +80,7 @@ TEST_CASE("QPProblem - SparsityConstant")

REQUIRE(solver.updateHessianMatrix(H_s));
REQUIRE(solver.updateLinearConstraintsMatrix(A_s));
REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);

auto solution = solver.getSolution();
std::cout << COUT_GTEST_MGT << "Solution [" << solution(0) << " "
Expand All @@ -101,7 +101,7 @@ TEST_CASE("QPProblem - SparsityChange")

REQUIRE(solver.updateHessianMatrix(H_s));
REQUIRE(solver.updateLinearConstraintsMatrix(A_s));
REQUIRE(solver.solve());
REQUIRE(solver.solveProblem() == OsqpEigen::ErrorExitFlag::NoError);

auto solution = solver.getSolution();
std::cout << COUT_GTEST_MGT << "Solution [" << solution(0) << " "
Expand Down

0 comments on commit 83812bd

Please sign in to comment.