Component.cpp
Go to the documentation of this file.
1#include "Component.h"
2
3#include <experimental/memory>
4#include <string>
5
9
12
14#include <armarx/control/skills/aron/ZeroTorque.aron.generated.h>
28
30{
31
34 {
36 new ::armarx::ComponentPropertyDefinitions(getConfigIdentifier());
37
38 def->component(remote.kinematicUnit);
39 def->component(remote.leftHandUnit, "LeftHandUnit", "LeftHandUnit");
40 def->component(remote.rightHandUnit, "RightHandUnit", "RightHandUnit");
41
42 def->required(properties.robotName, "RobotName", "Name of the robot.");
43 def->optional(properties.homePoseConfiguration,
44 "homePoseConfiguration",
45 "Named configuration used as `Home` pose.");
46 def->required(properties.disableWaitUntilFinished,
47 "disableWaitUntilFinished",
48 "This property disables the 'waitUntilFinished' functionality of the "
49 "'ShapeHands' skill when set to true. This is needed when no finger joint "
50 "encoder are available (e.g. when using the Vincent hand).");
51
52 return def;
53 }
54
55 void
57 {
58 {
59 }
60 usingProxy("RobotStateMemory");
61 }
62
63 void
65 {
67 robotStateReader.connect(memoryNameSystem());
68 ::armarx::control::client::ComponentPlugin* controlComponentPluginUser =
70 {
71 {
73 .controlComponentPluginUser = controlComponentPluginUser};
75 }
76 {
78 .controlComponentPluginUser = controlComponentPluginUser};
80 }
81 {
83 .controlComponentPluginUser = controlComponentPluginUser};
85 }
86 {
88 .kinematicUnit = remote.kinematicUnit,
89 .virtualRobotReader = robotStateReader,
90 .robotName = properties.robotName};
92 }
93 {
95 remote.kinematicUnit};
97 }
98 {
100 .virtualRobotReader = robotStateReader, .robotName = properties.robotName};
102 srv);
103 }
104 {
106 .leftHandUnit = remote.leftHandUnit, .rightHandUnit = remote.rightHandUnit};
108 }
109 {
111 .leftHandUnit = remote.leftHandUnit, .rightHandUnit = remote.rightHandUnit};
113 .disableWaitUntilFinished = properties.disableWaitUntilFinished};
115 }
116 {
118 }
119 {
121 }
122 {
123 armarx::control::skills::config::ZeroTorque skillConfig;
124 skillConfig.robotName = properties.robotName;
125 skillBlueprints.zeroTorque = std::experimental::make_observer(
129 .virtualRobotReader =
130 std::experimental::make_observer(&remote.robotReaderPlugin->get()),
131 .robotUnitPlugin_ = remote.robotUnitPlugin};
132 skillBlueprints.zeroTorque->connectTo(context);
133 }
134
135 // This skill depends on SimoxControl. Hence, it should be moved to another skill provider
136 // {
137 // armarx::control::pointing::skills::PointAt::Remote remote{
138 // properties.robotName, arviz, memoryNameSystem(), getTrajectoryPlayer()};
139 // addSkillFactory<armarx::control::pointing::skills::PointAt>(remote);
140 // }
141
142 {
144 properties.homePoseConfiguration);
145 }
146
147 // meta skills
148 {
150 }
151 }
152 }
153
154 void
158
159 void
163
164 const std::string Component::defaultName = skills::constants::CONTROL_SKILL_PROVIDER_NAME;
165
166 std::string
168 {
169 return Component::defaultName;
170 }
171
172 std::string
174 {
175 return Component::defaultName;
176 }
177
179 {
180 addPlugin(remote.robotUnitPlugin);
181 addPlugin(remote.robotReaderPlugin);
182 }
183
185
186} // 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:33
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