2 #ifndef _SOT_DDP_ACTUATOR_SOLVER_H
3 #define _SOT_DDP_ACTUATOR_SOLVER_H
9 #if defined(sot_ddp_actuator_EXPORTS)
10 #define SOTDDPACTUATORSOLVER_EXPORT __declspec(dllexport)
12 #define SOTDDPACTUATORSOLVER_EXPORT __declspec(dllimport)
15 #define SOTDDPACTUATORSOLVER_EXPORT
18 #include <dynamic-graph/signal-helper.h>
20 #include <ddp-actuator-solver/ddpsolver.hh>
21 #include <ddp-actuator-solver/temperature_control/costtemp.hh>
22 #include <ddp-actuator-solver/temperature_control/dctemp.hh>
23 #include <sot/core/causal-filter.hh>
24 #include <sot/core/matrix-geometry.hh>
25 #include <sot/core/robot-utils.hh>
26 #include <tsid/utils/stop-watch.hpp>
32 #define ALL_INPUT_SIGNALS \
33 m_pos_desSIN << m_pos_motor_measureSIN << m_pos_joint_measureSIN \
34 << m_dx_measureSIN << m_tau_measureSIN << m_temp_measureSIN \
37 #define ALL_OUTPUT_SIGNALS m_tauSOUT
40 :
public ::dynamicgraph::Entity {
41 DYNAMIC_GRAPH_ENTITY_DECL();
44 DECLARE_SIGNAL_IN(pos_des, dynamicgraph::Vector);
45 DECLARE_SIGNAL_IN(pos_motor_measure, dynamicgraph::Vector);
46 DECLARE_SIGNAL_IN(pos_joint_measure, dynamicgraph::Vector);
47 DECLARE_SIGNAL_IN(dx_measure, dynamicgraph::Vector);
48 DECLARE_SIGNAL_IN(tau_measure, dynamicgraph::Vector);
49 DECLARE_SIGNAL_IN(tau_des, dynamicgraph::Vector);
50 DECLARE_SIGNAL_IN(temp_measure, dynamicgraph::Vector);
51 DECLARE_SIGNAL_OUT(tau, dynamicgraph::Vector);
56 DDPSolver<double, 5, 1>::stateVec_t m_xinit, m_xDes, m_x,
m_zeroState;
57 DDPSolver<double, 5, 1>::commandVec_t
m_u;
66 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
70 virtual void display(std::ostream &os)
const;
79 void param_init(
const double ×tep,
const int &T,
const int &nbItMax,
80 const double &stopCriteria);
85 #endif // _SOT_DDP_ACTUATOR_SOLVER_H