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
101 virtual void display(std::ostream& os)
const;
104 const pinocchio::SE3& pose)
const;
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,
DECLARE_SIGNAL_OUT(wrenchLeft, dynamicgraph::Vector)
DECLARE_SIGNAL_OUT(wrenchRef, dynamicgraph::Vector)
DECLARE_SIGNAL_IN(frictionCoefficient, double)
DECLARE_SIGNAL_IN(wSum, double)
pinocchio::FrameIndex m_left_foot_id
ankle to sole transformation
DECLARE_SIGNAL_IN(wrenchDes, dynamicgraph::Vector)
DECLARE_SIGNAL_IN(wRatio, double)
RobotUtilShrPtr m_robot_util
Pinocchio robot data.
DECLARE_SIGNAL_OUT(copLeft, dynamicgraph::Vector)
DECLARE_SIGNAL_OUT(copRight, dynamicgraph::Vector)
Eigen::Matrix< double, 6, 1 > m_wrenchLeft
Eigen::VectorXd m_result1
DECLARE_SIGNAL_OUT(ankleWrenchRight, dynamicgraph::Vector)
DECLARE_SIGNAL_INNER(kinematics_computations, int)
Eigen::Vector4d m_left_foot_sizes
pinocchio::SE3 m_contactLeft
DECLARE_SIGNAL_OUT(wrenchRight, dynamicgraph::Vector)
Eigen::Vector4d m_right_foot_sizes
pinocchio::SE3 m_contactRight
DECLARE_SIGNAL_IN(phase, int)
DECLARE_SIGNAL_INNER(qp_computations, int)
pinocchio::Model m_model
true if the entity has been successfully initialized
DECLARE_SIGNAL_IN(wNorm, double)
Eigen::Matrix< double, 6, 1 > m_wrenchRight
DECLARE_SIGNAL_OUT(ankleWrenchLeft, dynamicgraph::Vector)
Eigen::Matrix< double, 16, 6 > m_wrenchFaceMatrix
DECLARE_SIGNAL_IN(q, dynamicgraph::Vector)
pinocchio::SE3 m_ankle_M_sole
eiquadprog::solvers::EiquadprogFast m_qp1
DECLARE_SIGNAL_OUT(emergencyStop, bool)
DECLARE_SIGNAL_IN(rho, double)
DECLARE_SIGNAL_IN(wAnkle, dynamicgraph::Vector)
DECLARE_SIGNAL_OUT(zmpRef, dynamicgraph::Vector)
bool m_emergency_stop_triggered
pinocchio::FrameIndex m_right_foot_id
Eigen::VectorXd m_result2
eiquadprog::solvers::EiquadprogFast m_qp2
pinocchio::Data m_data
Pinocchio robot model.
DECLARE_SIGNAL_OUT(surfaceWrenchRight, dynamicgraph::Vector)
DECLARE_SIGNAL_OUT(surfaceWrenchLeft, dynamicgraph::Vector)
#define DISTRIBUTE_WRENCH_EXPORT
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
float frictionCoefficient