26 #include <VirtualRobot/MathTools.h>
32 using namespace CoupledInteractionGroup;
35 MoveTableImpedanceControl::SubClassRegistry
49 getContext<CoupledInteractionGroupStatechartContext>();
52 Eigen::Vector3f zeroVelVec;
53 zeroVelVec << 0.0, 0.0, 0.0;
54 std::string leftTcpName = in.getLeftHandName();
55 std::string rightTcpName = in.getRightHandName();
68 forceRefLeft = DatafieldRefPtr::dynamicCast(
70 forceRefRight = DatafieldRefPtr::dynamicCast(
72 torqueRefLeft = DatafieldRefPtr::dynamicCast(
74 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);
96 local.setDesiredLeftTcpPose(
FramedPose(leftTcpPoseBase,
"Armar3_Base",
"Armar3"));
97 local.setDesiredRightTcpPose(
FramedPose(rightTcpPoseBase,
"Armar3_Base",
"Armar3"));
98 local.setDesiredLeftTcpOrientation(
FramedDirection(desiredLeftRPY,
"Armar3_Base",
"Armar3"));
99 local.setDesiredRightTcpOrientation(
FramedDirection(desiredRightRPY,
"Armar3_Base",
"Armar3"));
100 local.setCurrentLeftTcpOriVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
101 local.setCurrentLeftTcpPosVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
102 local.setCurrentRightTcpOriVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
103 local.setCurrentRightTcpPosVelocity(
FramedDirection(zeroVelVec,
"Armar3_Base",
"Armar3"));
104 local.setCurrentPlatformVelocity(
Vector3(zeroVelVec));
106 local.setinitialForcesReset(
true);
108 int timeout = in.getTimeout();
112 setTimeoutEvent(timeout, createEventTimeout());
120 getContext<CoupledInteractionGroupStatechartContext>();
123 std::string leftTcpName = in.getLeftHandName();
124 std::string rightTcpName = in.getRightHandName();
146 return "MoveTableImpedanceControl";