27 #include "VisualServoGroupStatechartContext.generated.h"
31 using namespace VisualServoGroup;
50 VisualServoGroupStatechartContext* context = getContext<VisualServoGroupStatechartContext>();
55 memoryx::ChannelRefBaseSequence instances = context->getObjectMemoryObserver()->getObjectInstances(handMemoryChannel);
57 if (instances.size() == 0)
65 handPosFromMemoryX = ChannelRefPtr::dynamicCast(instances.front())->get<
FramedPosition>(
"position");
68 if (handPosFromMemoryX && (handPosFromMemoryX->toGlobal(context->getRobot())->toEigen()
69 - in.getTcpTargetPose()->toGlobal(context->getRobot())->toEigen().block<3, 1>(0, 3)).norm() > in.getNoObjectUpdateDistance())
73 ChannelRefPtr objectInstanceChannel = in.getObjectInstanceChannel();
74 Literal poseUpdated(objectInstanceChannel->observerName +
"." + objectInstanceChannel->channelName +
".position",
"updated", {});
75 installCondition<ObjectPoseUpdated>(poseUpdated);
106 return "VisualServoTowardsTargetPoseWrapper";