14 grasp_object::arondto::ExecuteGraspAcceptedType
15 GetDefaultParameterization()
17 grasp_object::arondto::ExecuteGraspAcceptedType ret;
18 ret.orientationalAccuracy = 0.01;
19 ret.positionalAccuracy = 25;
25 .skillId = {.skillName =
"ExecuteGrasp"},
26 .description =
"Execute a graspset on some object",
27 .rootProfileDefaults = GetDefaultParameterization().toAron(),
29 .parametersType = grasp_object::arondto::ExecuteGraspAcceptedType::ToAronType(),
57 VirtualRobot::RobotIO::RobotDescription::eStructure);
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)
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;
113 SkillProxy prx(
manager, SkillID{
114 .providerId = ProviderID{.providerName =
context.tcpControlSkillProvider},
117 if (prx.executeSkill(in.executorName, params.toAron())
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
The memory name system (MNS) client.
std::optional< armem::grasping::arondto::KnownGraspInfo > queryKnownGraspInfoByEntityName(const std::string &, const armem::Time &)
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
std::optional< objpose::ObjectPose > queryLatestObjectInstance(const ObjectID &instanceId)
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
virtual void connect(armem::client::MemoryNameSystem &memoryNameSystem)
The VirtualRobotReader class.
VirtualRobot::RobotPtr getSynchronizedRobot(const std::string &name, const VirtualRobot::RobotIO::RobotDescription &loadMode=VirtualRobot::RobotIO::RobotDescription::eStructure, bool blocking=true)
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.
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.
A result struct for th main method of a skill.
armarx::viz::Client arviz
armem::client::MemoryNameSystem & mns