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);
98 const Eigen::Matrix4f graspPoseGlobal =
99 objPose->objectPoseGlobal * grasp.pose.inverse();
100 const Eigen::Matrix4f tcpTargetPoseGlobal = graspPoseGlobal;
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;
114 context.tcpControlSkillProvider,
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
The memory name system (MNS) client.
The VirtualRobotReader class.
grasp_object::arondto::ExecuteGraspAcceptedType ArgType
static SkillDescription Description
ExecuteGraspSkill(armem::client::MemoryNameSystem &mns, armarx::viz::Client &arviz, TwoArmGraspControlSkillContext &)
static SkillDescription Description
manager::dti::SkillManagerInterfacePrx manager
virtual MainResult main()
Override this method with the actual implementation.
SkillID getSkillId() const
Get the id of the skill.
TwoArmGraspControlSkill(armem::client::MemoryNameSystem &mns, armarx::viz::Client &arviz, const std::string &layerName, TwoArmGraspControlSkillContext &c)
TwoArmGraspControlSkillContext & context
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
This file is part of ArmarX.
const char * toString(InteractionFeedbackType type)
A result struct for th main method of a skill.
armarx::viz::Client arviz
armem::client::MemoryNameSystem mns