26 #include <VirtualRobot/MathTools.h>
32 using namespace CoupledInteractionGroup;
35 MoveTableAdmittanceControl::SubClassRegistry
49 getContext<CoupledInteractionGroupStatechartContext>();
51 Eigen::Vector3f zeroVelVec;
52 zeroVelVec << 0.0, 0.0, 0.0;
55 std::string leftTcpName = in.getLeftHandName();
56 std::string rightTcpName = in.getRightHandName();
67 forceRefLeft = DatafieldRefPtr::dynamicCast(
69 forceRefRight = DatafieldRefPtr::dynamicCast(
71 torqueRefLeft = DatafieldRefPtr::dynamicCast(
73 torqueRefRight = DatafieldRefPtr::dynamicCast(
88 context->
getRobot()->getRobotNode(in.getLeftHandName())->getPoseInRootFrame();
90 context->
getRobot()->getRobotNode(in.getRightHandName())->getPoseInRootFrame();
92 Eigen::Vector3f desiredLeftRPY;
93 VirtualRobot::MathTools::eigen4f2rpy(leftTcpPoseBase, desiredLeftRPY);
94 Eigen::Vector3f desiredRightRPY;
95 VirtualRobot::MathTools::eigen4f2rpy(rightTcpPoseBase, desiredRightRPY);
100 platformPose(0) = poseRef->getDataField(
"positionX")->getFloat();
101 platformPose(1) = poseRef->getDataField(
"positionY")->getFloat();
102 platformPose(2) = poseRef->getDataField(
"rotation")->getFloat();
104 local.setDesiredLeftTcpPose(
FramedPose(leftTcpPoseBase,
"Armar3_Base",
"Armar3"));
105 local.setDesiredRightTcpPose(
FramedPose(rightTcpPoseBase,
"Armar3_Base",
"Armar3"));
106 local.setDesiredLeftTcpOrientation(
FramedDirection(desiredLeftRPY,
"Armar3_Base",
"Armar3"));
107 local.setDesiredRightTcpOrientation(
FramedDirection(desiredRightRPY,
"Armar3_Base",
"Armar3"));
108 local.setCurrentLeftTcpOriVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
109 local.setCurrentLeftTcpPosVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
110 local.setCurrentRightTcpOriVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
111 local.setCurrentRightTcpPosVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
112 local.setCurrentPlatformVelocity(
Vector3(zeroVelVec));
114 local.setinitialForcesReset(
true);
122 getContext<CoupledInteractionGroupStatechartContext>();
125 std::string leftTcpName = in.getLeftHandName();
126 std::string rightTcpName = in.getRightHandName();
148 return "MoveTableAdmittanceControl";