ObjectInstanceMemorySegment.h
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::WorkingMemory
17 * @author Kai Welke ( welke at kit dot edu)
18 * @date 2012
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
26 
31 
32 #include <MemoryX/interface/core/EntityBase.h>
33 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
34 #include <MemoryX/interface/memorytypes/MemorySegments.h>
35 
36 
37 namespace memoryx
38 {
39  /*!
40  The ObjectInstanceMemorySegment is a specialization of the WorkingMemoryEntitySegment template.
41  \see WorkingMemoryEntitySegment
42  */
44  virtual public WorkingMemoryEntitySegment<ObjectInstance>,
45  virtual public ObjectInstanceMemorySegmentBase
46  {
47  public:
48  ObjectInstanceMemorySegment(float matchThreshold, bool matchByClass);
49 
50 
51  ObjectInstanceBasePtr getObjectInstanceById(const ::std::string& id, const ::Ice::Current& = Ice::emptyCurrent) const override;
52 
53 
54  ObjectInstanceBasePtr getObjectInstanceByName(const ::std::string& name, const ::Ice::Current& = Ice::emptyCurrent) const override;
55 
56 
57  ObjectInstanceList getObjectInstancesByClass(const ::std::string& className, const ::Ice::Current& c = Ice::emptyCurrent) const override;
58 
59 
60  ObjectInstanceList getObjectInstancesByClassList(const NameList& classList, const ::Ice::Current& = Ice::emptyCurrent) const override;
61 
62 
63  ObjectInstanceBasePtr getCorrespondingObjectInstance(const ObjectInstanceBasePtr& objectInstance, const ::Ice::Current& = Ice::emptyCurrent) const override;
64 
65 
66  void setNewMotionModel(const ::std::string& entityId, const ::memoryx::MotionModelInterfacePtr& newMotionModel, const ::Ice::Current& = Ice::emptyCurrent) override;
67 
68 
69  void setObjectPose(const std::string& entityId, const armarx::LinkedPoseBasePtr& objectPose, const ::Ice::Current& = Ice::emptyCurrent) override;
70  void setObjectPoseWithoutMotionModel(const std::string& entityId, const armarx::FramedPoseBasePtr& objectPose, const ::Ice::Current& = Ice::emptyCurrent) override;
71 
72 
73  std::string addObjectInstance(const std::string& instanceName, const std::string& className, const armarx::LinkedPoseBasePtr& objectPose,
74  const ::memoryx::MotionModelInterfacePtr& motionModel, const ::Ice::Current& = Ice::emptyCurrent) override;
75 
76 
77  void updateEntity(const std::string& entityId, const EntityBasePtr& update, const ::Ice::Current& = Ice::emptyCurrent) override;
78 
79 
80  void updateEntityInternal(const std::string& entityId, const EntityBasePtr& update, const ::Ice::Current& c = Ice::emptyCurrent)
81  {
83  }
84 
85 
86  void updateEntityInternal(const std::string& entityId, const EntityBasePtr& update, const Ice::StringSeq& deactivatedFusionMethods)
87  {
88  WorkingMemoryEntitySegment::updateEntity(entityId, update, deactivatedFusionMethods);
89  }
90 
91 
92  private:
93  double matchThreshold;
94  bool matchByClass;
95  };
96 
98 
99 }
100 
memoryx::WorkingMemoryEntitySegment::updateEntity
void updateEntity(const std::string &entityId, const EntityBasePtr &update, const ::Ice::Current &c=Ice::emptyCurrent) override
Definition: WorkingMemoryEntitySegment.h:246
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:43
ObjectClass.h
MotionModelObjectFactories.h
IceInternal::Handle< ObjectInstanceMemorySegment >
memoryx::WorkingMemoryEntitySegment
Definition: WorkingMemoryEntitySegment.h:44
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
memoryx::ObjectInstanceMemorySegment::updateEntityInternal
void updateEntityInternal(const std::string &entityId, const EntityBasePtr &update, const Ice::StringSeq &deactivatedFusionMethods)
Definition: ObjectInstanceMemorySegment.h:86
WorkingMemoryEntitySegment.h
armarx::armem::server::ltm::util::mongodb::detail::update
bool update(mongocxx::collection &coll, const nlohmann::json &query, const nlohmann::json &update)
Definition: mongodb.cpp:67
ObjectInstance.h
memoryx::ObjectInstanceMemorySegment::updateEntityInternal
void updateEntityInternal(const std::string &entityId, const EntityBasePtr &update, const ::Ice::Current &c=Ice::emptyCurrent)
Definition: ObjectInstanceMemorySegment.h:80
memoryx::ObjectInstanceMemorySegment
Definition: ObjectInstanceMemorySegment.h:43
ImportExportComponent.h