From 507dbae3bd258fc626786514004da05d38051cdb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Mon, 8 Aug 2022 12:39:00 +0200
Subject: [PATCH] Remove FeatureForceTorque

---
 CMakeLists.txt                                |  3 -
 .../feature/feature_force_torque.h            | 92 -------------------
 src/feature/feature_force_torque.cpp          | 54 -----------
 3 files changed, 149 deletions(-)
 delete mode 100644 include/bodydynamics/feature/feature_force_torque.h
 delete mode 100644 src/feature/feature_force_torque.cpp

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5208055..c06b7b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,7 +110,6 @@ include/${PROJECT_NAME}/capture/capture_leg_odom.h
 include/${PROJECT_NAME}/capture/capture_point_feet_nomove.h
   )
 SET(HDRS_FACTOR
-include/${PROJECT_NAME}/factor/factor_force_torque.h
 include/${PROJECT_NAME}/factor/factor_force_torque_inertial.h
 include/${PROJECT_NAME}/factor/factor_force_torque_inertial_dynamics.h
 include/${PROJECT_NAME}/factor/factor_force_torque_preint.h
@@ -119,7 +118,6 @@ include/${PROJECT_NAME}/factor/factor_point_feet_nomove.h
 include/${PROJECT_NAME}/factor/factor_point_feet_altitude.h
   )
 SET(HDRS_FEATURE
-include/${PROJECT_NAME}/feature/feature_force_torque.h
 include/${PROJECT_NAME}/feature/feature_force_torque_preint.h
 include/${PROJECT_NAME}/feature/feature_inertial_kinematics.h
   )
@@ -146,7 +144,6 @@ src/capture/capture_leg_odom.cpp
 src/capture/capture_point_feet_nomove.cpp
 )
 SET(SRCS_FEATURE
-src/feature/feature_force_torque.cpp
 src/feature/feature_force_torque_preint.cpp
 src/feature/feature_inertial_kinematics.cpp
 )
