Skip to content
Snippets Groups Projects

Resolve "Migrate to state composites"

Merged Joan Solà Ortega requested to merge 4-migrate-to-state-composites into devel
Files
9
@@ -7,6 +7,8 @@
@@ -7,6 +7,8 @@
#include "core/capture/capture_motion.h"
#include "core/capture/capture_motion.h"
#include "bodydynamics/capture/capture_inertial_kinematics.h"
#include "bodydynamics/capture/capture_inertial_kinematics.h"
 
#include <core/state_block/state_composite.h>
 
namespace wolf {
namespace wolf {
WOLF_PTR_TYPEDEFS(CaptureForceTorquePreint);
WOLF_PTR_TYPEDEFS(CaptureForceTorquePreint);
@@ -39,35 +41,14 @@ class CaptureForceTorquePreint : public CaptureMotion
@@ -39,35 +41,14 @@ class CaptureForceTorquePreint : public CaptureMotion
virtual ~CaptureForceTorquePreint();
virtual ~CaptureForceTorquePreint();
virtual VectorXd getCalibration() const override;
virtual VectorXd correctDelta(const VectorXd& _delta, const VectorXd& _delta_error) const override;
CaptureBasePtr getIkinCaptureOther(){ return cap_ikin_other_; }
CaptureBasePtr getIkinCaptureOther(){ return cap_ikin_other_; }
CaptureBasePtr getGyroCaptureOther(){ return cap_gyro_other_;}
CaptureBasePtr getGyroCaptureOther(){ return cap_gyro_other_;}
private:
private:
CaptureBasePtr cap_ikin_other_;
CaptureBasePtr cap_ikin_other_;
CaptureBasePtr cap_gyro_other_;
CaptureBasePtr cap_gyro_other_;
protected:
SizeEigen computeCalibSize() const override;
};
};
inline SizeEigen CaptureForceTorquePreint::computeCalibSize() const
{
// Hack: CaptureBase::computeCalibSize will compute a size 0 since no statblock is stored in this capture
// To be able to use setCalib, we need to override this function
return 6;
}
inline Eigen::VectorXd CaptureForceTorquePreint::correctDelta(const VectorXd& _delta, const VectorXd& _delta_error_biases) const
{
return bodydynamics::plus(_delta, _delta_error_biases); // deltacorr = plus(deltapreint, J_deltapreint_biases * (biases - biasespreint)
}
} // namespace wolf
} // namespace wolf
#endif // CAPTURE_FORCE_TORQUE_PREINT_H
#endif // CAPTURE_FORCE_TORQUE_PREINT_H
Loading