ObjectPoseClientPlugin.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
9
10namespace armarx::plugins
11{
13 {
14 public:
15 using ComponentPlugin::ComponentPlugin;
16
17 objpose::ObjectPoseStorageInterfacePrx createObjectPoseStorage();
19
20 template <class... Ts>
21 std::optional<ObjectInfo>
22 findObject(Ts&&... ts) const
23 {
24 return _finder.findObject(std::forward<Ts>(ts)...);
25 }
26
27 template <class... Ts>
28 VirtualRobot::ManipulationObjectPtr
29 findAndLoadObject(Ts&&... ts) const
30 {
31 return findAndLoadObject(findObject(std::forward<Ts>(ts)...));
32 }
33
34 VirtualRobot::ManipulationObjectPtr
35 findAndLoadObject(const std::optional<ObjectInfo>& ts) const
36 {
37 return _finder.loadManipulationObject(ts);
38 }
39
40 const ObjectFinder& setObjectFinderPath(const std::string& path);
41 const ObjectFinder& getObjectFinder() const;
42
43
44 private:
45 void postCreatePropertyDefinitions(PropertyDefinitionsPtr& properties) override;
46
47 void preOnInitComponent() override;
48 void preOnConnectComponent() override;
49
50 static constexpr const char* PROPERTY_NAME = "ObjectMemoryName";
51
52 ObjectFinder _finder;
53 objpose::ObjectPoseStorageInterfacePrx _objectPoseStorage;
54 };
55} // namespace armarx::plugins
56
58
59namespace armarx
60{
61 /**
62 * @brief Provides an `objpose::ObjectPoseTopicPrx objectPoseTopic` as member variable.
63 */
65 {
66 public:
67 /// Allow usage like: ObjectPoseClient::getObjects()
69
71
73 objpose::ObjectPoseStorageInterfacePrx createObjectPoseStorage();
74
76 objpose::ObjectPoseSeq getObjectPosesByProvider(const std::string& providerName);
77
78
81
82 const ObjectFinder& getObjectFinder() const;
83
84
85 private:
87 };
88} // namespace armarx
ManagedIceObject(ManagedIceObject const &other)
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
ObjectPoseClientPluginUser ObjectPoseClient
Allow usage like: ObjectPoseClient::getObjects()
const ObjectFinder & getObjectFinder() const
objpose::ObjectPoseClient getClient() const
objpose::ObjectPoseSeq getObjectPosesByProvider(const std::string &providerName)
objpose::ObjectPoseStorageInterfacePrx createObjectPoseStorage()
plugins::ObjectPoseClientPlugin & getObjectPoseClientPlugin()
Provides access to the armarx::objpose::ObjectPoseStorageInterface (aka the object memory).
VirtualRobot::ManipulationObjectPtr findAndLoadObject(const std::optional< ObjectInfo > &ts) const
const ObjectFinder & setObjectFinderPath(const std::string &path)
objpose::ObjectPoseStorageInterfacePrx createObjectPoseStorage()
std::optional< ObjectInfo > findObject(Ts &&... ts) const
VirtualRobot::ManipulationObjectPtr findAndLoadObject(Ts &&... ts) const
std::vector< ObjectPose > ObjectPoseSeq
This file is part of ArmarX.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.