AgentInstancesSegment.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 Thomas von der Heyde (tvh242 at hotmail dot com)
18 * @date 2014
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #pragma once
24 
26 
27 #include <MemoryX/interface/core/EntityBase.h>
28 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
29 #include <MemoryX/interface/memorytypes/MemorySegments.h>
32 
33 namespace memoryx
34 {
36  virtual public WorkingMemoryEntitySegment<AgentInstance>,
37  virtual public AgentInstancesSegmentBase
38  {
39  public:
41 
42  /*!
43  * Gets all entities of this segment.
44  */
45  AgentInstanceBaseList
46  getAllAgentInstances(const ::Ice::Current& = Ice::emptyCurrent) const override;
47  /*!
48  * Gets the entity with the given ID.
49  * \param id Entity ID.
50  */
51  AgentInstanceBasePtr
52  getAgentInstanceById(const std::string& id,
53  const ::Ice::Current& = Ice::emptyCurrent) const override;
54  /*!
55  * Gets the entity with the given name.
56  * \param name Entity name.
57  */
58  AgentInstanceBasePtr
59  getAgentInstanceByName(const std::string& name,
60  const ::Ice::Current& = Ice::emptyCurrent) const override;
61 
62  armarx::FramedPoseBasePtr
63  convertToWorldPose(const std::string& agentName,
64  const armarx::FramedPoseBasePtr& localPose,
65  const Ice::Current& c = Ice::emptyCurrent) const override;
66  armarx::FramedPoseBasePtr
67  convertToLocalPose(const std::string& agentName,
68  const armarx::PoseBasePtr& worldPose,
69  const std::string& targetFrame,
70  const Ice::Current& c = Ice::emptyCurrent) const override;
71  // EntityMemorySegmentInterface interface
72  std::string addEntity(const EntityBasePtr& entity, const Ice::Current&) override;
73  void updateEntity(const std::string& id,
74  const EntityBasePtr& entity,
75  const Ice::Current&) override;
76 
77  void removeEntity(const ::std::string& id,
78  const ::Ice::Current& = Ice::emptyCurrent) override;
79 
80  void removeAllEntities(const ::Ice::Current& = Ice::emptyCurrent) override;
81 
82 
83  std::string upsertEntity(const std::string& entityId,
84  const EntityBasePtr& newEntity,
85  const ::Ice::Current& = Ice::emptyCurrent) override;
86  std::string upsertEntityByName(const std::string& entityName,
87  const EntityBasePtr& newEntity,
88  const ::Ice::Current& = Ice::emptyCurrent) override;
89 
90  protected:
91  void setRemoteRobotPose(EntityBasePtr entity);
93  };
94 
96 } // namespace memoryx
memoryx::AgentInstancesSegment::ic
armarx::IceManagerPtr ic
Definition: AgentInstancesSegment.h:92
cyberglove_with_calib_22dof.ic
ic
Definition: cyberglove_with_calib_22dof.py:22
memoryx
VirtualRobot headers.
Definition: CommonPlacesTester.cpp:48
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
IceInternal::Handle< AgentInstancesSegment >
memoryx::WorkingMemoryEntitySegment
Definition: WorkingMemoryEntitySegment.h:45
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
memoryx::AgentInstancesSegment
Definition: AgentInstancesSegment.h:35
WorkingMemoryEntitySegment.h
IceUtil::Handle< IceManager >
AgentInstance.h
ImportExportComponent.h