Go to the documentation of this file.
15 IceUtil::Optional<manager::dto::SkillDescription> description =
24 std::stringstream reason;
25 reason <<
"No skill with ID " << skillId <<
" found";
32 manager(manager), skillDescription(skillDesc)
55 skills::manager::dto::SkillExecutionRequest req;
56 req.executorName = executorName;
60 auto terminatingUpdateIce =
manager->executeSkill(req);
69 skills::manager::dto::SkillExecutionRequest req;
70 req.executorName = executorName;
74 auto execIdIce =
manager->executeSkillAsync(req);
78 std::optional<TerminatedSkillStatusUpdate>
88 if (statusUpdate.hasBeenTerminated())
93 std::this_thread::sleep_for(std::chrono::milliseconds(50));
110 auto r =
manager->abortSkill(
id.toManagerIce());
118 auto r =
manager->abortSkillAsync(
id.toManagerIce());
aron::data::DictPtr getRootProfileParameters() const
get the default parameters of the skill. TODO: Skill profiles in memory!
TerminatedSkillStatusUpdate executeSkill(const std::string &executorName, const aron::data::DictPtr ¶ms=nullptr) const
execute a skill and block until skill terminates
static TerminatedSkillStatusUpdate FromIce(const provider::dto::SkillStatusUpdate &update, const std::optional< skills::ProviderID > &providerId=std::nullopt)
This file is part of ArmarX.
static SkillStatusUpdate FromIce(const provider::dto::SkillStatusUpdate &update, const std::optional< skills::ProviderID > &providerId=std::nullopt)
#define ARMARX_CHECK_NOT_NULL(ptr)
This macro evaluates whether ptr is not null and if it turns out to be false it will throw an Express...
Indicates that a skill was not found, e.g., by the skill manager.
manager::dti::SkillManagerInterfacePrx manager
manager::dto::SkillID toManagerIce() const
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
skills::manager::dto::SkillExecutionID toManagerIce() const
SkillDescription skillDescription
SkillProxy()=delete
We remove the default constructor as every skill proxy requires a manager.
static data::dto::DictPtr ToAronDictDTO(const PointerType &navigator)
aron::data::DictPtr rootProfileDefaults
std::shared_ptr< Dict > DictPtr
SkillDescription getSkillDescription() const
get the skill description
SkillExecutionID executeSkillAsync(const std::string &executorName, const aron::data::DictPtr ¶ms=nullptr) const
execute a skill. Do not block during execution
static SkillExecutionID FromIce(const skills::manager::dto::SkillExecutionID &)
std::optional< TerminatedSkillStatusUpdate > join(const SkillExecutionID &executionId) const
poll execution status and block until its null or terminated
bool abortSkill(const SkillExecutionID &executionId) const
ask skill to abort ASAP. Blocks until skill stopped
static SkillDescription FromIce(const provider::dto::SkillDescription &i, const std::optional< ProviderID > &=std::nullopt)
bool abortSkillAsync(const SkillExecutionID &executionId) const
ask skill to abort ASAP
bool isFullySpecified() const
double s(double t, double s0, double v0, double a0, double j)
SkillID getSkillId() const
get the skill id from the skill description
This file offers overloads of toIce() and fromIce() functions for STL container types.