3 #include <VirtualRobot/Grasping/GraspSet.h>
4 #include <VirtualRobot/ManipulationObject.h>
5 #include <VirtualRobot/RobotNodeSet.h>
8 #include <RobotAPI/libraries/skills/provider/SkillProxy.h>
14 grasp_object::arondto::PutdownObjectAcceptedType
15 GetDefaultParameterization()
17 grasp_object::arondto::PutdownObjectAcceptedType
ret;
18 ret.platformOrientationalAccuracy = 0.1;
19 ret.platformPositionalAccuracy = 10;
20 ret.tcpOrientationalAccuracy = 0.1;
21 ret.tcpPositionalAccuracy = 20;
27 SkillDescription{
"PutdownObject",
28 "Putdown an object already in hand of robot",
31 grasp_object::arondto::PutdownObjectAcceptedType::ToAronType(),
32 GetDefaultParameterization().toAron()};
50 robotReader.connect();
51 objectReader.connect();
52 graspReader.connect();
53 objectWriter.connect();
59 robotReader.getSynchronizedRobot(in.parameters.robotName,
61 VirtualRobot::RobotIO::RobotDescription::eStructure);
66 auto objInstance = objectReader.queryLatestObjectInstance(in.parameters.objectEntityId);
74 ARMARX_CHECK(objInstance->attachment->agentName == in.parameters.robotName);
76 std::string kinematicChainName =
"LeftArm";
79 kinematicChainName =
"RightArm";
88 skills::grasp_object::arondto::MovePlatformForPutdownAcceptedType params;
89 params.robotName = in.parameters.robotName;
90 params.orientationalAccuracy = in.parameters.platformOrientationalAccuracy;
91 params.positionalAccuracy = in.parameters.platformPositionalAccuracy;
92 params.objectEntityId = in.parameters.objectEntityId;
93 params.tcpName = robot->getRobotNodeSet(kinematicChainName)->getTCP()->getName();
107 skills::grasp_object::arondto::ExecutePutdownAcceptedType params;
108 params.robotName = in.parameters.robotName;
109 params.orientationalAccuracy = in.parameters.platformOrientationalAccuracy;
110 params.positionalAccuracy = in.parameters.platformPositionalAccuracy;
111 params.objectEntityId = in.parameters.objectEntityId;
124 skills::grasp_object::arondto::OpenHandAndDetachAcceptedType params;
125 params.kinematicChainName = kinematicChainName;
126 params.objectEntityId = in.parameters.objectEntityId;
127 params.robotName = in.parameters.robotName;
144 tcpOffset(0, 3) = 90;
145 tcpOffset(1, 3) = 10;
148 robot->getRobotNodeSet(kinematicChainName)->getTCP()->getGlobalPose() * tcpOffset;
150 skills::tcp_control::arondto::MoveTCPToTargetPoseAcceptedType params;
151 params.robotName = in.parameters.robotName;
152 params.kinematicChainName = kinematicChainName;
153 params.targetPoseGlobal = tcpTargetPoseGlobal;
154 params.orientationalAccuracy = in.parameters.tcpOrientationalAccuracy;
155 params.positionalAccuracy = in.parameters.tcpPositionalAccuracy;
170 skills::joint_control::arondto::MoveJointsToPositionAcceptedType params;
171 params.robotName = in.parameters.robotName;
172 params.jointTargetTolerance = 0.03;
173 params.jointMaxSpeed = 0.75;
174 params.accelerationTime = 500;
175 params.setVelocitiesToZeroAtEnd =
true;
177 for (
const auto& j : robot->getRobotNodeSet(kinematicChainName)->getAllRobotNodes())
179 params.targetJointMap[j->getName()] = 0.0;
195 skills::grasp_object::arondto::MovePlatformAfterPutdownAcceptedType params;
196 params.robotName = in.parameters.robotName;
197 params.orientationalAccuracy = in.parameters.platformOrientationalAccuracy;
198 params.positionalAccuracy = in.parameters.platformPositionalAccuracy;