5 #include <VirtualRobot/Robot.h>
6 #include <VirtualRobot/IK/DifferentialIK.h>
18 #include <armarx/control/deprecated_njoint_mp_controller/bimanual/CartesianAdmittanceControllerInterface.h>
38 std::string
getClassName(
const Ice::Current&)
const override;
42 void setConfig(
const NJointBimanualCartesianAdmittanceControllerConfigPtr& ptr,
const Ice::Current& = Ice::emptyCurrent)
override;
52 void setBoxWidth(
float w,
const Ice::Current& = Ice::emptyCurrent)
override;
54 const Eigen::Vector3f& velXYZ,
55 const Eigen::Vector3f& velRPY,
56 const Ice::Current& = Ice::emptyCurrent)
override;
58 const Eigen::Vector3f& velXYZ,
59 const Eigen::Vector3f& velRPY,
60 const Ice::Current& = Ice::emptyCurrent)
override;
62 void moveBoxPosition(
const Eigen::Vector3f& pos,
const Ice::Current& = Ice::emptyCurrent)
override;
84 mutable std::recursive_mutex targBufWriteMutex;
88 struct PreprocessedCfg
96 float ftCalibrationTime;
98 Eigen::Vector12f KpImpedance;
99 Eigen::Vector12f KdImpedance;
102 Eigen::Vector3f CoMVecLeft;
103 Eigen::Vector3f forceOffsetLeft;
104 Eigen::Vector3f torqueOffsetLeft;
107 Eigen::Vector3f CoMVecRight;
108 Eigen::Vector3f forceOffsetRight;
109 Eigen::Vector3f torqueOffsetRight;
111 Eigen::VectorXf desiredJointValuesLeft;
112 Eigen::VectorXf desiredJointValuesRight;
119 Eigen::Vector12f targetWrench;
125 mutable std::recursive_mutex cfgBufWriteMutex;
132 std::vector<ControlTarget1DoFActuatorTorque*>
targets;
136 VirtualRobot::DifferentialIKPtr
IK;
139 VirtualRobot::RobotNodeSetPtr
rns;
140 VirtualRobot::RobotNodePtr
tcp;
148 double ftcalibrationTimer = 0;
150 bool firstLoop =
true;
156 Eigen::Vector12f filteredOldValue = Eigen::Vector12f::Zero();
161 struct DebugBufferData
165 StringFloatDictionary desired_torques;
196 float modifiedPoseRight_x;
197 float modifiedPoseRight_y;
198 float modifiedPoseRight_z;
199 float currentPoseLeft_x;
200 float currentPoseLeft_y;
201 float currentPoseLeft_z;
203 float modifiedPoseLeft_x;
204 float modifiedPoseLeft_y;
205 float modifiedPoseLeft_z;
206 float currentPoseRight_x;
207 float currentPoseRight_y;
208 float currentPoseRight_z;
218 float modifiedTwist_lx;
219 float modifiedTwist_ly;
220 float modifiedTwist_lz;
221 float modifiedTwist_rx;
222 float modifiedTwist_ry;
223 float modifiedTwist_rz;
232 Eigen::VectorXf forceImpedance;
233 Eigen::VectorXf forcePID;
234 Eigen::VectorXf forcePIDControlValue;
235 Eigen::VectorXf poseError;
236 Eigen::VectorXf wrenchesConstrained;
237 Eigen::VectorXf wrenchesMeasuredInRoot;
240 mutable std::recursive_mutex debugOutputDataReadMutex;