diff --git a/include/bodydynamics/feature/feature_force_torque.h b/include/bodydynamics/feature/feature_force_torque.h
deleted file mode 100644
index 1459482..0000000
--- a/include/bodydynamics/feature/feature_force_torque.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//--------LICENSE_START--------
-//
-// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
-// Authors: Joan Solà Ortega (jsola@iri.upc.edu)
-// All rights reserved.
-//
-// This file is part of WOLF
-// WOLF is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-//--------LICENSE_END--------
-#ifndef FEATURE_FORCE_TORQUE_H_
-#define FEATURE_FORCE_TORQUE_H_
-
-//Wolf includes
-#include "core/feature/feature_base.h"
-
-//std includes
-namespace wolf {
-    
-WOLF_PTR_TYPEDEFS(FeatureForceTorque);
-
-//class FeatureApriltag
-class FeatureForceTorque : public FeatureBase
-{
-    public:
-
-        FeatureForceTorque(
-            const double& _dt,
-            const double& _mass,
-            const Eigen::Vector6d& _forces_meas,
-            const Eigen::Vector6d& _torques_meas,
-            const Eigen::Vector3d& _pbc_meas,
-            const Eigen::Matrix<double,14,1>& _kin_meas,
-            const Eigen::Matrix6d& _cov_forces_meas,
-            const Eigen::Matrix6d& _cov_torques_meas,
-            const Eigen::Matrix3d& _cov_pbc_meas,
-            const Eigen::Matrix<double,14,14>& _cov_kin_meas = Eigen::Matrix<double,14,14>::Zero()
-            );
-
-        ~FeatureForceTorque() override;
-
-        const double & getDt() const {return dt_;}
-        const double & getMass() const {return mass_;}
-        void setDt(const double & _dt){dt_ = _dt;}
-        void setMass(const double & _mass){mass_ = _mass;}
-
-        const Eigen::Vector6d& getForcesMeas() const {return forces_meas_;}
-        const Eigen::Vector6d& getTorquesMeas() const {return torques_meas_;}
-        const Eigen::Vector3d& getPbcMeas() const {return pbc_meas_;}
-        const Eigen::Matrix<double,14,1>& getKinMeas() const {return kin_meas_;}
-        const Eigen::Matrix6d& getCovForcesMeas() const {return cov_forces_meas_;}
-        const Eigen::Matrix6d& getCovTorquesMeas() const {return cov_torques_meas_;}
-        const Eigen::Matrix3d& getCovPbcMeas() const {return cov_pbc_meas_;}
-        const Eigen::Matrix<double,14,14>& getCovKinMeas() const {return cov_kin_meas_;}
-
-        void setForcesMeas(const Eigen::Vector6d& _forces_meas){forces_meas_ = _forces_meas;}
-        void setTorquesMeas(const Eigen::Vector6d& _torques_meas){torques_meas_ = _torques_meas;}
-        void setKinMeas(const Eigen::Matrix<double,14,1>& _kin_meas){kin_meas_ = _kin_meas;}
-        void setPbcMeas(const Eigen::Vector3d& _pbc_meas){pbc_meas_ = _pbc_meas;}
-        void setCovForcesMeas(const Eigen::Matrix6d& _cov_forces_meas){cov_forces_meas_ = _cov_forces_meas;}
-        void setCovTorquesMeas(const Eigen::Matrix6d& _cov_torques_meas){cov_torques_meas_ = _cov_torques_meas;}
-        void setCovPbcMeas(const Eigen::Matrix3d& _cov_pbc_meas){cov_pbc_meas_ = _cov_pbc_meas;}
-        void setCovKinMeas(const Eigen::Matrix<double,14,14>& _cov_kin_meas){cov_kin_meas_ = _cov_kin_meas;}
-    
-    private:
-        double dt_;
-        double mass_;
-        Eigen::Vector6d forces_meas_;
-        Eigen::Vector6d torques_meas_;
-        Eigen::Vector3d pbc_meas_;
-        Eigen::Matrix<double,14,1> kin_meas_;
-        Eigen::Matrix6d cov_forces_meas_;
-        Eigen::Matrix6d cov_torques_meas_;
-        Eigen::Matrix3d cov_pbc_meas_;
-        Eigen::Matrix<double,14,14> cov_kin_meas_;
-
-};
-
-} // namespace wolf
-
-#endif
diff --git a/src/feature/feature_force_torque.cpp b/src/feature/feature_force_torque.cpp
deleted file mode 100644
index 83c1254..0000000
--- a/src/feature/feature_force_torque.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//--------LICENSE_START--------
-//
-// Copyright (C) 2020,2021,2022 Institut de Robòtica i Informàtica Industrial, CSIC-UPC.
-// Authors: Joan Solà Ortega (jsola@iri.upc.edu)
-// All rights reserved.
-//
-// This file is part of WOLF
-// WOLF is free software: you can redistribute it and/or modify
-// it under the terms of the GNU Lesser General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public License
-// along with this program.  If not, see <http://www.gnu.org/licenses/>.
-//
-//--------LICENSE_END--------
-#include "bodydynamics/feature/feature_force_torque.h"
-
-namespace wolf {
-    
-WOLF_PTR_TYPEDEFS(FeatureForceTorque);
-
-FeatureForceTorque::FeatureForceTorque(
-            const double& _dt,
-            const double& _mass,
-            const Eigen::Vector6d& _forces_meas,
-            const Eigen::Vector6d& _torques_meas,
-            const Eigen::Vector3d& _pbc_meas,
-            const Eigen::Matrix<double,14,1>& _kin_meas,
-            const Eigen::Matrix6d& _cov_forces_meas,
-            const Eigen::Matrix6d& _cov_torques_meas,
-            const Eigen::Matrix3d& _cov_pbc_meas,
-            const Eigen::Matrix<double,14,14>& _cov_kin_meas) :
-        FeatureBase("FORCETORQUE", 42*Eigen::Matrix1d::Identity(), 42*Eigen::Matrix1d::Identity(), UNCERTAINTY_IS_COVARIANCE),  // Pass dummmy values -> we are bypassing the way meas and cov is usually stored because too many of them == vector is too big -> error prone
-        dt_(_dt),
-        mass_(_mass),
-        forces_meas_(_forces_meas),
-        torques_meas_(_torques_meas),
-        pbc_meas_(_pbc_meas),
-        kin_meas_(_kin_meas),
-        cov_forces_meas_(_cov_forces_meas),
-        cov_torques_meas_(_cov_torques_meas),
-        cov_pbc_meas_(_cov_pbc_meas),
-        cov_kin_meas_(_cov_kin_meas)
-{}
-
-FeatureForceTorque::~FeatureForceTorque(){}
-
-} // namespace wolf
-- 
GitLab