35 std::future_status
status = f.wait_for(std::chrono::seconds(0));
36 if (
status == std::future_status::ready)
40 else if (
status == std::future_status::deferred)
53 template <
class AronT>
78 virtual Eigen::Isometry3f relativeTarget(
const typename Base::SpecializedMainInput& in) = 0;
81 init(
const typename Base::SpecializedInitInput& in)
override
90 const std::string configId = this->getSkillId().skillName;
93 memorySubscriber.emplace(configId, srv_->memoryNameSystem);
97 srv_->iceNavigator.createConfig(cfg, configId);
99 navigator.emplace(client::Navigator::InjectedServices{
100 .navigator = &srv_->iceNavigator, .subscriber = &memorySubscriber.value()});
107 main(
const typename Base::SpecializedMainInput& in)
override
109 const Eigen::Isometry3f relativeTarget = this->relativeTarget(in);
121 std::async(std::launch::async, [
this]() {
return navigator->waitForStop(); });
133 auto se = future.get();
136 ARMARX_INFO <<
"Goal `" << relativeTarget.matrix() <<
"`reached.";
140 if (se.isSafetyStopTriggeredEvent())
147 if (se.isUserAbortTriggeredEvent())
154 if (se.isInternalErrorEvent())
157 << se.toInternalErrorEvent().message;
169 onStopRequested()
override
171 if (navigator.has_value())
180 std::optional<Services> srv_;
183 std::optional<client::MemorySubscriber> memorySubscriber;
184 std::optional<client::Navigator> navigator;