3 #include <VirtualRobot/RobotNodeSet.h>
6 #include <RobotAPI/libraries/skills/provider/SkillProxy.h>
17 grasp_object::arondto::ExecutePutdownAcceptedType
18 GetDefaultParameterization()
20 grasp_object::arondto::ExecutePutdownAcceptedType
ret;
21 ret.orientationalAccuracy = 0.01;
22 ret.positionalAccuracy = 25;
28 skills::SkillDescription{
"ExecutePutdown",
29 "Execute a putdown for some grasped object",
32 grasp_object::arondto::ExecutePutdownAcceptedType::ToAronType(),
33 GetDefaultParameterization().toAron()};
50 robotReader.connect();
51 objectReader.connect();
52 graspReader.connect();
58 robotReader.getSynchronizedRobot(in.parameters.robotName,
60 VirtualRobot::RobotIO::RobotDescription::eStructure);
70 auto objInstance = objectReader.queryLatestObjectInstance(in.parameters.objectEntityId);
78 ARMARX_CHECK(objInstance->attachment->agentName == in.parameters.robotName);
80 std::string kinematicChainName =
"LeftArm";
81 std::string otherArmKinematicChainName =
"RightArm";
84 kinematicChainName =
"RightArm";
85 otherArmKinematicChainName =
"LeftArm";
92 skills::joint_control::arondto::MoveJointsToPositionAcceptedType params;
93 params.robotName = in.parameters.robotName;
94 params.jointTargetTolerance = 0.03;
95 params.jointMaxSpeed = 0.75;
96 params.accelerationTime = 500;
97 params.setVelocitiesToZeroAtEnd =
true;
99 params.targetJointMap[robot->getRobotNodeSet(otherArmKinematicChainName)
100 ->getNodeNames()[0]] = 0.47;
101 params.targetJointMap[robot->getRobotNodeSet(otherArmKinematicChainName)
102 ->getNodeNames()[1]] = 0.0;
103 params.targetJointMap[robot->getRobotNodeSet(otherArmKinematicChainName)
104 ->getNodeNames()[2]] = 0.0;
105 params.targetJointMap[robot->getRobotNodeSet(otherArmKinematicChainName)
106 ->getNodeNames()[3]] = 0.32;
107 params.targetJointMap[robot->getRobotNodeSet(otherArmKinematicChainName)
108 ->getNodeNames()[4]] = 0.47;
123 skills::joint_control::arondto::MoveJointsToPositionAcceptedType params;
124 params.robotName = in.parameters.robotName;
125 params.jointTargetTolerance = 0.03;
126 params.jointMaxSpeed = 0.75;
127 params.accelerationTime = 500;
128 params.setVelocitiesToZeroAtEnd =
true;
129 params.targetJointMap[
"Neck_1_Pitch"] = 0.6;
144 const auto objPoseLocal = objInstance->objectPoseRobot;
145 const auto objPoseGlobal = robot->getRootNode()->toGlobalCoordinateSystem(objPoseLocal);
146 const auto objectInTCPFrame = objInstance->attachment->poseInFrame;
147 Eigen::Matrix4f tcpPlacePoseGlobal = objPoseGlobal * objectInTCPFrame.inverse();
148 tcpPlacePoseGlobal(2, 3) += 50;
150 auto tcpPlacePrePoseGlobal = tcpPlacePoseGlobal;
151 tcpPlacePrePoseGlobal(2, 3) += 80;
153 std::vector<Eigen::Matrix4f> targetPosesGlobal = {tcpPlacePrePoseGlobal,
156 for (
const auto& tcpTargetPoseGlobal : targetPosesGlobal)
158 skills::tcp_control::arondto::MoveTCPToTargetPoseAcceptedType params;
159 params.robotName = in.parameters.robotName;
160 params.kinematicChainName = kinematicChainName;
161 params.targetPoseGlobal = tcpTargetPoseGlobal;
162 params.orientationalAccuracy = in.parameters.orientationalAccuracy;
163 params.positionalAccuracy = in.parameters.positionalAccuracy;
178 skills::joint_control::arondto::MoveJointsToPositionAcceptedType params;
179 params.robotName = in.parameters.robotName;
180 params.jointTargetTolerance = 0.03;
181 params.jointMaxSpeed = 0.75;
182 params.accelerationTime = 500;
183 params.setVelocitiesToZeroAtEnd =
true;
184 params.targetJointMap[
"Neck_1_Pitch"] = 0.0;