SimpleVirtualRobot.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <VirtualRobot/VirtualRobot.h>
5
8
9// #include <ArmarXGui/libraries/ArmarXGuiComponentPlugins/LightweightRemoteGuiComponentPlugin.h>
10
14
16{
17
18 /**
19 * @defgroup Component-SimpleVirtualRobot SimpleVirtualRobot
20 * @ingroup RobotAPI-Components
21 * Simply loads a Simox robot model and commits it to the memory.
22 *
23 * @class SimpleVirtualRobot
24 * @ingroup Component-SimpleVirtualRobot
25 * @brief Brief description of class SimpleVirtualRobot.
26 *
27 * Detailed description of class SimpleVirtualRobot.
28 */
30 virtual public armarx::Component,
32 {
33 public:
35
36 std::string getDefaultName() const override;
37
38 protected:
40
41 void onInitComponent() override;
42 void onConnectComponent() override;
43 void onDisconnectComponent() override;
44 void onExitComponent() override;
45
46 void run();
47
48
49 private:
50 struct Properties
51 {
52 bool oneShot = true;
53 float updateFrequency{10.F};
54
55 struct Robot
56 {
57 std::string name;
58 std::string package;
59 std::string path;
60
61 std::string jointValues; // json-style map<std::string, float>
62
63 float globalPositionX = 0;
64 float globalPositionY = 0;
66 };
67
68 Robot robot;
69 };
70
71 VirtualRobot::RobotPtr loadRobot(const Properties::Robot& p) const;
72
73
74 private:
75 Properties properties;
76
77
79
81
83 virtualRobotWriterPlugin = nullptr;
84 };
85
86} // namespace armarx::simple_virtual_robot
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
IceUtil::Handle< RunningTask< 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 onDisconnectComponent() override
Hook for subclass.
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
Pure virtual hook for the subclass.
void onExitComponent() override
Hook for subclass.
std::string getDefaultName() const override
Retrieve default name of component.
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
plugins::ListeningPluginUser ComponentPluginUser
Definition plugins.h:10
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.