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
33namespace 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
#define ARMARXCOMPONENT_IMPORT_EXPORT
constexpr T c
armarx::FramedPoseBasePtr convertToWorldPose(const std::string &agentName, const armarx::FramedPoseBasePtr &localPose, const Ice::Current &c=Ice::emptyCurrent) const override
void removeEntity(const ::std::string &id, const ::Ice::Current &=Ice::emptyCurrent) override
AgentInstancesSegment(armarx::IceManagerPtr ic)
void removeAllEntities(const ::Ice::Current &=Ice::emptyCurrent) override
std::string upsertEntityByName(const std::string &entityName, const EntityBasePtr &newEntity, const ::Ice::Current &=Ice::emptyCurrent) override
void setRemoteRobotPose(EntityBasePtr entity)
std::string upsertEntity(const std::string &entityId, const EntityBasePtr &newEntity, const ::Ice::Current &=Ice::emptyCurrent) override
AgentInstanceBaseList getAllAgentInstances(const ::Ice::Current &=Ice::emptyCurrent) const override
AgentInstanceBasePtr getAgentInstanceByName(const std::string &name, const ::Ice::Current &=Ice::emptyCurrent) const override
std::string addEntity(const EntityBasePtr &entity, const Ice::Current &) override
AgentInstanceBasePtr getAgentInstanceById(const std::string &id, const ::Ice::Current &=Ice::emptyCurrent) const override
void updateEntity(const std::string &id, const EntityBasePtr &entity, const Ice::Current &) override
armarx::FramedPoseBasePtr convertToLocalPose(const std::string &agentName, const armarx::PoseBasePtr &worldPose, const std::string &targetFrame, const Ice::Current &c=Ice::emptyCurrent) const override
IceUtil::Handle< IceManager > IceManagerPtr
IceManager smart pointer.
Definition ArmarXFwd.h:39
VirtualRobot headers.
IceInternal::Handle< AgentInstancesSegment > AgentInstancesSegmentPtr