20 armarx::skills::Example::DataPassingParams root_profile_params;
21 root_profile_params.have_success =
true;
24 "This skill calls the ConfigurableExitStatus skill. "
25 "The 'have_success' parameter determines whether the subskill succeeds or fails. "
26 "In both cases, the result data returned by ConfigurableExitStatus is printed to the "
28 "This data is expected to be an integer with the value 1234.";
33 .rootProfileDefaults = root_profile_params.toAron(),
35 .parametersType = armarx::skills::Example::DataPassingParams::ToAronType(),
36 .resultType = armarx::skills::Example::DataPassingReturn::ToAronType()};
45 auto configurableExitStatus = [
this, in]()
47 armarx::skills::Example::DataPassingParams params;
48 params.have_success = in.parameters.have_success;
50 << params.have_success;
56 auto [inner_skill, inner_skill_params] = configurableExitStatus();
58 auto update2 =
callSubskill(inner_skill, inner_skill_params);
61 if (update2.has_value() and not update2->hasBeenSucceeded())
69 auto result_dict = error_dict->getElement(
"data");
70 armarx::skills::Example::DataPassingReturn out;
73 << out.some_return_int;
81 if (update2.has_value() and update2->hasBeenSucceeded())
84 armarx::skills::Example::DataPassingReturn out;
88 out.fromAron(update2->result);
90 << out.some_return_int;
static PointerType DynamicCastAndCheck(const VariantPtr &n)
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
std::optional< TerminatedSkillStatusUpdate > callSubskill(const SkillID &skillId)
Call a subskill with the given ID and its default parameters.
virtual MainResult main()
Override this method with the actual implementation.
void throwIfSkillShouldTerminate(const std::string &abortedMessage="") const
SkillReturnDataProcessing()
static SkillDescription GetSkillDescription()
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
This file is part of ArmarX.
A result struct for th main method of a skill.
armarx::skills::SkillID dataPassingInnerSkillSkillID