EnvironmentalPrimitive.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package MemoryX::Core
17 * @author Peter Kaiser <peter dot kaiser at kit dot edu>
18 * @date 2014
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #include "EnvironmentalPrimitive.h"
24 
26 
28 
29 #include <SimoxUtility/algorithm/string/string_tools.h>
31 
32 namespace memoryx
33 {
34  EnvironmentalPrimitive::EnvironmentalPrimitive(const std::string& name, const std::string& id, const std::string& shape) :
35  Entity()
36  {
37  setName(name);
38  setId(id);
39  setShape(shape);
40  }
41 
42  std::string EnvironmentalPrimitive::getShape(const Ice::Current& c) const
43  {
44  return getAttributeValue("shape")->getString();
45  }
46 
47  armarx::Vector3BasePtr memoryx::EnvironmentalPrimitive::getOBBDimensions(const Ice::Current&) const
48  {
49  return getAttributeValue("dimensionsOBB")->getClass<armarx::Vector3Base>();
50  }
51 
52  void memoryx::EnvironmentalPrimitive::setOBBDimensions(const armarx::Vector3BasePtr& dimensions, const Ice::Current&)
53  {
54  putAttribute("dimensionsOBB", dimensions);
55  }
56 
57  armarx::FramedPoseBasePtr memoryx::EnvironmentalPrimitive::getPose(const Ice::Current&) const
58  {
59  return getAttributeValue("pose")->getClass<armarx::FramedPoseBase>();
60  }
61 
62  void memoryx::EnvironmentalPrimitive::setPose(const armarx::FramedPoseBasePtr& pose, const Ice::Current&)
63  {
64  putAttribute("pose", pose);
65  }
66 
67  PointList memoryx::EnvironmentalPrimitive::getGraspPoints(const Ice::Current&) const
68  {
69  auto entity = getAttribute("graspPoints");
70  if (!entity || entity->size() <= 0)
71  {
72  return PointList();
73  }
74 
75  Eigen::MatrixXf m = armarx::VariantPtr::dynamicCast(entity->getValueAt(0))->getClass<armarx::MatrixFloat>()->toEigen();
76 
77  PointList result;
78  result.reserve(m.cols());
79 
80  for (unsigned int i = 0; i < m.cols(); i++)
81  {
82  result.push_back(new armarx::Vector3(Eigen::Vector3f(m.block<3, 1>(0, i))));
83  }
84 
85  return result;
86  }
87 
88  void EnvironmentalPrimitive::setGraspPoints(const PointList& graspPoints, const Ice::Current& c)
89  {
90  Eigen::MatrixXf m(3, graspPoints.size());
91 
92  for (unsigned int i = 0; i < graspPoints.size(); i++)
93  {
94  m.block<3, 1>(0, i) = armarx::Vector3Ptr::dynamicCast(graspPoints[i])->toEigen();
95  }
96 
97  armarx::MatrixFloatBasePtr matrix(new armarx::MatrixFloat(m));
98 
100  variant->set<armarx::MatrixFloat>(matrix);
101 
102  EntityAttributeBasePtr entity = new EntityAttribute("graspPoints");
103  entity->addValue(variant);
104  putAttribute(entity);
105  }
106 
107 
108 
109  PointList memoryx::EnvironmentalPrimitive::getInliers(const Ice::Current&) const
110  {
111  auto entity = getAttribute("inliers");
112  if (!entity || entity->size() <= 0)
113  {
114  return PointList();
115  }
116 
117  Eigen::MatrixXf m = armarx::VariantPtr::dynamicCast(entity->getValueAt(0))->getClass<armarx::MatrixFloat>()->toEigen();
118 
119  PointList result;
120  result.reserve(m.cols());
121 
122  for (unsigned int i = 0; i < m.cols(); i++)
123  {
124  result.push_back(new armarx::Vector3(Eigen::Vector3f(m.block<3, 1>(0, i))));
125  }
126 
127  return result;
128  }
129 
130  void EnvironmentalPrimitive::setInliers(const PointList& inliers, const Ice::Current& c)
131  {
132  Eigen::MatrixXf m(3, inliers.size());
133 
134  for (unsigned int i = 0; i < inliers.size(); i++)
135  {
136  m.block<3, 1>(0, i) = armarx::Vector3Ptr::dynamicCast(inliers[i])->toEigen();
137  }
138 
139  armarx::MatrixFloatBasePtr matrix(new armarx::MatrixFloat(m));
140 
141  armarx::VariantPtr variant(new armarx::Variant);
142  variant->set<armarx::MatrixFloat>(matrix);
143 
144  EntityAttributeBasePtr entity = new EntityAttribute("inliers");
145  entity->addValue(variant);
146  putAttribute(entity);
147  }
148 
149  float memoryx::EnvironmentalPrimitive::getProbability(const Ice::Current&) const
150  {
151  return getAttributeValue("probability")->getFloat();
152  }
153 
154  void memoryx::EnvironmentalPrimitive::setProbability(float probability, const Ice::Current&)
155  {
156  putAttribute("probability", probability);
157  }
158 
160  {
161  return getAttributeValue("circularityprobability")->getFloat();
162  }
163 
164  void memoryx::EnvironmentalPrimitive::setCircularityProbability(float probability, const Ice::Current&)
165  {
166  putAttribute("circularityprobability", probability);
167  }
168 
169  float memoryx::EnvironmentalPrimitive::getLength(const Ice::Current&) const
170  {
171  return getAttributeValue("length")->getFloat();
172  }
173 
174  void memoryx::EnvironmentalPrimitive::setLength(float length, const Ice::Current&)
175  {
176  putAttribute("length", length);
177  }
178 
179  int EnvironmentalPrimitive::getLabel(const Ice::Current& c) const
180  {
181  return getAttributeValue("label")->getInt();
182  }
183 
184  void EnvironmentalPrimitive::setLabel(int label, const Ice::Current& c)
185  {
186  putAttribute("label", label);
187  }
188 
189  armarx::TimestampBasePtr memoryx::EnvironmentalPrimitive::getTime(const Ice::Current&) const
190  {
191  return getAttributeValue("time")->getClass<armarx::TimestampBase>();
192  }
193 
194  void memoryx::EnvironmentalPrimitive::setTime(const armarx::TimestampBasePtr& time, const Ice::Current&)
195  {
196  putAttribute("time", time);
197  }
198 
199  armarx::MatrixFloatBasePtr EnvironmentalPrimitive::getSampling(const Ice::Current& c) const
200  {
201  auto entity = getAttribute("sampling");
202  if (!entity || entity->size() <= 0)
203  {
204  return armarx::MatrixFloatBasePtr(new armarx::MatrixFloat(4, 0));
205  }
206 
207  return armarx::VariantPtr::dynamicCast(entity->getValueAt(0))->getClass<armarx::MatrixFloat>();
208  }
209 
210  void EnvironmentalPrimitive::setSampling(const armarx::MatrixFloatBasePtr& sampling, const Ice::Current& c)
211  {
212  armarx::VariantPtr variant(new armarx::Variant);
213  variant->set<armarx::MatrixFloat>(sampling);
214 
215  EntityAttributeBasePtr entity = new EntityAttribute("sampling");
216  entity->addValue(variant);
217  putAttribute(entity);
218  }
219 
221  {
222  return this->clone();
223  }
224 
226  {
228  return ret;
229  }
230 
231  void EnvironmentalPrimitive::setShape(const std::string& shape, const Ice::Current& c)
232  {
233  putAttribute("shape", shape);
234  }
235 
236 
237  memoryx::PlanePrimitive::PlanePrimitive(const std::string& name, const std::string& id) :
238  EnvironmentalPrimitive(name, id, "plane")
239  {
240  }
241 
242  memoryx::PlanePrimitive::PlanePrimitive(std::vector<float>& coeffs) :
243  EnvironmentalPrimitive("", "", "plane")
244  {
245  armarx::Vector3BasePtr planeNormal = new armarx::Vector3(coeffs[0], coeffs[1], coeffs[2]);
246  setPlaneNormal(planeNormal);
247  setPlaneDistance(coeffs[3]);
248  }
249 
250  armarx::Vector3BasePtr memoryx::PlanePrimitive::getPlaneNormal(const Ice::Current&) const
251  {
252  return getAttributeValue("normal")->getClass<armarx::Vector3Base>();
253  }
254 
255  void memoryx::PlanePrimitive::setPlaneNormal(const armarx::Vector3BasePtr& normal, const Ice::Current&)
256  {
257  putAttribute("normal", normal);
258  }
259 
260  float memoryx::PlanePrimitive::getPlaneDistance(const Ice::Current&) const
261  {
262  return getAttributeValue("distance")->getFloat();
263  }
264 
265  void memoryx::PlanePrimitive::setPlaneDistance(float distance, const Ice::Current&)
266  {
267  putAttribute("distance", distance);
268  }
269 
271  {
272  return this->clone();
273  }
274 
276  {
277  PlanePrimitivePtr ret = new PlanePrimitive(*this);
278  return ret;
279  }
280 
281 
282  memoryx::SpherePrimitive::SpherePrimitive(const std::string& name, const std::string& id) :
283  EnvironmentalPrimitive(name, id, "sphere")
284  {
285  }
286 
287  memoryx::SpherePrimitive::SpherePrimitive(std::vector<float>& coeffs) :
288  EnvironmentalPrimitive("", "", "sphere")
289  {
290  setSphereCenter(new armarx::Vector3(coeffs[0], coeffs[1], coeffs[2]));
291  setSphereRadius(coeffs[3]);
292  }
293 
294 
295  armarx::Vector3BasePtr SpherePrimitive::getSphereCenter(const Ice::Current& c) const
296  {
297  return getAttributeValue("center")->getClass<armarx::Vector3Base>();
298  }
299 
300  void SpherePrimitive::setSphereCenter(const armarx::Vector3BasePtr& center, const Ice::Current& c)
301  {
302  putAttribute("center", center);
303  }
304 
305  float SpherePrimitive::getSphereRadius(const Ice::Current& c) const
306  {
307  return getAttributeValue("radius")->getFloat();
308  }
309 
310  void SpherePrimitive::setSphereRadius(float radius, const Ice::Current& c)
311  {
312  putAttribute("radius", radius);
313  }
314 
316  {
317  return this->clone();
318  }
319 
321  {
323  return ret;
324  }
325 
326 
327  memoryx::CylinderPrimitive::CylinderPrimitive(const std::string& name, const std::string& id) :
328  EnvironmentalPrimitive(name, id, "cylinder")
329  {
330  }
331 
332  memoryx::CylinderPrimitive::CylinderPrimitive(std::vector<float>& coeffs) :
333  EnvironmentalPrimitive("", "", "cylinder")
334  {
335  Eigen::Vector3f base;
336  base << coeffs[0], coeffs[1], coeffs[2];
337 
338  Eigen::Vector3f direction;
339  direction << coeffs[3], coeffs[4], coeffs[5];
340 
342  setCylinderAxisDirection(new armarx::Vector3(direction.normalized()));
343  setCylinderRadius(coeffs[6]);
344  setLength(direction.norm());
345  }
346 
347  armarx::Vector3BasePtr CylinderPrimitive::getCylinderPoint(const Ice::Current& c) const
348  {
349  return getAttributeValue("point")->getClass<armarx::Vector3Base>();
350  }
351 
352  void CylinderPrimitive::setCylinderPoint(const armarx::Vector3BasePtr& point, const Ice::Current& c)
353  {
354  putAttribute("point", point);
355  }
356 
357  armarx::Vector3BasePtr CylinderPrimitive::getCylinderAxisDirection(const Ice::Current& c) const
358  {
359  return getAttributeValue("axis")->getClass<armarx::Vector3Base>();
360  }
361 
362  void CylinderPrimitive::setCylinderAxisDirection(const armarx::Vector3BasePtr& axis, const Ice::Current& c)
363  {
364  putAttribute("axis", axis);
365  }
366 
367  float CylinderPrimitive::getCylinderRadius(const Ice::Current& c) const
368  {
369  return getAttributeValue("radius")->getFloat();
370  }
371 
372  void CylinderPrimitive::setCylinderRadius(float radius, const Ice::Current& c)
373  {
374  putAttribute("radius", radius);
375  }
376 
378  {
379  return this->clone();
380  }
381 
383  {
385  return ret;
386  }
387 
388 
389  ConePrimitive::ConePrimitive(const std::string& name, const std::string& id) :
390  EnvironmentalPrimitive(name, id, "cone")
391  {
392  }
393 
394  ConePrimitive::ConePrimitive(std::vector<float>& coeffs) :
395  EnvironmentalPrimitive("", "", "cone")
396  {
397  setConeApex(new armarx::Vector3(coeffs[0], coeffs[1], coeffs[2]));
398  setConeAxisDirection(new armarx::Vector3(coeffs[3], coeffs[4], coeffs[5]));
399  setConeOpeningAngle(coeffs[6]);
400  }
401 
402  armarx::Vector3BasePtr ConePrimitive::getConeApex(const Ice::Current& c) const
403  {
404  return getAttributeValue("apex")->getClass<armarx::Vector3Base>();
405  }
406 
407  void ConePrimitive::setConeApex(const armarx::Vector3BasePtr& apex, const Ice::Current& c)
408  {
409  putAttribute("apex", apex);
410  }
411 
412  armarx::Vector3BasePtr ConePrimitive::getConeAxisDirection(const Ice::Current& c) const
413  {
414  return getAttributeValue("axis")->getClass<armarx::Vector3Base>();
415  }
416 
417  void ConePrimitive::setConeAxisDirection(const armarx::Vector3BasePtr& axis, const Ice::Current& c)
418  {
419  putAttribute("axis", axis);
420  }
421 
422  float ConePrimitive::getConeOpeningAngle(const Ice::Current&) const
423  {
424  return getAttributeValue("angle")->getFloat();
425  }
426 
427  void ConePrimitive::setConeOpeningAngle(float angle, const Ice::Current& c)
428  {
429  putAttribute("angle", angle);
430  }
431 
433  {
434  return this->clone();
435  }
436 
437  ConePrimitivePtr ConePrimitive::clone(const Ice::Current& c) const
438  {
439  ConePrimitivePtr ret = new ConePrimitive(*this);
440  return ret;
441  }
442 
443 
444 
445  BoxPrimitive::BoxPrimitive(const std::string& name, const std::string& id) :
446  EnvironmentalPrimitive(name, id, "box")
447  {
448  }
449 
450 
451  memoryx::EntityRefList BoxPrimitive::getBoxSides(const Ice::Current& c) const
452  {
453  memoryx::EntityRefList result;
454  EntityAttributeBasePtr attribute = getAttribute("sides");
455  for (int i = 0; i < attribute->size(); i++)
456  {
457  armarx::VariantPtr value = armarx::VariantPtr::dynamicCast(attribute->getValueAt(i));
458  result.push_back(value->get<EntityRefBase>());
459  }
460  return result;
461  }
462 
463  void BoxPrimitive::setBoxSides(const memoryx::EntityRefList& sides, const Ice::Current& c)
464  {
465  EntityAttributePtr attribute = new EntityAttribute("sides");
466  for (memoryx::EntityRefBasePtr ref : sides)
467  {
468  attribute->addValue(new armarx::Variant(ref));
469  }
470  putAttribute(attribute);
471  }
472 
473 
474 
475 
477  {
478  return this->clone();
479  }
480 
481  BoxPrimitivePtr BoxPrimitive::clone(const Ice::Current& c) const
482  {
483  BoxPrimitivePtr ret = new BoxPrimitive(*this);
484  return ret;
485  }
486 
487 
488 
489  HigherSemanticStructure::HigherSemanticStructure(const std::string& name, const std::string& id) :
490  EnvironmentalPrimitive(name, id, "structure")
491  {
492  }
493 
494 
495  memoryx::EntityRefList HigherSemanticStructure::getPrimitives(const Ice::Current& c) const
496  {
497  memoryx::EntityRefList result;
498  EntityAttributeBasePtr attribute = getAttribute("primitives");
499  for (int i = 0; i < attribute->size(); i++)
500  {
501  armarx::VariantPtr value = armarx::VariantPtr::dynamicCast(attribute->getValueAt(i));
502  result.push_back(value->get<EntityRefBase>());
503  }
504  return result;
505  }
506 
507  void HigherSemanticStructure::setPrimitives(const memoryx::EntityRefList& primitives, const Ice::Current& c)
508  {
509  EntityAttributePtr attribute = new EntityAttribute("primitives");
510  for (memoryx::EntityRefBasePtr ref : primitives)
511  {
512  attribute->addValue(new armarx::Variant(ref));
513  }
514  putAttribute(attribute);
515  }
516 
517 
518 
519  void HigherSemanticStructure::setLabels(const Ice::StringSeq& labels, const Ice::Current& c)
520  {
521  return putAttribute("labels", simox::alg::join(labels, ","));
522  }
523 
524 
525  Ice::StringSeq HigherSemanticStructure::getLabels(const Ice::Current&) const
526  {
527  std::string attrValue = getAttributeValue("labels")->getString();
528  std::vector<std::string> labels = armarx::Split(attrValue, ",");
529  return labels;
530  }
531 
532 
534  {
535  return this->clone();
536  }
537 
539  {
541  return ret;
542  }
543 }
memoryx::CylinderPrimitive::CylinderPrimitive
CylinderPrimitive(const std::string &name="", const std::string &id="")
Definition: EnvironmentalPrimitive.cpp:327
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:224
EnvironmentalPrimitive.h
memoryx::EnvironmentalPrimitive::setPose
void setPose(const armarx::FramedPoseBasePtr &pose, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:62
memoryx::PlanePrimitive::PlanePrimitive
PlanePrimitive(const std::string &name="", const std::string &id="")
Definition: EnvironmentalPrimitive.cpp:237
armarx::aron::ret
ReaderT::InputType T & ret
Definition: rw.h:21
memoryx::EnvironmentalPrimitive::getShape
std::string getShape(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:42
memoryx::HigherSemanticStructure::getPrimitives
EntityRefList getPrimitives(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:495
memoryx::EnvironmentalPrimitive::setTime
void setTime(const armarx::TimestampBasePtr &time, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:194
memoryx::VariantType::PlanePrimitive
const armarx::VariantTypeId PlanePrimitive
Definition: EnvironmentalPrimitive.h:38
memoryx::PlanePrimitive::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:270
armarx::viz::toEigen
Eigen::Matrix4f toEigen(data::GlobalPose const &pose)
Definition: Interaction.h:46
memoryx::Entity::putAttribute
void putAttribute(const ::memoryx::EntityAttributeBasePtr &attr, const ::Ice::Current &=Ice::emptyCurrent) override
Store attribute in entity.
Definition: Entity.cpp:327
memoryx::PlanePrimitive::clone
PlanePrimitivePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:275
memoryx::Entity::getAttribute
EntityAttributeBasePtr getAttribute(const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve attribute from entity.
Definition: Entity.cpp:293
MatrixVariant.h
memoryx::CylinderPrimitive::getCylinderAxisDirection
armarx::Vector3BasePtr getCylinderAxisDirection(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:357
memoryx::SpherePrimitive::clone
SpherePrimitivePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:320
memoryx::EnvironmentalPrimitive::clone
EnvironmentalPrimitivePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:225
armarx::Split
std::vector< std::string > Split(const std::string &source, const std::string &splitBy, bool trimElements=false, bool removeEmptyElements=false)
Definition: StringHelperTemplates.h:35
memoryx::SpherePrimitive::getSphereCenter
armarx::Vector3BasePtr getSphereCenter(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:295
memoryx::VariantType::SpherePrimitive
const armarx::VariantTypeId SpherePrimitive
Definition: EnvironmentalPrimitive.h:39
memoryx::HigherSemanticStructure::setPrimitives
void setPrimitives(const EntityRefList &primitives, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:507
memoryx::EnvironmentalPrimitive::getCircularityProbability
float getCircularityProbability(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:159
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
memoryx::ConePrimitive::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:432
memoryx::SpherePrimitive::setSphereRadius
void setSphereRadius(float radius, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:310
memoryx::ConePrimitive::getConeApex
armarx::Vector3BasePtr getConeApex(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:402
memoryx::ConePrimitive::getConeAxisDirection
armarx::Vector3BasePtr getConeAxisDirection(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:412
memoryx::EnvironmentalPrimitive::EnvironmentalPrimitive
EnvironmentalPrimitive(const std::string &name="", const std::string &id="", const std::string &shape="")
Definition: EnvironmentalPrimitive.cpp:34
memoryx::ConePrimitive::ConePrimitive
ConePrimitive(const std::string &name="", const std::string &id="")
Definition: EnvironmentalPrimitive.cpp:389
memoryx::EnvironmentalPrimitive::getTime
armarx::TimestampBasePtr getTime(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:189
memoryx::ConePrimitive::getConeOpeningAngle
float getConeOpeningAngle(const Ice::Current &) const override
Definition: EnvironmentalPrimitive.cpp:422
memoryx::ConePrimitive::setConeApex
void setConeApex(const armarx::Vector3BasePtr &apex, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:407
memoryx::Entity::getAttributeValue
virtual armarx::VariantPtr getAttributeValue(const ::std::string &attrName) const
Retrieve value of an attribute from entity.
Definition: Entity.cpp:308
memoryx::EnvironmentalPrimitive::getPose
armarx::FramedPoseBasePtr getPose(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:57
StringHelpers.h
memoryx::EnvironmentalPrimitive
Definition: EnvironmentalPrimitive.h:51
IceInternal::Handle< Variant >
memoryx::CylinderPrimitive::setCylinderPoint
void setCylinderPoint(const armarx::Vector3BasePtr &point, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:352
memoryx::VariantType::CylinderPrimitive
const armarx::VariantTypeId CylinderPrimitive
Definition: EnvironmentalPrimitive.h:40
memoryx::SpherePrimitive::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:315
memoryx::BoxPrimitive::setBoxSides
void setBoxSides(const EntityRefList &sides, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:463
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
memoryx::EnvironmentalPrimitive::setCircularityProbability
void setCircularityProbability(float probability, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:164
FramedPose.h
memoryx::PlanePrimitive::setPlaneNormal
void setPlaneNormal(const armarx::Vector3BasePtr &normal, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:255
memoryx::EnvironmentalPrimitive::getLabel
int getLabel(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:179
memoryx::EnvironmentalPrimitive::setProbability
void setProbability(float probability, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:154
memoryx::EnvironmentalPrimitive::getSampling
armarx::MatrixFloatBasePtr getSampling(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:199
armarx::MatrixFloat
The MatrixFloat class.
Definition: MatrixVariant.h:48
armarx::Vector3
The Vector3 class.
Definition: Pose.h:112
memoryx::EnvironmentalPrimitive::getProbability
float getProbability(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:149
memoryx::CylinderPrimitive::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:377
memoryx::EnvironmentalPrimitive::getLength
float getLength(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:169
memoryx::CylinderPrimitive::setCylinderRadius
void setCylinderRadius(float radius, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:372
memoryx::Entity::setId
void setId(const ::std::string &id, const ::Ice::Current &=Ice::emptyCurrent) override
Set id of this entity.
Definition: Entity.cpp:167
memoryx::PlanePrimitive::setPlaneDistance
void setPlaneDistance(float distance, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:265
memoryx::HigherSemanticStructure::clone
HigherSemanticStructurePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:538
memoryx::SpherePrimitive::SpherePrimitive
SpherePrimitive(const std::string &name="", const std::string &id="")
Definition: EnvironmentalPrimitive.cpp:282
memoryx::PlanePrimitive::getPlaneNormal
armarx::Vector3BasePtr getPlaneNormal(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:250
memoryx::HigherSemanticStructure::setLabels
void setLabels(const Ice::StringSeq &labels, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:519
memoryx::EnvironmentalPrimitive::setGraspPoints
void setGraspPoints(const PointList &graspPoints, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:88
memoryx::CylinderPrimitive::setCylinderAxisDirection
void setCylinderAxisDirection(const armarx::Vector3BasePtr &axis, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:362
memoryx::BoxPrimitive::clone
BoxPrimitivePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:481
memoryx::SpherePrimitive::getSphereRadius
float getSphereRadius(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:305
memoryx::CylinderPrimitive::getCylinderRadius
float getCylinderRadius(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:367
memoryx::EnvironmentalPrimitive::setInliers
void setInliers(const PointList &inliers, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:130
memoryx::HigherSemanticStructure::HigherSemanticStructure
HigherSemanticStructure(const std::string &name="", const std::string &id="")
Definition: EnvironmentalPrimitive.cpp:489
memoryx::HigherSemanticStructure::getLabels
Ice::StringSeq getLabels(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:525
memoryx::KBM::Vector3
Eigen::Vector3d Vector3
Definition: kbm.h:41
memoryx::SpherePrimitive::setSphereCenter
void setSphereCenter(const armarx::Vector3BasePtr &center, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:300
memoryx::EntityAttribute
Attribute of MemoryX entities.
Definition: EntityAttribute.h:48
angle
double angle(const Point &a, const Point &b, const Point &c)
Definition: point.hpp:100
memoryx::ConePrimitive::setConeAxisDirection
void setConeAxisDirection(const armarx::Vector3BasePtr &axis, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:417
memoryx::EnvironmentalPrimitive::getGraspPoints
PointList getGraspPoints(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:67
memoryx::BoxPrimitive::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:476
distance
double distance(const Point &a, const Point &b)
Definition: point.hpp:88
memoryx::ConePrimitive::setConeOpeningAngle
void setConeOpeningAngle(float angle, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:427
armarx::aron::type::ObjectPtr
std::shared_ptr< Object > ObjectPtr
Definition: Object.h:36
memoryx::BoxPrimitive::BoxPrimitive
BoxPrimitive(const std::string &name="", const std::string &id="")
Definition: EnvironmentalPrimitive.cpp:445
memoryx::EnvironmentalPrimitive::setShape
void setShape(const std::string &shape, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:231
memoryx::Entity
Definition: Entity.h:246
memoryx::EnvironmentalPrimitive::setOBBDimensions
void setOBBDimensions(const armarx::Vector3BasePtr &dimensions, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:52
memoryx::CylinderPrimitive::clone
CylinderPrimitivePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:382
memoryx::EnvironmentalPrimitive::getOBBDimensions
armarx::Vector3BasePtr getOBBDimensions(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:47
memoryx::EnvironmentalPrimitive::getInliers
PointList getInliers(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:109
memoryx::Entity::setName
void setName(const ::std::string &name, const ::Ice::Current &=Ice::emptyCurrent) override
Set name of this entity.
Definition: Entity.cpp:179
memoryx::EnvironmentalPrimitive::setSampling
void setSampling(const armarx::MatrixFloatBasePtr &sampling, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:210
memoryx::CylinderPrimitive::getCylinderPoint
armarx::Vector3BasePtr getCylinderPoint(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:347
memoryx::BoxPrimitive::getBoxSides
EntityRefList getBoxSides(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:451
memoryx::ConePrimitive::clone
ConePrimitivePtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Definition: EnvironmentalPrimitive.cpp:437
memoryx::HigherSemanticStructure::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:533
memoryx::EnvironmentalPrimitive::setLabel
void setLabel(int label, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:184
memoryx::EnvironmentalPrimitive::ice_clone
Ice::ObjectPtr ice_clone() const override
Definition: EnvironmentalPrimitive.cpp:220
memoryx::EnvironmentalPrimitive::setLength
void setLength(float length, const Ice::Current &c=Ice::emptyCurrent) override
Definition: EnvironmentalPrimitive.cpp:174
memoryx::PlanePrimitive::getPlaneDistance
float getPlaneDistance(const Ice::Current &c=Ice::emptyCurrent) const override
Definition: EnvironmentalPrimitive.cpp:260