From 2fadb082df42ecbf7beb849863fc954a8d8a8674 Mon Sep 17 00:00:00 2001 From: mebbaid Date: Wed, 10 Jan 2024 13:04:09 +0100 Subject: [PATCH] valgrind memcheck test smaller sim iterations --- src/ReducedModelControllers/tests/StableCentroidalMPCTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ReducedModelControllers/tests/StableCentroidalMPCTest.cpp b/src/ReducedModelControllers/tests/StableCentroidalMPCTest.cpp index 2e334d755c..dc4d1af6f1 100644 --- a/src/ReducedModelControllers/tests/StableCentroidalMPCTest.cpp +++ b/src/ReducedModelControllers/tests/StableCentroidalMPCTest.cpp @@ -302,7 +302,7 @@ TEST_CASE("StableCentroidalMPC") std::chrono::nanoseconds currentTime = 0s; auto phaseIt = phaseList.getPresentPhase(currentTime); - constexpr int simulationHorizon = 30; + constexpr int simulationHorizon = 10; std::vector comTrajectoryRecedingHorizon; for (int i = 0; i < simulationHorizon; i++) { @@ -377,7 +377,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.1); + REQUIRE(com(0) > 0.05); REQUIRE(std::abs(com(1) - com0(1)) < 0.1); REQUIRE(std::abs(com(2) - com0(2)) < 0.005); }