33 #include <VirtualRobot/ManipulationObject.h>
34 #include <VirtualRobot/Grasping/Grasp.h>
35 #include <VirtualRobot/Grasping/GraspSet.h>
38 using namespace ObjectLocalization;
46 memoryx::PersistentObjectClassSegmentBasePrx objectClassesSegment = getPriorKnowledge()->getObjectClassesSegment();
47 memoryx::CommonStorageInterfacePrx commonStorage = getPriorKnowledge()->getCommonStorage();
50 std::string objectName;
51 if (in.isObjectInstanceChannelSet())
54 objectName = in.getObjectInstanceChannel()->getDataField(
"className")->getString();
56 else if (in.isObjectNameSet())
59 objectName = in.isObjectNameSet();
67 ARMARX_INFO <<
"retrieving grasp " << in.getGraspName() <<
" from grasp set " << in.getGraspSetName() <<
" for object " << objectName;
69 memoryx::EntityBasePtr entity = objectClassesSegment->getEntityByName(objectName);
73 VirtualRobot::ManipulationObjectPtr manipulationObject = simoxWrapper->getManipulationObject();
75 VirtualRobot::GraspSetPtr graspSet = manipulationObject->getGraspSet(in.getGraspSetName());
78 VirtualRobot::GraspPtr grasp = graspSet->getGrasp(in.getGraspName());
82 ARMARX_ERROR <<
"No grasp with name " << in.getGraspName() <<
" found! ";
88 out.setGraspOffset(
new Pose(graspPose));
94 ARMARX_ERROR <<
"No grasp set with name " << in.getGraspSetName() <<
" found! ";