17 #ifndef __sot_talos_balance_distribute_wrench_H__
18 #define __sot_talos_balance_distribute_wrench_H__
25 #if defined(position_controller_EXPORTS)
26 #define DISTRIBUTE_WRENCH_EXPORT __declspec(dllexport)
28 #define DISTRIBUTE_WRENCH_EXPORT __declspec(dllimport)
31 #define DISTRIBUTE_WRENCH_EXPORT
38 #include <pinocchio/fwd.hpp>
40 #include <dynamic-graph/signal-helper.h>
42 #include <eiquadprog/eiquadprog-fast.hpp>
44 #include <pinocchio/multibody/data.hpp>
45 #include <pinocchio/multibody/model.hpp>
46 #include <sot/core/robot-utils.hh>
48 #include "boost/assign.hpp"
52 namespace talos_balance {
59 :
public ::dynamicgraph::Entity {
60 DYNAMIC_GRAPH_ENTITY_DECL();
63 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
73 DECLARE_SIGNAL_IN(rho,
double);
74 DECLARE_SIGNAL_IN(phase,
int);
77 DECLARE_SIGNAL_IN(
wSum,
double);
78 DECLARE_SIGNAL_IN(
wNorm,
double);
79 DECLARE_SIGNAL_IN(
wRatio,
double);
82 DECLARE_SIGNAL_INNER(kinematics_computations,
int);
83 DECLARE_SIGNAL_INNER(qp_computations,
int);
96 DECLARE_SIGNAL_OUT(emergencyStop,
bool);
101 virtual void display(std::ostream& os)
const;
104 const pinocchio::SE3& pose)
const;
132 Eigen::Vector4d m_right_foot_sizes;
136 void computeWrenchFaceMatrix(
const double mu);
139 eiquadprog::solvers::EiquadprogFast
m_qp1;
140 eiquadprog::solvers::EiquadprogFast
m_qp2;
171 void distributeWrench(
const Eigen::VectorXd& wrenchDes,
const double rho,
173 void saturateWrench(
const Eigen::VectorXd& wrenchDes,
const int phase,
183 #endif // #ifndef __sot_talos_balance_distribute_wrench_H__