4 #include <VirtualRobot/VirtualRobot.h>
13 #include <armarx/control/deprecated_njoint_mp_controller/adaptive/ControllerInterface.h>
14 #include <armarx/control/deprecated_njoint_mp_controller/bimanual/CartesianAdmittanceControllerInterface.h>
18 class SensorValue1DoFActuatorTorque;
19 class SensorValue1DoFActuatorVelocity;
20 class SensorValue1DoFActuatorPosition;
21 class ControlTarget1DoFActuatorTorque;
22 class SensorValueForceTorque;
43 const NJointControllerConfigPtr& config,
47 std::string
getClassName(
const Ice::Current&)
const override;
52 void setConfig(
const NJointBimanualCartesianAdmittanceControllerConfigPtr& ptr,
53 const Ice::Current& = Ice::emptyCurrent)
override;
55 const Ice::Current& = Ice::emptyCurrent)
override;
57 const Ice::Current& = Ice::emptyCurrent)
override;
59 const Ice::Current& = Ice::emptyCurrent)
override;
61 const Ice::Current& = Ice::emptyCurrent)
override;
64 const Ice::Current& = Ice::emptyCurrent)
override;
67 const Ice::Current& = Ice::emptyCurrent)
override;
71 const Ice::Current& = Ice::emptyCurrent)
override;
72 void setBoxWidth(
float w,
const Ice::Current& = Ice::emptyCurrent)
override;
74 const Eigen::Vector3f& velRPY,
75 const Ice::Current& = Ice::emptyCurrent)
override;
77 const Eigen::Vector3f& velXYZ,
78 const Eigen::Vector3f& velRPY,
79 const Ice::Current& = Ice::emptyCurrent)
override;
81 const Ice::Current& = Ice::emptyCurrent)
override;
83 const Ice::Current& = Ice::emptyCurrent)
override;
112 mutable std::recursive_mutex targBufWriteMutex;
115 struct PreprocessedCfg
123 float ftCalibrationTime;
125 Eigen::Vector12f KpImpedance;
126 Eigen::Vector12f KdImpedance;
129 Eigen::Vector3f CoMVecLeft;
130 Eigen::Vector3f forceOffsetLeft;
131 Eigen::Vector3f torqueOffsetLeft;
134 Eigen::Vector3f CoMVecRight;
135 Eigen::Vector3f forceOffsetRight;
136 Eigen::Vector3f torqueOffsetRight;
138 Eigen::VectorXf desiredJointValuesLeft;
139 Eigen::VectorXf desiredJointValuesRight;
146 Eigen::Vector12f targetWrench;
153 mutable std::recursive_mutex cfgBufWriteMutex;
160 std::vector<ControlTarget1DoFActuatorTorque*>
targets;
164 VirtualRobot::DifferentialIKPtr
IK;
167 VirtualRobot::RobotNodeSetPtr
rns;
168 VirtualRobot::RobotNodePtr
tcp;
177 double ftcalibrationTimer = 0;
179 bool firstLoop =
true;
185 Eigen::Vector12f filteredOldValue = Eigen::Vector12f::Zero();
190 struct DebugBufferData
194 StringFloatDictionary desired_torques;
225 float modifiedPoseRight_x;
226 float modifiedPoseRight_y;
227 float modifiedPoseRight_z;
228 float currentPoseLeft_x;
229 float currentPoseLeft_y;
230 float currentPoseLeft_z;
232 float modifiedPoseLeft_x;
233 float modifiedPoseLeft_y;
234 float modifiedPoseLeft_z;
235 float currentPoseRight_x;
236 float currentPoseRight_y;
237 float currentPoseRight_z;
247 float modifiedTwist_lx;
248 float modifiedTwist_ly;
249 float modifiedTwist_lz;
250 float modifiedTwist_rx;
251 float modifiedTwist_ry;
252 float modifiedTwist_rz;
261 Eigen::VectorXf forceImpedance;
262 Eigen::VectorXf forcePID;
263 Eigen::VectorXf forcePIDControlValue;
264 Eigen::VectorXf poseError;
265 Eigen::VectorXf wrenchesConstrained;
266 Eigen::VectorXf wrenchesMeasuredInRoot;
269 mutable std::recursive_mutex debugOutputDataReadMutex;