ArticulatedObjectLocalizerExample.h
Go to the documentation of this file.
1
2
#pragma once
3
4
#include <VirtualRobot/VirtualRobot.h>
5
6
#include <
ArmarXCore/core/Component.h
>
7
#include <
ArmarXCore/core/services/tasks/PeriodicTask.h
>
8
#include <ArmarXCore/interface/observers/ObserverInterface.h>
9
#include <
ArmarXCore/util/tasks.h
>
10
11
#include <
ArmarXGui/libraries/ArmarXGuiComponentPlugins/LightweightRemoteGuiComponentPlugin.h
>
12
13
#include "
RobotAPI/libraries/ArmarXObjects/ObjectID.h
"
14
#include "
RobotAPI/libraries/armem/client/plugins/ReaderWriterPlugin.h
"
15
#include <RobotAPI/interface/armem/mns/MemoryNameSystemInterface.h>
16
#include <RobotAPI/interface/armem/server/MemoryInterface.h>
17
#include <
RobotAPI/libraries/armem/client/plugins.h
>
18
#include <
RobotAPI/libraries/armem/core/Time.h
>
19
#include <
RobotAPI/libraries/armem/core/wm/memory_definitions.h
>
20
#include <
RobotAPI/libraries/armem_objects/client/articulated_object/ArticulatedObjectReader.h
>
21
#include <
RobotAPI/libraries/armem_objects/client/articulated_object/ArticulatedObjectWriter.h
>
22
23
namespace
armarx::articulated_object
24
{
25
26
/**
27
* @defgroup Component-ExampleClient ExampleClient
28
* @ingroup RobotAPI-Components
29
* A description of the component ExampleClient.
30
*
31
* @class ExampleClient
32
* @ingroup Component-ExampleClient
33
* @brief Brief description of class ExampleClient.
34
*
35
* Detailed description of class ExampleClient.
36
*/
37
class
ArticulatedObjectLocalizerExample
:
38
virtual
public
armarx::Component
,
39
virtual
public
armarx::armem::client::ComponentPluginUser
40
{
41
public
:
42
ArticulatedObjectLocalizerExample
();
43
44
/// @see armarx::ManagedIceObject::getDefaultName()
45
std::string
getDefaultName
()
const override
;
46
47
protected
:
48
armarx::PropertyDefinitionsPtr
createPropertyDefinitions
()
override
;
49
50
void
onInitComponent
()
override
;
51
void
onConnectComponent
()
override
;
52
void
onDisconnectComponent
()
override
;
53
void
onExitComponent
()
override
;
54
55
void
run
();
56
57
private
:
58
VirtualRobot::RobotPtr
createArticulatedObject();
59
std::shared_ptr<VirtualRobot::Robot> articulatedObject;
60
61
/// Reference timestamp for object movement
62
armem::Time
start;
63
64
armarx::PeriodicTask<ArticulatedObjectLocalizerExample>::pointer_type
task;
65
66
armarx::DebugObserverInterfacePrx
debugObserver;
67
68
armem::client::plugins::ReaderWriterPlugin
<
69
::armarx::armem::articulated_object::ArticulatedObjectWriter
>*
70
articulatedObjectWriterPlugin =
nullptr
;
71
72
armem::client::plugins::ReaderWriterPlugin
<
73
::armarx::armem::articulated_object::ArticulatedObjectReader
>*
74
articulatedObjectReaderPlugin =
nullptr
;
75
76
struct
Properties
77
{
78
float
updateFrequency{25.F};
79
80
struct
81
{
82
std::string dataset =
"Kitchen"
;
83
std::string className =
"mobile-dishwasher"
;
84
85
std::string readProviderName =
"R003"
;
86
} obj;
87
} p;
88
};
89
90
}
// namespace armarx::articulated_object
armarx::armem::articulated_object::ArticulatedObjectReader
Definition:
ArticulatedObjectReader.h:10
armarx::armem::articulated_object::ArticulatedObjectWriter
Definition:
ArticulatedObjectWriter.h:12
armarx::armem::client::plugins::ReaderWriterPlugin
A component plugin offering client-side access to a reader or writer and manages the lifecycle,...
Definition:
ReaderWriterPlugin.h:44
PeriodicTask.h
ReaderWriterPlugin.h
armarx::articulated_object::ArticulatedObjectLocalizerExample::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition:
ArticulatedObjectLocalizerExample.cpp:54
LightweightRemoteGuiComponentPlugin.h
ArticulatedObjectReader.h
armarx::articulated_object::ArticulatedObjectLocalizerExample::onConnectComponent
void onConnectComponent() override
Pure virtual hook for the subclass.
Definition:
ArticulatedObjectLocalizerExample.cpp:86
armarx::articulated_object::ArticulatedObjectLocalizerExample::onExitComponent
void onExitComponent() override
Hook for subclass.
Definition:
ArticulatedObjectLocalizerExample.cpp:105
armarx::articulated_object::ArticulatedObjectLocalizerExample::onInitComponent
void onInitComponent() override
Pure virtual hook for the subclass.
Definition:
ArticulatedObjectLocalizerExample.cpp:77
armarx::articulated_object::ArticulatedObjectLocalizerExample::run
void run()
Definition:
ArticulatedObjectLocalizerExample.cpp:153
ObjectID.h
armarx::articulated_object
Definition:
ArticulatedObjectLocalizerExample.cpp:45
plugins.h
tasks.h
Component.h
memory_definitions.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition:
Component.h:95
armarx::core::time::DateTime
Represents a point in time.
Definition:
DateTime.h:24
armarx::articulated_object::ArticulatedObjectLocalizerExample::getDefaultName
std::string getDefaultName() const override
Definition:
ArticulatedObjectLocalizerExample.cpp:71
IceUtil::Handle< class PropertyDefinitionContainer >
IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface >
Time.h
armarx::articulated_object::ArticulatedObjectLocalizerExample
Definition:
ArticulatedObjectLocalizerExample.h:37
armarx::armem::client::plugins::ListeningPluginUser
A memory name system client which listens to the memory updates topic (MemoryListenerInterface).
Definition:
ListeningPluginUser.h:23
armarx::articulated_object::ArticulatedObjectLocalizerExample::onDisconnectComponent
void onDisconnectComponent() override
Hook for subclass.
Definition:
ArticulatedObjectLocalizerExample.cpp:99
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition:
Bus.h:18
armarx::articulated_object::ArticulatedObjectLocalizerExample::ArticulatedObjectLocalizerExample
ArticulatedObjectLocalizerExample()
Definition:
ArticulatedObjectLocalizerExample.cpp:47
ArticulatedObjectWriter.h
RobotAPI
components
ArticulatedObjectLocalizerExample
ArticulatedObjectLocalizerExample.h
Generated on Sat Oct 12 2024 09:14:05 for armarx_documentation by
1.8.17