From aba51f056d2542ce95ab4848adc9d017769b212a Mon Sep 17 00:00:00 2001 From: mebbaid Date: Tue, 7 Nov 2023 17:08:05 +0100 Subject: [PATCH] short sim time for unit mem check test --- 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 63daa6094c..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.0); + REQUIRE(com(0) > 0.05); REQUIRE(std::abs(com(1) - com0(1)) < 0.1); REQUIRE(std::abs(com(2) - com0(2)) < 0.005); }