5 #include <VirtualRobot/Robot.h>
6 #include <VirtualRobot/IK/DifferentialIK.h>
18 #include <armarx/control/deprecated_njoint_mp_controller/bimanual/ForceMPControllerInterface.h>
69 void runDMP(
const Ice::DoubleSeq& goals,
const Ice::Current&);
70 void setGoals(
const Ice::DoubleSeq& goals,
const Ice::Current&);
85 Eigen::VectorXf targetWrench;
86 struct DebugBufferData
88 StringFloatDictionary desired_torques;
90 float modifiedPoseRight_x;
91 float modifiedPoseRight_y;
92 float modifiedPoseRight_z;
93 float currentPoseLeft_x;
94 float currentPoseLeft_y;
95 float currentPoseLeft_z;
97 float modifiedPoseLeft_x;
98 float modifiedPoseLeft_y;
99 float modifiedPoseLeft_z;
100 float currentPoseRight_x;
101 float currentPoseRight_y;
102 float currentPoseRight_z;
112 float modifiedTwist_lx;
113 float modifiedTwist_ly;
114 float modifiedTwist_lz;
115 float modifiedTwist_rx;
116 float modifiedTwist_ry;
117 float modifiedTwist_rz;
123 Eigen::VectorXf wrenchDMP;
124 Eigen::VectorXf computedBoxWrench;
126 Eigen::VectorXf forceImpedance;
127 Eigen::VectorXf forcePID;
128 Eigen::VectorXf forcePIDControlValue;
129 Eigen::VectorXf poseError;
130 Eigen::VectorXf wrenchesConstrained;
131 Eigen::VectorXf wrenchesMeasuredInRoot;
135 struct NJointBimanualForceControllerSensorData
140 Eigen::VectorXf currentTwist;
144 struct NJointBimanualForceControllerInterfaceData
152 std::vector<ControlTarget1DoFActuatorTorque*> leftTargets;
153 std::vector<const SensorValue1DoFActuatorAcceleration*> leftAccelerationSensors;
154 std::vector<const SensorValue1DoFActuatorVelocity*> leftVelocitySensors;
155 std::vector<const SensorValue1DoFActuatorPosition*> leftPositionSensors;
157 std::vector<ControlTarget1DoFActuatorTorque*> rightTargets;
158 std::vector<const SensorValue1DoFActuatorAcceleration*> rightAccelerationSensors;
159 std::vector<const SensorValue1DoFActuatorVelocity*> rightVelocitySensors;
160 std::vector<const SensorValue1DoFActuatorPosition*> rightPositionSensors;
165 NJointBimanualForceControllerConfigPtr cfg;
166 VirtualRobot::DifferentialIKPtr leftIK;
167 VirtualRobot::DifferentialIKPtr rightIK;
176 Eigen::VectorXf leftDesiredJointValues;
177 Eigen::VectorXf rightDesiredJointValues;
183 Eigen::VectorXf KpImpedance;
184 Eigen::VectorXf KdImpedance;
185 Eigen::VectorXf KpAdmittance;
186 Eigen::VectorXf KdAdmittance;
187 Eigen::VectorXf KmAdmittance;
188 Eigen::VectorXf KmPID;
190 Eigen::VectorXf modifiedAcc;
191 Eigen::VectorXf modifiedTwist;
200 Eigen::Vector3f CoMVecLeft;
201 Eigen::Vector3f forceOffsetLeft;
202 Eigen::Vector3f torqueOffsetLeft;
205 Eigen::Vector3f CoMVecRight;
206 Eigen::Vector3f forceOffsetRight;
207 Eigen::Vector3f torqueOffsetRight;
214 std::vector<std::string> leftJointNames;
215 std::vector<std::string> rightJointNames;
218 VirtualRobot::RobotNodeSetPtr leftRNS;
219 VirtualRobot::RobotNodeSetPtr rightRNS;
220 VirtualRobot::RobotNodePtr tcpLeft;
221 VirtualRobot::RobotNodePtr tcpRight;
223 std::vector<PIDControllerPtr> forcePIDControllers;
227 Eigen::VectorXf filteredOldValue;