32 #include <RobotAPI/interface/units/KinematicUnitInterface.h>
36 #include <VisionX/interface/components/Calibration.h>
37 #include <VisionX/interface/components/HandLocalization.h>
38 #include <VisionX/interface/core/ImageProcessorInterface.h>
40 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
41 #include <MemoryX/interface/observers/ObjectMemoryObserverInterface.h>
55 defineOptionalProperty<std::string>(
"KinematicUnitName",
56 "Armar3KinematicUnit",
57 "Name of the kinematic unit that should be used");
58 defineOptionalProperty<std::string>(
59 "RobotStateComponentName",
60 "RobotStateComponent",
61 "Name of the robot state component that should be used");
62 defineOptionalProperty<std::string>(
63 "ObjectMemoryObserverName",
64 "ObjectMemoryObserver",
65 "Name of the ObjectMemoryObserver component that should be used");
66 defineOptionalProperty<std::string>(
69 "Name of the PriorKnowledge component that should be used");
72 defineOptionalProperty<std::string>(
73 "HeadIKUnitName",
"",
"Name of the head unit that should be used.");
74 defineOptionalProperty<std::string>(
75 "HeadIKKinematicChainName",
77 "Name of the inematic chain that should be used for head IK.");
89 return "FindAndGraspObjectContext";
99 usingProxy(getProperty<std::string>(
"KinematicUnitObserverName").getValue());
100 usingProxy(getProperty<std::string>(
"KinematicUnitName").getValue());
101 usingProxy(getProperty<std::string>(
"RobotStateComponentName").getValue());
102 usingProxy(getProperty<std::string>(
"ObjectMemoryObserverName").getValue());
103 usingProxy(getProperty<std::string>(
"PriorKnowledgeName").getValue());
106 std::string simPrxName = getProperty<std::string>(
"SimulatorName").getValue();
108 if (!simPrxName.empty())
110 usingProxy(simPrxName);
114 headIKUnitName = getProperty<std::string>(
"HeadIKUnitName").getValue();
116 headIKKinematicChainName =
117 getProperty<std::string>(
"HeadIKKinematicChainName").getValue();
119 if (!headIKUnitName.empty())
121 usingProxy(headIKUnitName);
132 objectMemoryObserver = getProxy<memoryx::ObjectMemoryObserverInterfacePrx>(
133 getProperty<std::string>(
"ObjectMemoryObserverName").getValue());
134 priorMemoryProxy = getProxy<memoryx::PriorKnowledgeInterfacePrx>(
135 getProperty<std::string>(
"PriorKnowledgeName").getValue());
136 std::string rbStateName =
137 getProperty<std::string>(
"RobotStateComponentName").getValue();
138 robotStateComponent = getProxy<RobotStateComponentInterfacePrx>(rbStateName);
139 std::string kinUnitName = getProperty<std::string>(
"KinematicUnitName").getValue();
140 kinematicUnitPrx = getProxy<KinematicUnitInterfacePrx>(kinUnitName);
143 remoteRobot.reset(
new RemoteRobot(robotStateComponent->getSynchronizedRobot()));
153 if (!headIKUnitName.empty())
155 headIKUnitPrx = getProxy<HeadIKUnitInterfacePrx>(headIKUnitName);
156 ARMARX_LOG << eINFO <<
"Fetched headIK proxy " << headIKUnitName <<
":"
157 << headIKUnitPrx <<
", head IK kin chain:" << headIKKinematicChainName