Skip to content

Commit

Permalink
Generic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
G-Cervettini committed May 2, 2023
1 parent fca0829 commit b6ef4c9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace BipedalLocomotion
struct BaseEstimatorFromFootIMUState
{
manif::SE3d basePose; //final output of the estimator
bool isValid{false};
};

/*
Expand Down
3 changes: 2 additions & 1 deletion src/Estimators/src/BaseEstimatorFromFootIMU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ const BaseEstimatorFromFootIMUState& BaseEstimatorFromFootIMU::getOutput() const
if (!m_isOutputValid)
{
log()->error("{} The output is not valid.", logPrefix);
return;
static const BaseEstimatorFromFootIMUState dummy;
return dummy;
}
return m_state; //m_state.basePose would be the actual output
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* @file BaseEstimatorFromFootIMU_Test.cpp
* @file BaseEstimatorFromFootIMUTest.cpp
* @authors Guglielmo Cervettini
* @copyright 2023 Istituto Italiano di Tecnologia (IIT). This software may be modified and
* distributed under the terms of the BSD-3-Clause license.
Expand All @@ -11,7 +11,8 @@
#include <Eigen/Dense>

#include <BipedalLocomotion/Conversions/ManifConversions.h>
#include <BipedalLocomotion/FloatingBaseEstimators/BaseEstimatorFromFootIMU.h>
#include <../../include/BipedalLocomotion/FloatingBaseEstimators/BaseEstimatorFromFootIMU.h>
//#include <BipedalLocomotion/FloatingBaseEstimators/BaseEstimatorFromFootIMU.h>
#include <BipedalLocomotion/ParametersHandler/IParametersHandler.h>
#include <BipedalLocomotion/ParametersHandler/StdImplementation.h>

Expand Down
3 changes: 2 additions & 1 deletion src/Estimators/tests/FloatingBaseEstimators/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ if(FRAMEWORK_USE_icub-models)
SOURCES InvariantEKFBaseEstimatorTest.cpp
LINKS BipedalLocomotion::FloatingBaseEstimators BipedalLocomotion::ParametersHandler BipedalLocomotion::ManifConversions Eigen3::Eigen MANIF::manif icub-models::icub-models)

message(STATUS "-------------------------------------YES")

add_bipedal_test(
NAME BaseEstimatorFromFootIMU
SOURCES BaseEstimatorFromFootIMUTest.cpp
LINKS BipedalLocomotion::FloatingBaseEstimators BipedalLocomotion::ParametersHandler BipedalLocomotion::ManifConversions Eigen3::Eigen iDynTree::idyntree-modelio-urdf icub-models::icub-models)

endif()
endif()

0 comments on commit b6ef4c9

Please sign in to comment.