4 #include <RobotAPI/libraries/skills/provider/SkillProxy.h>
14 grasp_object::arondto::ExecuteGraspAcceptedType
15 GetDefaultParameterization()
17 grasp_object::arondto::ExecuteGraspAcceptedType
ret;
18 ret.orientationalAccuracy = 0.01;
19 ret.positionalAccuracy = 25;
25 skills::SkillDescription{
"ExecuteGrasp",
26 "Execute a graspset on some object",
29 grasp_object::arondto::ExecuteGraspAcceptedType::ToAronType(),
30 GetDefaultParameterization().toAron()};
47 robotReader.connect();
48 objectReader.connect();
49 graspReader.connect();
55 robotReader.getSynchronizedRobot(in.parameters.robotName,
57 VirtualRobot::RobotIO::RobotDescription::eStructure);
67 auto objInstance = objectReader.queryLatestObjectInstance(in.parameters.objectEntityId);
77 auto graspInfo = graspReader.queryKnownGraspInfoByEntityName(in.parameters.objectEntityId,
85 if (
const auto& it = graspInfo->graspSets.find(in.parameters.graspSetName);
86 it == graspInfo->graspSets.end())
88 ARMARX_ERROR <<
"Grasp set name " << in.parameters.graspSetName <<
" not found.";
92 for (
const auto& grasp : graspInfo->graspSets.at(in.parameters.graspSetName).grasps)
96 auto objPose = objectReader.queryLatestObjectInstance(in.parameters.objectEntityId);
99 objPose->objectPoseGlobal * grasp.pose.inverse();
106 skills::tcp_control::arondto::MoveTCPToTargetPoseAcceptedType params;
107 params.robotName = in.parameters.robotName;
108 params.kinematicChainName = in.parameters.kinematicChainName;
109 params.targetPoseGlobal = tcpTargetPoseGlobal;
110 params.orientationalAccuracy = in.parameters.orientationalAccuracy;
111 params.positionalAccuracy = in.parameters.positionalAccuracy;