31 using namespace CoupledInteractionGroup;
52 std::string sceneName = in.getSceneName();
55 if (!graphSegment->hasScene(sceneName))
58 out.setLandmarkPose(landmarkVector);
59 emitEvLandmarkPoseCalculationFailed();
64 std::string landmark = in.getLandmarkName();
65 auto landmarkNode = graphSegment->getNodeFromSceneByName(sceneName, landmark);
67 if (!graphSegment->hasNodeWithName(sceneName, landmark))
69 ARMARX_WARNING <<
"Target landmark '" << landmark <<
"' doesn't exist in graph " << sceneName <<
flush;
70 auto nodes = graphSegment->getNodesByScene(sceneName);
72 for (
auto& node : nodes)
77 out.setLandmarkPose(landmarkVector);
78 emitEvLandmarkPoseCalculationFailed();
82 if (landmark != landmarkNode->getName())
84 ARMARX_IMPORTANT <<
"Resolved " << landmark <<
" to " << landmarkNode->getName();
87 FramedPosePtr landmarkPose = FramedPosePtr::dynamicCast(landmarkNode->getPose());
91 Eigen::Vector3f pose = landmarkPose->getPosition()->toEigen();
93 out.setLandmarkPose(landmarkVector);
94 emitEvLandmarkPoseCalculated();
110 return "CalculateLandmarkPose";