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 
29 
30 #include <MemoryX/interface/core/EntityBase.h>
31 #include <MemoryX/interface/memorytypes/MemoryEntities.h>
32 #include <MemoryX/interface/memorytypes/MemorySegments.h>
33 
34 
35 namespace memoryx
36 {
38  virtual public WorkingMemoryEntitySegment<AgentInstance>,
39  virtual public AgentInstancesSegmentBase
40  {
41  public:
42 
44 
45  /*!
46  * Gets all entities of this segment.
47  */
48  AgentInstanceBaseList getAllAgentInstances(const ::Ice::Current& = Ice::emptyCurrent) const override;
49  /*!
50  * Gets the entity with the given ID.
51  * \param id Entity ID.
52  */
53  AgentInstanceBasePtr getAgentInstanceById(const std::string& id, const ::Ice::Current& = Ice::emptyCurrent) const override;
54  /*!
55  * Gets the entity with the given name.
56  * \param name Entity name.
57  */
58  AgentInstanceBasePtr getAgentInstanceByName(const std::string& name, const ::Ice::Current& = Ice::emptyCurrent) const override;
59 
60  armarx::FramedPoseBasePtr convertToWorldPose(const std::string& agentName, const armarx::FramedPoseBasePtr& localPose, const Ice::Current& c = Ice::emptyCurrent) const override;
61  armarx::FramedPoseBasePtr convertToLocalPose(const std::string& agentName, const armarx::PoseBasePtr& worldPose, const std::string& targetFrame, const Ice::Current& c = Ice::emptyCurrent) const override;
62  // EntityMemorySegmentInterface interface
63  std::string addEntity(const EntityBasePtr& entity, const Ice::Current&) override;
64  void updateEntity(const std::string& id, const EntityBasePtr& entity, const Ice::Current&) override;
65 
66  void removeEntity(const ::std::string& id, const ::Ice::Current& = Ice::emptyCurrent) override;
67 
68  void removeAllEntities(const ::Ice::Current& = Ice::emptyCurrent) override;
69 
70 
71  std::string upsertEntity(const std::string& entityId, const EntityBasePtr& newEntity, const::Ice::Current& = Ice::emptyCurrent) override;
72  std::string upsertEntityByName(const std::string& entityName, const EntityBasePtr& newEntity, const::Ice::Current& = Ice::emptyCurrent) override;
73  protected:
74  void setRemoteRobotPose(EntityBasePtr entity);
76 
77  };
78 
80 }
81 
memoryx::AgentInstancesSegment::ic
armarx::IceManagerPtr ic
Definition: AgentInstancesSegment.h:75
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:43
IceInternal::Handle< AgentInstancesSegment >
memoryx::WorkingMemoryEntitySegment
Definition: WorkingMemoryEntitySegment.h:44
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
memoryx::AgentInstancesSegment
Definition: AgentInstancesSegment.h:37
WorkingMemoryEntitySegment.h
IceUtil::Handle< IceManager >
AgentInstance.h
ImportExportComponent.h