3#include <VirtualRobot/RobotNodeSet.h>
12 .skillId = {.skillName =
"OpenHandAndDetach"},
13 .description =
"Open the hand and detach an object from it",
15 .parametersType = grasp_object::arondto::OpenHandAndDetachAcceptedType::ToAronType(),
43 VirtualRobot::RobotIO::RobotDescription::eStructure);
61 skills::hand_control::arondto::OpenHandAcceptedType params;
62 params.kinematicChainName = in.parameters.kinematicChainName;
64 SkillProxy prx(
manager, SkillID{
65 .providerId = ProviderID{.providerName =
context.handControlSkillProvider},
67 auto su = prx.executeSkill(in.executorName, params.toAron());
77 auto objPoseInRootFrame = objInstance->objectPoseRobot;
78 auto robotPoseGlobal = robot->getRootNode()->getGlobalPose();
80 auto newObjPoseGlobal = robotPoseGlobal * objPoseInRootFrame;
84 armem::arondto::ObjectInstance arondto;
97 return {su.status,
nullptr};
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
The memory name system (MNS) client.
std::optional< objpose::ObjectPose > queryLatestObjectInstance(const ObjectID &instanceId)
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
void connect(armem::client::MemoryNameSystem &memoryNameSystem)
bool commitObject(const armem::arondto::ObjectInstance &inst, const std::string &provider, const armem::Time &)
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)
bool synchronizeRobot(VirtualRobot::Robot &robot, const armem::Time ×tamp) const
Synchronize both the platform pose and the joint values of a virtual robot, according to the robot st...
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.
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.
A result struct for th main method of a skill.
armarx::viz::Client arviz
armem::client::MemoryNameSystem & mns