11 #ifndef __sot_talos_balance_admittance_controller_end_effector_H__
12 #define __sot_talos_balance_admittance_controller_end_effector_H__
19 #if defined(admittance_controller_end_effector_EXPORTS)
20 #define ADMITTANCECONTROLLERENDEFFECTOR_EXPORT __declspec(dllexport)
22 #define ADMITTANCECONTROLLERENDEFFECTOR_EXPORT __declspec(dllimport)
25 #define ADMITTANCECONTROLLERENDEFFECTOR_EXPORT
32 #include <pinocchio/fwd.hpp>
34 #include <dynamic-graph/signal-helper.h>
37 #include <pinocchio/algorithm/center-of-mass.hpp>
38 #include <pinocchio/algorithm/frames.hpp>
39 #include <pinocchio/algorithm/kinematics.hpp>
40 #include <pinocchio/multibody/model.hpp>
41 #include <pinocchio/parsers/urdf.hpp>
42 #include <sot/core/robot-utils.hh>
44 #include "boost/assign.hpp"
45 #include "pinocchio/spatial/motion.hpp"
46 #include "pinocchio/spatial/se3.hpp"
50 namespace talos_balance {
66 :
public ::dynamicgraph::Entity {
67 DYNAMIC_GRAPH_ENTITY_DECL();
70 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
106 void init(
const double &
dt,
const std::string &sensorFrameName,
107 const std::string &endeffectorName);
115 virtual void display(std::ostream &os)
const;
#define ADMITTANCECONTROLLERENDEFFECTOR_EXPORT
Admittance controller for an upper body end-effector (right or left wrist)
DECLARE_SIGNAL_IN(Kp, dynamicgraph::Vector)
Gain (6d) for the integration of the error on the force.
pinocchio::FrameIndex m_sensorFrameId
Id of the force sensor frame.
DECLARE_SIGNAL_OUT(dq, dynamicgraph::Vector)
Velocity reference for the end-effector in the local frame.
dynamicgraph::Vector m_w_dq
Internal state.
DECLARE_SIGNAL_INNER(w_dq, dynamicgraph::Vector)
Internal intergration computed in the world frame.
RobotUtilShrPtr m_robot_util
Robot Util instance to get the sensor frame.
DECLARE_SIGNAL_INNER(w_force, dynamicgraph::Vector)
6d force given by the sensor in the world frame
pinocchio::Data * m_data
Pinocchio robot data.
pinocchio::JointIndex m_endEffectorId
Id of the joint of the end-effector.
double m_dt
Time step of the control.
int m_n
Dimension of the force signals and of the output.
DECLARE_SIGNAL_IN(Kd, dynamicgraph::Vector)
Derivative gain (6d) for the error on the force.
bool m_initSucceeded
True if the entity has been successfully initialized.
pinocchio::Model m_model
Pinocchio robot model.
DECLARE_SIGNAL_IN(q, dynamicgraph::Vector)
Current joint configuration of the robot.
DECLARE_SIGNAL_IN(dqSaturation, dynamicgraph::Vector)
Value of the saturation to apply on the velocity output.
DECLARE_SIGNAL_IN(w_forceDes, dynamicgraph::Vector)
6d desired force of the end-effector in the world frame
DECLARE_SIGNAL_IN(force, dynamicgraph::Vector)
6d force given by the sensor in its local frame
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector