37 usingProxy(getProperty<std::string>(
"OLPName").getValue());
38 usingProxy(getProperty<std::string>(
"OLPObserverName").getValue());
39 usingProxy(getProperty<std::string>(
"ImageProviderName").getValue());
40 usingProxy(getProperty<std::string>(
"KinematicUnitName").getValue());
48 armarx::NameControlModeMap controlMode;
49 controlMode[
"Neck_1_Pitch"] = armarx::ePositionControl;
50 controlMode[
"Cameras"] = armarx::ePositionControl;
53 jointValues[
"Neck_1_Pitch"] = 0.3;
54 jointValues[
"Cameras"] = -0.3;
57 std::vector<std::string> imageFilePathsLeft, imageFilePathsRight;
65 imageFilePathsLeft.push_back(
66 "/homes/staff/schieben/datalog/YCB/Head/09-Frenchs-Mustard/snapshot_left_0000.bmp");
67 imageFilePathsRight.push_back(
68 "/homes/staff/schieben/datalog/YCB/Head/09-Frenchs-Mustard/snapshot_right_0000.bmp");
113 imageFilePathsLeft.clear();
114 imageFilePathsLeft.push_back(
115 "/homes/staff/schieben/datalog/YCB/Head/reco-test/img_pos/snapshot_left_0000.bmp");
116 imageFilePathsRight.push_back(
117 "/homes/staff/schieben/datalog/YCB/Head/reco-test/img_pos/snapshot_right_0000.bmp");
119 std::vector<std::string> objectNames;
120 objectNames.push_back(
"Orange");
122 for (
size_t objectNumber = 0; objectNumber < imageFilePathsLeft.size(); objectNumber++)
125 imageFilePathsRight.at(objectNumber));
129 for (
int i = 0; i < 6; i++)
131 p->
olpProxy->recognizeObject(objectNames.at(objectNumber));
146 for (
size_t objectNumber = 0; objectNumber < imageFilePathsLeft.size(); objectNumber++)
149 imageFilePathsRight.at(objectNumber));
157 p->
olpProxy->CreateInitialObjectHypotheses();
167 ->getDataField(
new armarx::DataFieldIdentifierBase(
168 "ObjectLearningByPushingObserver",
170 "initialHypothesesCreated"))
172 }
while (olpStatus == 0);
177 <<
"Creation of initial hypotheses failed, skipping this object";
188 p->
olpProxy->ValidateInitialObjectHypotheses();
198 ->getDataField(
new armarx::DataFieldIdentifierBase(
199 "ObjectLearningByPushingObserver",
201 "hypothesesValidated"))
203 }
while (olpStatus == 0);
208 <<
"Validation of initial hypotheses failed, skipping this object";
215 for (
int i = 2; i <= 5; i++)
219 p->
olpProxy->RevalidateConfirmedObjectHypotheses();
229 ->getDataField(
new armarx::DataFieldIdentifierBase(
230 "ObjectLearningByPushingObserver",
232 "hypothesesValidated"))
234 }
while (olpStatus == 0);
238 ARMARX_WARNING_S <<
"Validation of hypotheses failed, skipping this object";
244 <<
" of " << imageFilePathsLeft.size();
254 olpProxy = getProxy<ObjectLearningByPushingInterfacePrx>(
255 getProperty<std::string>(
"OLPName").getValue());
257 getProperty<std::string>(
"OLPObserverName").getValue());
259 getProperty<std::string>(
"ImageProviderName").getValue());
261 getProperty<std::string>(
"KinematicUnitName").getValue());
262 bool testRecognition = getProperty<bool>(
"TestRecognition").getValue();
264 std::thread t([=,
this]() {
evaluateOLP(
this, testRecognition); });