8#include <Eigen/Geometry>
32 NavigateTo::init(
const Base::SpecializedInitInput& in)
34 helper.
init(in.parameters.navigatingSkillParams,
37 return ::armarx::skills::Skill::InitResult{
42 NavigateTo::main(
const Base::SpecializedMainInput& in)
44 const Eigen::Isometry3f globalTarget(in.parameters.targetPose);
55 ARMARX_INFO <<
"Goal `" << Eigen::Isometry3f(in.parameters.targetPose).translation()
60 if (se.isSafetyStopTriggeredEvent())
64 return ::armarx::skills::Skill::MainResult{
67 if (se.isUserAbortTriggeredEvent())
71 return ::armarx::skills::Skill::MainResult{
74 if (se.isInternalErrorEvent())
77 << se.toInternalErrorEvent().message;
79 return ::armarx::skills::Skill::MainResult{
82 if (se.isGlobalPlanningFailedEvent())
85 << se.toGlobalPlanningFailedEvent().message;
87 return ::armarx::skills::Skill::MainResult{
92 return ::armarx::skills::Skill::MainResult{
97 return ::armarx::skills::Skill::MainResult{
102 NavigateTo::onStopRequested()
104 if (helper.getNavigator().has_value())
107 helper.getNavigator()->stop();
111 armarx::skills::SkillDescription
121 .rootProfileDefaults = defaultParameters.toAron(),
123 .parametersType = Params::ToAronType()};
static Duration Hours(std::int64_t hours)
Constructs a duration in hours.
::armarx::skills::SimpleSpecializedSkill< Params > Base
static armarx::skills::SkillDescription DefaultSkillDescription()
NavigateTo(const NavigatingSkillHelper::Properties &properties, const NavigatingSkillHelper::Services &srv)
std::optional< client::Navigator > & getNavigator()
void init(const arondto::NavigatingSkillParams ¶ms, const std::string &id)
static arondto::NavigatingSkillParams DefaultSkillDescription()
client::StopEvent moveAndWaitForStop(IssueNavigationCommandT &&issueNavigationCommand, ShouldTerminateT &&shouldTerminate)
Issues the navigation command and waits for the navigator to stop, polling shouldTerminate meanwhile.
arondto::NavigateToParams ParamType
bool shouldSkillTerminate() const override
Returns whether the skill should terminate as soon as possible.
#define ARMARX_CHECK(expression)
Shortcut for ARMARX_CHECK_EXPRESSION.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
const std::string NavigateTo
A result struct for skill initialization.
A result struct for th main method of a skill.