23 std::future_status
status = f.wait_for(std::chrono::seconds(0));
24 if (
status == std::future_status::ready)
28 else if (
status == std::future_status::deferred)
41 template <
class AronT>
66 virtual Eigen::Isometry3f relativeTarget(
const typename Base::SpecializedMainInput& in) = 0;
69 init(
const typename Base::SpecializedInitInput& in)
override
78 const std::string configId = this->getSkillId().skillName;
81 memorySubscriber.emplace(configId, srv_->memoryNameSystem);
85 srv_->iceNavigator.createConfig(cfg, configId);
87 navigator.emplace(client::Navigator::InjectedServices{
88 .navigator = &srv_->iceNavigator, .subscriber = &memorySubscriber.value()});
95 main(
const typename Base::SpecializedMainInput& in)
override
97 const Eigen::Isometry3f relativeTarget = this->relativeTarget(in);
109 std::async(std::launch::async, [
this]() {
return navigator->waitForStop(); });
121 auto se = future.get();
124 ARMARX_INFO <<
"Goal `" << relativeTarget.matrix() <<
"`reached.";
128 if (se.isSafetyStopTriggeredEvent())
135 if (se.isUserAbortTriggeredEvent())
142 if (se.isInternalErrorEvent())
145 << se.toInternalErrorEvent().message;
157 onStopRequested()
override
159 if (navigator.has_value())
168 std::optional<Services> srv_;
171 std::optional<client::MemorySubscriber> memorySubscriber;
172 std::optional<client::Navigator> navigator;