27 #include <RobotAPI/interface/components/ViewSelectionInterface.h>
35 using namespace VisualServoGroup;
40 TwoArmVisualServoTest::SubClassRegistry
51 TwoArmVisualServoTest::getChannelRef(std::string objectName)
54 VisualServoGroupStatechartContext* context = getContext<VisualServoGroupStatechartContext>();
55 ChannelRefBasePtr memoryChannel =
56 context->getObjectMemoryObserver()->requestObjectClassRepeated(
57 objectName, 250, armarx::DEFAULT_VIEWTARGET_PRIORITY);
61 memoryChannel->validate();
62 return ChannelRefPtr::dynamicCast(memoryChannel);
75 std::string leftObjectName = in.getLeftObjectName();
76 local.setLeftObjectMemoryChannel(getChannelRef(leftObjectName));
78 std::string rightObjectName = in.getRightObjectName();
79 if (leftObjectName != rightObjectName)
81 local.setRightObjectMemoryChannel(getChannelRef(rightObjectName));
85 local.setRightObjectMemoryChannel(local.getLeftObjectMemoryChannel());
89 std::string leftHandNameInMemory = in.getLeftHandNameInMemory();
90 local.setLeftHandMemoryChannel(getChannelRef(leftHandNameInMemory));
92 std::string rightHandNameInMemory = in.getRightHandNameInMemory();
93 local.setRightHandMemoryChannel(getChannelRef(rightHandNameInMemory));
95 VisualServoGroupStatechartContext* context = getContext<VisualServoGroupStatechartContext>();
100 std::string frameName =
101 context->getRobotStateComponent()->getSynchronizedRobot()->getRootNode()->getName();
102 std::string agentName = context->getRobotStateComponent()->getSynchronizedRobot()->getName();
103 Eigen::Vector3f targetPos;
108 context->getViewSelection()->addManualViewTarget(viewTarget);
113 context->getViewSelection()->addManualViewTarget(viewTarget);
118 context->getViewSelection()->addManualViewTarget(viewTarget);
123 context->getViewSelection()->addManualViewTarget(viewTarget);