6 #ifndef __sot_torque_control_position_controller_H__
7 #define __sot_torque_control_position_controller_H__
14 #if defined(position_controller_EXPORTS)
15 #define SOTPOSITIONCONTROLLER_EXPORT __declspec(dllexport)
17 #define SOTPOSITIONCONTROLLER_EXPORT __declspec(dllimport)
20 #define SOTPOSITIONCONTROLLER_EXPORT
28 #include "boost/assign.hpp"
30 #include <dynamic-graph/signal-helper.h>
31 #include <sot/core/matrix-geometry.hh>
32 #include <sot/core/robot-utils.hh>
46 DYNAMIC_GRAPH_ENTITY_DECL();
49 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
54 void init(
const double& dt,
const std::string& robotRef);
59 DECLARE_SIGNAL_IN(base6d_encoders, dynamicgraph::Vector);
60 DECLARE_SIGNAL_IN(jointsVelocities, dynamicgraph::Vector);
61 DECLARE_SIGNAL_IN(qRef, dynamicgraph::Vector);
62 DECLARE_SIGNAL_IN(dqRef, dynamicgraph::Vector);
63 DECLARE_SIGNAL_IN(Kp, dynamicgraph::Vector);
64 DECLARE_SIGNAL_IN(Kd, dynamicgraph::Vector);
65 DECLARE_SIGNAL_IN(Ki, dynamicgraph::Vector);
67 DECLARE_SIGNAL_OUT(pwmDes, dynamicgraph::Vector);
69 DECLARE_SIGNAL_OUT(qError, dynamicgraph::Vector);
73 virtual void display(std::ostream& os)
const;
75 void sendMsg(
const std::string& msg, MsgType t = MSG_TYPE_INFO,
const char* =
"",
int = 0) {
76 logger_.stream(t) << (
"[PositionController-" + name +
"] " + msg) <<
'\n';
88 Eigen::VectorXd
m_q, m_dq;
96 #endif // #ifndef __sot_torque_control_position_controller_H__