ObjectPoseClientPlugin.cpp
Go to the documentation of this file.
2 
4 
5 namespace armarx::plugins
6 {
7  void
8  ObjectPoseClientPlugin::postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties)
9  {
10  if (!properties->hasDefinition(makePropertyName(PROPERTY_NAME)))
11  {
12  properties->defineOptionalProperty<std::string>(
13  makePropertyName(PROPERTY_NAME), "ObjectMemory", "Name of the object memory.");
14  }
15  }
16 
17  void
18  ObjectPoseClientPlugin::preOnInitComponent()
19  {
20  parent<Component>().usingProxyFromProperty(makePropertyName(PROPERTY_NAME));
21  }
22 
23  void
24  ObjectPoseClientPlugin::preOnConnectComponent()
25  {
26  _objectPoseStorage = createObjectPoseStorage();
27  }
28 
31  {
32  return parent<Component>().getProxyFromProperty<objpose::ObjectPoseStorageInterfacePrx>(
33  makePropertyName(PROPERTY_NAME));
34  }
35 
38  {
40  }
41 
42  const ObjectFinder&
44  {
45  _finder.setPath(path);
46  return _finder;
47  }
48 
49  const ObjectFinder&
51  {
52  return _finder;
53  }
54 } // namespace armarx::plugins
55 
56 namespace armarx
57 {
59  {
60  addPlugin(plugin);
61  }
62 
65  {
66  return plugin->createObjectPoseStorage();
67  }
68 
71  {
72  return plugin->createClient();
73  }
74 
77  {
78  return getClient().fetchObjectPoses();
79  }
80 
83  {
84  return getClient().fetchObjectPosesFromProvider(providerName);
85  }
86 
89  {
90  return *plugin;
91  }
92 
95  {
96  return *plugin;
97  }
98 
99  const ObjectFinder&
101  {
102  return plugin->getObjectFinder();
103  }
104 } // namespace armarx
armarx::objpose::ObjectPoseClient::fetchObjectPoses
ObjectPoseSeq fetchObjectPoses() const
Fetch all known object poses.
Definition: ObjectPoseClient.cpp:34
armarx::ObjectPoseStorageInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::objpose::ObjectPoseStorageInterface > ObjectPoseStorageInterfacePrx
Definition: ObjectPoseClientWidget.h:57
armarx::objpose::ObjectPoseSeq
std::vector< ObjectPose > ObjectPoseSeq
Definition: forward_declarations.h:20
armarx::plugins::ObjectPoseClientPlugin::getObjectFinder
const ObjectFinder & getObjectFinder() const
Definition: ObjectPoseClientPlugin.cpp:50
armarx::plugins::ObjectPoseClientPlugin::createObjectPoseStorage
objpose::ObjectPoseStorageInterfacePrx createObjectPoseStorage()
Definition: ObjectPoseClientPlugin.cpp:30
ObjectPoseClientPlugin.h
armarx::ManagedIceObject::addPlugin
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
Definition: ManagedIceObject.h:186
armarx::objpose::ObjectPoseClient
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
Definition: ObjectPoseClient.h:17
armarx::ObjectFinder
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
Definition: ObjectFinder.h:22
armarx::ObjectFinder::setPath
void setPath(const std::string &path)
Definition: ObjectFinder.cpp:23
armarx::plugins
This file is part of ArmarX.
Definition: DebugObserverComponentPlugin.cpp:27
armarx::ObjectPoseClientPluginUser::createObjectPoseStorage
objpose::ObjectPoseStorageInterfacePrx createObjectPoseStorage()
Definition: ObjectPoseClientPlugin.cpp:64
armarx::plugins::ObjectPoseClientPlugin::createClient
objpose::ObjectPoseClient createClient()
Definition: ObjectPoseClientPlugin.cpp:37
armarx::ObjectPoseClientPluginUser::getObjectFinder
const ObjectFinder & getObjectFinder() const
Definition: ObjectPoseClientPlugin.cpp:100
Component.h
armarx::ObjectPoseClientPluginUser::ObjectPoseClientPluginUser
ObjectPoseClientPluginUser()
Definition: ObjectPoseClientPlugin.cpp:58
armarx::plugins::ObjectPoseClientPlugin
Definition: ObjectPoseClientPlugin.h:12
armarx::ManagedIceObjectPlugin::makePropertyName
std::string makePropertyName(const std::string &name)
Definition: ManagedIceObjectPlugin.cpp:56
armarx::plugins::ObjectPoseClientPlugin::setObjectFinderPath
const ObjectFinder & setObjectFinderPath(const std::string &path)
Definition: ObjectPoseClientPlugin.cpp:43
armarx::ObjectPoseClientPluginUser::getObjectPoseClientPlugin
plugins::ObjectPoseClientPlugin & getObjectPoseClientPlugin()
Definition: ObjectPoseClientPlugin.cpp:88
armarx::ObjectPoseClientPluginUser::getClient
objpose::ObjectPoseClient getClient() const
Definition: ObjectPoseClientPlugin.cpp:70
armarx::PropertyDefinitionsPtr
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
Definition: forward_declarations.h:35
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
armarx::ObjectPoseClientPluginUser::getObjectPoses
objpose::ObjectPoseSeq getObjectPoses()
Definition: ObjectPoseClientPlugin.cpp:76
armarx::ObjectPoseClientPluginUser::getObjectPosesByProvider
objpose::ObjectPoseSeq getObjectPosesByProvider(const std::string &providerName)
Definition: ObjectPoseClientPlugin.cpp:82
armarx::objpose::ObjectPoseClient::fetchObjectPosesFromProvider
ObjectPoseSeq fetchObjectPosesFromProvider(const std::string &providerName) const
Fetch object poses from a specific provider.
Definition: ObjectPoseClient.cpp:85