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