29 #include <VisionX/interface/components/Calibration.h>
30 #include <VisionX/interface/components/HandLocalization.h>
31 #include <VisionX/interface/core/ImageProcessorInterface.h>
33 #include <MemoryX/interface/observers/ObjectMemoryObserverInterface.h>
34 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
38 #include <RobotAPI/interface/units/KinematicUnitInterface.h>
55 defineOptionalProperty<std::string>(
"KinematicUnitName",
"Armar3KinematicUnit",
"Name of the kinematic unit that should be used");
56 defineOptionalProperty<std::string>(
"RobotStateComponentName",
"RobotStateComponent",
"Name of the robot state component that should be used");
57 defineOptionalProperty<std::string>(
"ObjectMemoryObserverName",
"ObjectMemoryObserver",
"Name of the ObjectMemoryObserver component that should be used");
58 defineOptionalProperty<std::string>(
"PriorKnowledgeName",
"PriorKnowledge",
"Name of the PriorKnowledge component that should be used");
61 defineOptionalProperty<std::string>(
"HeadIKUnitName",
"",
"Name of the head unit that should be used.");
62 defineOptionalProperty<std::string>(
"HeadIKKinematicChainName",
"",
"Name of the inematic chain that should be used for head IK.");
74 return "FindAndGraspObjectContext";
83 usingProxy(getProperty<std::string>(
"KinematicUnitObserverName").getValue());
84 usingProxy(getProperty<std::string>(
"KinematicUnitName").getValue());
85 usingProxy(getProperty<std::string>(
"RobotStateComponentName").getValue());
86 usingProxy(getProperty<std::string>(
"ObjectMemoryObserverName").getValue());
87 usingProxy(getProperty<std::string>(
"PriorKnowledgeName").getValue());
90 std::string simPrxName = getProperty<std::string>(
"SimulatorName").getValue();
92 if (!simPrxName.empty())
94 usingProxy(simPrxName);
98 headIKUnitName = getProperty<std::string>(
"HeadIKUnitName").getValue();
100 headIKKinematicChainName = getProperty<std::string>(
"HeadIKKinematicChainName").getValue();
102 if (!headIKUnitName.empty())
104 usingProxy(headIKUnitName);
114 objectMemoryObserver = getProxy<memoryx::ObjectMemoryObserverInterfacePrx>(getProperty<std::string>(
"ObjectMemoryObserverName").getValue());
115 priorMemoryProxy = getProxy<memoryx::PriorKnowledgeInterfacePrx>(getProperty<std::string>(
"PriorKnowledgeName").getValue());
116 std::string rbStateName = getProperty<std::string>(
"RobotStateComponentName").getValue();
117 robotStateComponent = getProxy<RobotStateComponentInterfacePrx>(rbStateName);
118 std::string kinUnitName = getProperty<std::string>(
"KinematicUnitName").getValue();
119 kinematicUnitPrx = getProxy<KinematicUnitInterfacePrx>(kinUnitName);
122 remoteRobot.reset(
new RemoteRobot(robotStateComponent->getSynchronizedRobot()));
132 if (!headIKUnitName.empty())
134 headIKUnitPrx = getProxy<HeadIKUnitInterfacePrx>(headIKUnitName);
135 ARMARX_LOG << eINFO <<
"Fetched headIK proxy " << headIKUnitName <<
":" << headIKUnitPrx <<
", head IK kin chain:" << headIKKinematicChainName <<
flush;