3 #include <VirtualRobot/VirtualRobot.h>
10 #include <armarx/control/deprecated_njoint_mp_controller/bimanual/ObjLevelControllerInterface.h>
14 class SensorValue1DoFActuatorTorque;
15 class SensorValue1DoFActuatorVelocity;
16 class SensorValue1DoFActuatorPosition;
17 class ControlTarget1DoFActuatorVelocity;
18 class ControlTarget1DoFActuatorTorque;
19 class SensorValueForceTorque;
43 const NJointControllerConfigPtr& config,
77 void runDMP(
const Ice::DoubleSeq& goals,
Ice::Double timeDuration,
const Ice::Current&);
79 const Ice::DoubleSeq& goals,
83 void setGoals(
const Ice::DoubleSeq& goals,
const Ice::Current&);
98 void setMPWeights(
const DoubleSeqSeq& weights,
const Ice::Current&);
101 void setMPRotWeights(
const DoubleSeqSeq& weights,
const Ice::Current&);
103 Eigen::VectorXf
calcIK(VirtualRobot::DifferentialIKPtr ik,
104 const Eigen::MatrixXf& jacobi,
105 const Eigen::VectorXf& cartesianVel,
106 const Eigen::VectorXf& nullspaceVel);
118 Eigen::VectorXf targetWrench;
120 struct DebugBufferData
122 StringFloatDictionary desired_vels;
128 float currentPoseLeft_x;
129 float currentPoseLeft_y;
130 float currentPoseLeft_z;
136 float currentPoseRight_x;
137 float currentPoseRight_y;
138 float currentPoseRight_z;
157 struct rt2ControlData
162 Eigen::VectorXf currentTwist;
167 struct ControlInterfaceData
172 Eigen::Vector3f currentObjVel;
177 struct Inferface2rtData
179 Eigen::VectorXf KpImpedance;
180 Eigen::VectorXf KdImpedance;
183 TripleBuffer<Inferface2rtData> interface2rtBuffer;
185 std::vector<ControlTarget1DoFActuatorVelocity*> leftTargets;
186 std::vector<const SensorValue1DoFActuatorVelocity*> leftVelocitySensors;
187 std::vector<const SensorValue1DoFActuatorPosition*> leftPositionSensors;
189 std::vector<ControlTarget1DoFActuatorVelocity*> rightTargets;
190 std::vector<const SensorValue1DoFActuatorVelocity*> rightVelocitySensors;
191 std::vector<const SensorValue1DoFActuatorPosition*> rightPositionSensors;
193 NJointBimanualObjLevelVelControllerConfigPtr cfg;
194 VirtualRobot::DifferentialIKPtr leftIK;
195 VirtualRobot::DifferentialIKPtr rightIK;
203 Eigen::VectorXf leftDesiredJointValues;
204 Eigen::VectorXf rightDesiredJointValues;
210 Eigen::VectorXf KpImpedance;
211 Eigen::VectorXf KdImpedance;
212 Eigen::VectorXf KpAdmittance;
213 Eigen::VectorXf KdAdmittance;
214 Eigen::VectorXf KmAdmittance;
215 Eigen::VectorXf KmPID;
217 Eigen::VectorXf virtualAcc;
218 Eigen::VectorXf virtualVel;
226 Eigen::Vector3f CoMVecLeft;
227 Eigen::Vector3f forceOffsetLeft;
228 Eigen::Vector3f torqueOffsetLeft;
231 Eigen::Vector3f CoMVecRight;
232 Eigen::Vector3f forceOffsetRight;
233 Eigen::Vector3f torqueOffsetRight;
238 std::vector<std::string> leftJointNames;
239 std::vector<std::string> rightJointNames;
242 VirtualRobot::RobotNodeSetPtr leftRNS;
243 VirtualRobot::RobotNodeSetPtr rightRNS;
244 VirtualRobot::RobotNodePtr tcpLeft;
245 VirtualRobot::RobotNodePtr tcpRight;
250 std::vector<PIDControllerPtr> forcePIDControllers;
254 Eigen::VectorXf filteredOldValue;
257 Eigen::VectorXf ftOffset;
261 Eigen::Vector3f objCom2TCPLeftInObjFrame, objCom2TCPRightInObjFrame;