VirtualRobotWriterExample.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <VirtualRobot/VirtualRobot.h>
5
8#include <ArmarXCore/interface/observers/ObserverInterface.h>
10
12
15#include <RobotAPI/interface/armem/mns/MemoryNameSystemInterface.h>
16#include <RobotAPI/interface/armem/server/MemoryInterface.h>
20
22{
23
24 /**
25 * @defgroup Component-VirtualRobotWriterExample VirtualRobotWriterExample
26 * @ingroup RobotAPI-Components
27 * A description of the component VirtualRobotWriterExample.
28 *
29 * @class VirtualRobotWriterExample
30 * @ingroup Component-VirtualRobotWriterExample
31 * @brief Brief description of class VirtualRobotWriterExample.
32 *
33 * Detailed description of class VirtualRobotWriterExample.
34 */
36 virtual public armarx::Component,
38 {
39 public:
41
42 /// @see armarx::ManagedIceObject::getDefaultName()
43 std::string getDefaultName() const override;
44
45 protected:
47
48 void onInitComponent() override;
49 void onConnectComponent() override;
50 void onDisconnectComponent() override;
51 void onExitComponent() override;
52
53 void run();
54
55 private:
56 VirtualRobot::RobotPtr loadRobot() const;
58
59 /// Reference timestamp for object movement
60 armem::Time start;
61
63
65 virtualRobotWriterPlugin = nullptr;
66
67 struct Properties
68 {
69 float updateFrequency{10.F};
70
71 struct
72 {
73 std::string package;
74 std::string path;
75 } robot;
76 } p;
77 };
78
79} // namespace armarx::virtual_robot_writer_example
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
A component plugin offering client-side access to a reader or writer and manages the lifecycle,...
void onInitComponent() override
Pure virtual hook for the subclass.
void onConnectComponent() override
Pure virtual hook for the subclass.
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
plugins::ListeningPluginUser ComponentPluginUser
Definition plugins.h:10
armarx::core::time::DateTime Time
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.