Skip to content
Snippets Groups Projects
Commit eb22d761 authored by Andre Meixner's avatar Andre Meixner :camera:
Browse files

Added chance to call a subskill synchronously in RandomChaining skill

parent dc21ccd5
No related branches found
No related tags found
2 merge requests!475Improvement of Skill Memory and Skill Memory GUI,!474Draft: Improvement of Skill Memory and Skill Memory GUI
......@@ -48,12 +48,20 @@ namespace armarx::skills::provider
SkillProxy prx(
manager,
skills::SkillID{.providerId = *getSkillId().providerId, .skillName = subskillName});
callSubskillAsync(prx);
auto sleep_milliseconds = util::randomgen(1000, 0);
if (util::randomgen(10, 0) < 2)
{
callSubskill(prx);
}
else
{
callSubskillAsync(prx);
ARMARX_INFO << "SLEEP FOR " << sleep_milliseconds << "ms";
std::this_thread::sleep_for(std::chrono::milliseconds(sleep_milliseconds));
auto sleep_milliseconds = util::randomgen(1000, 0);
ARMARX_INFO << "SLEEP FOR " << sleep_milliseconds << "ms";
std::this_thread::sleep_for(std::chrono::milliseconds(sleep_milliseconds));
}
}
return {TerminatedSkillStatus::Succeeded, nullptr};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment