3#include <VirtualRobot/RobotNodeSet.h>
5#include <RobotAPI/libraries/skills/provider/SkillProxy.h>
13 "Open the hand and detach an object from it",
16 grasp_object::arondto::OpenHandAndDetachAcceptedType::ToAronType()};
33 robotReader.connect();
34 objectWriter.connect();
35 objectReader.connect();
41 robotReader.getSynchronizedRobot(in.parameters.robotName,
43 VirtualRobot::RobotIO::RobotDescription::eStructure);
53 auto objInstance = objectReader.queryLatestObjectInstance(in.parameters.objectEntityId);
61 skills::hand_control::arondto::OpenHandAcceptedType params;
62 params.kinematicChainName = in.parameters.kinematicChainName;
66 auto su = prx.executeFullSkill(
getSkillId().
toString(in.executorName), params.toAron());
69 objInstance = objectReader.queryLatestObjectInstance(in.parameters.objectEntityId);
76 auto objPoseInRootFrame = objInstance->objectPoseRobot;
77 auto robotPoseGlobal = robot->getRootNode()->getGlobalPose();
79 auto newObjPoseGlobal = robotPoseGlobal * objPoseInRootFrame;
83 armem::arondto::ObjectInstance arondto;
94 objectWriter.commitObject(arondto, objInstance->providerName,
armem::Time::Now());
96 return {su.status,
nullptr};
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
The memory name system (MNS) client.
The VirtualRobotReader class.
grasp_object::arondto::OpenHandAndDetachAcceptedType ArgType
OpenHandAndDetachSkill(armem::client::MemoryNameSystem &mns, armarx::viz::Client &arviz, TwoArmGraspControlSkillContext &)
static SkillDescription Description
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_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#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