5 #include <VirtualRobot/Robot.h>
6 #include <VirtualRobot/IK/DifferentialIK.h>
19 #include <armarx/control/deprecated_njoint_mp_controller/bimanual/ObjLevelControllerInterface.h>
72 void runDMP(
const Ice::DoubleSeq& goals,
Ice::Double timeDuration,
const Ice::Current&);
75 void setGoals(
const Ice::DoubleSeq& goals,
const Ice::Current&);
89 void setMPWeights(
const DoubleSeqSeq& weights,
const Ice::Current&);
94 Eigen::VectorXf
calcIK(VirtualRobot::DifferentialIKPtr ik,
const Eigen::MatrixXf& jacobi,
const Eigen::VectorXf& cartesianVel,
const Eigen::VectorXf& nullspaceVel);
103 Eigen::VectorXf targetWrench;
104 struct DebugBufferData
106 StringFloatDictionary desired_vels;
112 float currentPoseLeft_x;
113 float currentPoseLeft_y;
114 float currentPoseLeft_z;
120 float currentPoseRight_x;
121 float currentPoseRight_y;
122 float currentPoseRight_z;
141 struct rt2ControlData
146 Eigen::VectorXf currentTwist;
150 struct ControlInterfaceData
155 Eigen::Vector3f currentObjVel;
160 struct Inferface2rtData
162 Eigen::VectorXf KpImpedance;
163 Eigen::VectorXf KdImpedance;
165 TripleBuffer<Inferface2rtData> interface2rtBuffer;
167 std::vector<ControlTarget1DoFActuatorVelocity*> leftTargets;
168 std::vector<const SensorValue1DoFActuatorVelocity*> leftVelocitySensors;
169 std::vector<const SensorValue1DoFActuatorPosition*> leftPositionSensors;
171 std::vector<ControlTarget1DoFActuatorVelocity*> rightTargets;
172 std::vector<const SensorValue1DoFActuatorVelocity*> rightVelocitySensors;
173 std::vector<const SensorValue1DoFActuatorPosition*> rightPositionSensors;
175 NJointBimanualObjLevelVelControllerConfigPtr cfg;
176 VirtualRobot::DifferentialIKPtr leftIK;
177 VirtualRobot::DifferentialIKPtr rightIK;
185 Eigen::VectorXf leftDesiredJointValues;
186 Eigen::VectorXf rightDesiredJointValues;
192 Eigen::VectorXf KpImpedance;
193 Eigen::VectorXf KdImpedance;
194 Eigen::VectorXf KpAdmittance;
195 Eigen::VectorXf KdAdmittance;
196 Eigen::VectorXf KmAdmittance;
197 Eigen::VectorXf KmPID;
199 Eigen::VectorXf virtualAcc;
200 Eigen::VectorXf virtualVel;
208 Eigen::Vector3f CoMVecLeft;
209 Eigen::Vector3f forceOffsetLeft;
210 Eigen::Vector3f torqueOffsetLeft;
213 Eigen::Vector3f CoMVecRight;
214 Eigen::Vector3f forceOffsetRight;
215 Eigen::Vector3f torqueOffsetRight;
220 std::vector<std::string> leftJointNames;
221 std::vector<std::string> rightJointNames;
224 VirtualRobot::RobotNodeSetPtr leftRNS;
225 VirtualRobot::RobotNodeSetPtr rightRNS;
226 VirtualRobot::RobotNodePtr tcpLeft;
227 VirtualRobot::RobotNodePtr tcpRight;
232 std::vector<PIDControllerPtr> forcePIDControllers;
236 Eigen::VectorXf filteredOldValue;
239 Eigen::VectorXf ftOffset;
243 Eigen::Vector3f objCom2TCPLeftInObjFrame, objCom2TCPRightInObjFrame;