Skip to content

Commit

Permalink
shorter test simulation loop to bench the memcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
mebbaid committed Nov 3, 2023
1 parent f7963ee commit ae17210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ReducedModelControllers/tests/StableCentroidalMPCTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ TEST_CASE("StableCentroidalMPC")
std::chrono::nanoseconds currentTime = 0s;
auto phaseIt = phaseList.getPresentPhase(currentTime);

constexpr int simulationHorizon = 50;
constexpr int simulationHorizon = 30;
std::vector<Eigen::Vector3d> comTrajectoryRecedingHorizon;
for (int i = 0; i < simulationHorizon; i++)
{
Expand Down Expand Up @@ -379,7 +379,7 @@ TEST_CASE("StableCentroidalMPC")
const auto& [com, dcom, angularMomentum] = system->getState();

// We check that the robot walked forward keeping the CoM height almost constant
REQUIRE(com(0) > 0.25);
REQUIRE(com(0) > 0.0);
REQUIRE(std::abs(com(1) - com0(1)) < 0.1);
REQUIRE(std::abs(com(2) - com0(2)) < 0.005);
}

0 comments on commit ae17210

Please sign in to comment.