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 29 #include <pinocchio/fwd.hpp> 31 #include <boost/assign.hpp> 33 #include <dynamic-graph/signal-helper.h> 34 #include <sot/core/matrix-geometry.hh> 35 #include <sot/core/robot-utils.hh> 49 DYNAMIC_GRAPH_ENTITY_DECL();
52 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
57 void init(
const double& dt,
const std::string& robotRef);
62 DECLARE_SIGNAL_IN(base6d_encoders, dynamicgraph::Vector);
63 DECLARE_SIGNAL_IN(jointsVelocities, dynamicgraph::Vector);
64 DECLARE_SIGNAL_IN(qRef, dynamicgraph::Vector);
65 DECLARE_SIGNAL_IN(dqRef, dynamicgraph::Vector);
66 DECLARE_SIGNAL_IN(Kp, dynamicgraph::Vector);
67 DECLARE_SIGNAL_IN(Kd, dynamicgraph::Vector);
68 DECLARE_SIGNAL_IN(Ki, dynamicgraph::Vector);
70 DECLARE_SIGNAL_OUT(pwmDes, dynamicgraph::Vector);
72 DECLARE_SIGNAL_OUT(qError, dynamicgraph::Vector);
76 virtual void display(std::ostream& os)
const;
78 void sendMsg(
const std::string& msg, MsgType t = MSG_TYPE_INFO,
const char* =
"",
int = 0) {
79 logger_.stream(t) << (
"[PositionController-" + name +
"] " + msg) <<
'\n';
91 Eigen::VectorXd
m_q, m_dq;
99 #endif // #ifndef __sot_torque_control_position_controller_H__ RobotUtilShrPtr m_robot_util
Eigen::VectorXd m_pwmDes
Robot Util.
void sendMsg(const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0)
Eigen::VectorXd m_e_integral
control loop time period
#define SOTPOSITIONCONTROLLER_EXPORT
AdmittanceController EntityClassName
double m_dt
true if the entity has been successfully initialized