Skip to content
Snippets Groups Projects
Commit 507dbae3 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Remove FeatureForceTorque

parent 8435bff3
No related branches found
No related tags found
3 merge requests!31devel->main,!29Add functionality for UAV,!27Fix test with acc_x = 2 m/s2
...@@ -110,7 +110,6 @@ include/${PROJECT_NAME}/capture/capture_leg_odom.h ...@@ -110,7 +110,6 @@ include/${PROJECT_NAME}/capture/capture_leg_odom.h
include/${PROJECT_NAME}/capture/capture_point_feet_nomove.h include/${PROJECT_NAME}/capture/capture_point_feet_nomove.h
) )
SET(HDRS_FACTOR 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.h
include/${PROJECT_NAME}/factor/factor_force_torque_inertial_dynamics.h include/${PROJECT_NAME}/factor/factor_force_torque_inertial_dynamics.h
include/${PROJECT_NAME}/factor/factor_force_torque_preint.h include/${PROJECT_NAME}/factor/factor_force_torque_preint.h
...@@ -119,7 +118,6 @@ include/${PROJECT_NAME}/factor/factor_point_feet_nomove.h ...@@ -119,7 +118,6 @@ include/${PROJECT_NAME}/factor/factor_point_feet_nomove.h
include/${PROJECT_NAME}/factor/factor_point_feet_altitude.h include/${PROJECT_NAME}/factor/factor_point_feet_altitude.h
) )
SET(HDRS_FEATURE 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_force_torque_preint.h
include/${PROJECT_NAME}/feature/feature_inertial_kinematics.h include/${PROJECT_NAME}/feature/feature_inertial_kinematics.h
) )
...@@ -146,7 +144,6 @@ src/capture/capture_leg_odom.cpp ...@@ -146,7 +144,6 @@ src/capture/capture_leg_odom.cpp
src/capture/capture_point_feet_nomove.cpp src/capture/capture_point_feet_nomove.cpp
) )
SET(SRCS_FEATURE SET(SRCS_FEATURE
src/feature/feature_force_torque.cpp
src/feature/feature_force_torque_preint.cpp src/feature/feature_force_torque_preint.cpp
src/feature/feature_inertial_kinematics.cpp src/feature/feature_inertial_kinematics.cpp
) )
......
//--------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
//--------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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment