Component.cpp
Go to the documentation of this file.
1#include "Component.h"
2
3#include <experimental/memory>
4#include <string>
5
9
12
15#include <armarx/control/skills/aron/ZeroTorque.aron.generated.h>
29
31{
32
35 {
37 new ::armarx::ComponentPropertyDefinitions(getConfigIdentifier());
38
39 def->component(remote.kinematicUnit);
40 def->component(remote.leftHandUnit, "LeftHandUnit", "LeftHandUnit");
41 def->component(remote.rightHandUnit, "RightHandUnit", "RightHandUnit");
42
43 def->required(properties.robotName, "RobotName", "Name of the robot.");
44 def->optional(properties.homePoseConfiguration,
45 "homePoseConfiguration",
46 "Named configuration used as `Home` pose.");
47
48 return def;
49 }
50
51 void
53 {
54 {
55
56 }
57 usingProxy("RobotStateMemory");
58 }
59
60 void
62 {
64 robotStateReader.connect(memoryNameSystem());
65 ::armarx::control::client::ComponentPlugin* controlComponentPluginUser =
67 {
68 {
70 .controlComponentPluginUser = controlComponentPluginUser};
72 }
73 {
75 .controlComponentPluginUser = controlComponentPluginUser};
77 }
78 {
80 .controlComponentPluginUser = controlComponentPluginUser};
82 }
83 {
85 .kinematicUnit = remote.kinematicUnit,
86 .virtualRobotReader = robotStateReader,
87 .robotName = properties.robotName};
89 }
90 {
92 remote.kinematicUnit};
94 }
95 {
97 .virtualRobotReader = robotStateReader, .robotName = properties.robotName};
99 srv);
100 }
101 {
103 .leftHandUnit = remote.leftHandUnit, .rightHandUnit = remote.rightHandUnit};
105 }
106 {
108 .leftHandUnit = remote.leftHandUnit, .rightHandUnit = remote.rightHandUnit};
110 }
111 {
113 }
114 {
116 }
117 {
118 armarx::control::skills::config::ZeroTorque skillConfig;
119 skillConfig.robotName = properties.robotName;
120 skillBlueprints.zeroTorque = std::experimental::make_observer(
124 .virtualRobotReader =
125 std::experimental::make_observer(&remote.robotReaderPlugin->get()),
126 .robotUnitPlugin_ = remote.robotUnitPlugin};
127 skillBlueprints.zeroTorque->connectTo(context);
128 }
129 {
131 properties.robotName, arviz, memoryNameSystem(), getTrajectoryPlayer()};
133 }
134
135 {
137 properties.homePoseConfiguration);
138 }
139
140 // meta skills
141 {
143 }
144 }
145 }
146
147 void
151
152 void
156
157 const std::string Component::defaultName = skills::constants::CONTROL_SKILL_PROVIDER_NAME;
158
159 std::string
161 {
162 return Component::defaultName;
163 }
164
165 std::string
167 {
168 return Component::defaultName;
169 }
170
172 {
173 addPlugin(remote.robotUnitPlugin);
174 addPlugin(remote.robotReaderPlugin);
175 }
176
178
179} // namespace armarx::control::components::control_skill_provider
#define ARMARX_REGISTER_COMPONENT_EXECUTABLE(ComponentT, applicationName)
Definition Decoupled.h:29
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Definition Component.cpp:90
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
PluginT * addPlugin(const std::string prefix="", ParamsT &&... params)
skills::SkillBlueprint * addSkillFactory(const skills::SkillDescription &desc, const skills::LambdaSkill::FunctionType &f)
virtual void connect(armem::client::MemoryNameSystem &memoryNameSystem)
::armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition Component.cpp:34
static std::string GetDefaultName()
Get the component's default name.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
observer_ptr< _Tp > make_observer(_Tp *__p) noexcept