30 using namespace CoupledInteractionGroup;
45 float liftOffset = in.getLiftOffset();
46 Eigen::Matrix4f leftTcpPoseBase = context->
getRobot()->getRobotNode(in.getLeftHandName())->getPoseInRootFrame();
47 Eigen::Matrix4f rightTcpPoseBase = context->
getRobot()->getRobotNode(in.getRightHandName())->getPoseInRootFrame();
48 FramedPosePtr initialLeftTcpPoseBase = in.getInitialLeftTcpPose();
49 FramedPosePtr initialRightTcpPoseBase = in.getInitialRightTcpPose();
51 Eigen::Matrix4f initLeftTcpPoseBase = initialLeftTcpPoseBase->toEigen();
52 Eigen::Matrix4f initRightTcpPoseBase = initialRightTcpPoseBase->toEigen();
53 Eigen::Vector3f leftOrientationVel;
54 leftOrientationVel(0) = 0.0;
55 leftOrientationVel(1) = 0.0;
56 leftOrientationVel(2) = 0.0;
57 Eigen::Vector3f rightOrientationVel;
58 rightOrientationVel(0) = 0.0;
59 rightOrientationVel(1) = 0.0;
60 rightOrientationVel(2) = 0.0;
61 Eigen::Vector3f leftPositionVel;
62 leftPositionVel(0) = 0.0;
63 leftPositionVel(1) = 0.0;
64 leftPositionVel(2) = liftOffset + initLeftTcpPoseBase(2, 3) - leftTcpPoseBase(2, 3);
65 ARMARX_INFO <<
"in check lift height init and current" << initLeftTcpPoseBase(2, 3) <<
" " << leftTcpPoseBase(2, 3);
66 Eigen::Vector3f rightPositionVel;
67 rightPositionVel(0) = 0.0;
68 rightPositionVel(1) = 0.0;
69 rightPositionVel(2) = liftOffset + initRightTcpPoseBase(2, 3) - rightTcpPoseBase(2, 3);
71 if (fabs(rightPositionVel(2)) < 30.0 || fabs(leftPositionVel(2)) < 30.0)
73 leftPositionVel(2) = 0;
74 rightPositionVel(2) = 0;
75 out.setCurrentLeftOrientationVel(
FramedDirection(leftOrientationVel,
"Armar3_Base",
"Armar3"));
76 out.setCurrentRightOrientationVel(
FramedDirection(rightOrientationVel,
"Armar3_Base",
"Armar3"));
77 out.setCurrentLeftPositionVel(
FramedDirection(leftPositionVel,
"Armar3_Base",
"Armar3"));
78 out.setCurrentRightPositionVel(
FramedDirection(rightPositionVel,
"Armar3_Base",
"Armar3"));
79 emitEvLiftHeightReached();
83 out.setCurrentLeftOrientationVel(
FramedDirection(leftOrientationVel,
"Armar3_Base",
"Armar3"));
84 out.setCurrentRightOrientationVel(
FramedDirection(rightOrientationVel,
"Armar3_Base",
"Armar3"));
85 out.setCurrentLeftPositionVel(
FramedDirection(leftPositionVel,
"Armar3_Base",
"Armar3"));
86 out.setCurrentRightPositionVel(
FramedDirection(rightPositionVel,
"Armar3_Base",
"Armar3"));
87 emitEvLiftHeightNotReached();
116 return "CheckLiftHeight";