4 #include <VirtualRobot/VirtualRobot.h>
13 #include <armarx/control/deprecated_njoint_mp_controller/bimanual/ForceMPControllerInterface.h>
17 class SensorValue1DoFActuatorTorque;
18 class SensorValue1DoFActuatorVelocity;
19 class SensorValue1DoFActuatorPosition;
20 class SensorValue1DoFActuatorAcceleration;
21 class ControlTarget1DoFActuatorTorque;
22 class SensorValueForceTorque;
55 const NJointControllerConfigPtr& config,
76 void runDMP(
const Ice::DoubleSeq& goals,
const Ice::Current&);
77 void setGoals(
const Ice::DoubleSeq& goals,
const Ice::Current&);
96 Eigen::VectorXf targetWrench;
98 struct DebugBufferData
100 StringFloatDictionary desired_torques;
102 float modifiedPoseRight_x;
103 float modifiedPoseRight_y;
104 float modifiedPoseRight_z;
105 float currentPoseLeft_x;
106 float currentPoseLeft_y;
107 float currentPoseLeft_z;
109 float modifiedPoseLeft_x;
110 float modifiedPoseLeft_y;
111 float modifiedPoseLeft_z;
112 float currentPoseRight_x;
113 float currentPoseRight_y;
114 float currentPoseRight_z;
124 float modifiedTwist_lx;
125 float modifiedTwist_ly;
126 float modifiedTwist_lz;
127 float modifiedTwist_rx;
128 float modifiedTwist_ry;
129 float modifiedTwist_rz;
135 Eigen::VectorXf wrenchDMP;
136 Eigen::VectorXf computedBoxWrench;
138 Eigen::VectorXf forceImpedance;
139 Eigen::VectorXf forcePID;
140 Eigen::VectorXf forcePIDControlValue;
141 Eigen::VectorXf poseError;
142 Eigen::VectorXf wrenchesConstrained;
143 Eigen::VectorXf wrenchesMeasuredInRoot;
148 struct NJointBimanualForceControllerSensorData
153 Eigen::VectorXf currentTwist;
158 struct NJointBimanualForceControllerInterfaceData
166 std::vector<ControlTarget1DoFActuatorTorque*> leftTargets;
167 std::vector<const SensorValue1DoFActuatorAcceleration*> leftAccelerationSensors;
168 std::vector<const SensorValue1DoFActuatorVelocity*> leftVelocitySensors;
169 std::vector<const SensorValue1DoFActuatorPosition*> leftPositionSensors;
171 std::vector<ControlTarget1DoFActuatorTorque*> rightTargets;
172 std::vector<const SensorValue1DoFActuatorAcceleration*> rightAccelerationSensors;
173 std::vector<const SensorValue1DoFActuatorVelocity*> rightVelocitySensors;
174 std::vector<const SensorValue1DoFActuatorPosition*> rightPositionSensors;
179 NJointBimanualForceControllerConfigPtr cfg;
180 VirtualRobot::DifferentialIKPtr leftIK;
181 VirtualRobot::DifferentialIKPtr rightIK;
189 Eigen::VectorXf leftDesiredJointValues;
190 Eigen::VectorXf rightDesiredJointValues;
196 Eigen::VectorXf KpImpedance;
197 Eigen::VectorXf KdImpedance;
198 Eigen::VectorXf KpAdmittance;
199 Eigen::VectorXf KdAdmittance;
200 Eigen::VectorXf KmAdmittance;
201 Eigen::VectorXf KmPID;
203 Eigen::VectorXf modifiedAcc;
204 Eigen::VectorXf modifiedTwist;
213 Eigen::Vector3f CoMVecLeft;
214 Eigen::Vector3f forceOffsetLeft;
215 Eigen::Vector3f torqueOffsetLeft;
218 Eigen::Vector3f CoMVecRight;
219 Eigen::Vector3f forceOffsetRight;
220 Eigen::Vector3f torqueOffsetRight;
226 std::vector<std::string> leftJointNames;
227 std::vector<std::string> rightJointNames;
230 VirtualRobot::RobotNodeSetPtr leftRNS;
231 VirtualRobot::RobotNodeSetPtr rightRNS;
232 VirtualRobot::RobotNodePtr tcpLeft;
233 VirtualRobot::RobotNodePtr tcpRight;
235 std::vector<PIDControllerPtr> forcePIDControllers;
239 Eigen::VectorXf filteredOldValue;