25#include <condition_variable>
55 return std::holds_alternative<core::GoalReachedEvent>(event);
61 return std::get<core::GoalReachedEvent>(event);
67 return std::holds_alternative<core::SafetyStopTriggeredEvent>(event);
73 return std::get<core::SafetyStopTriggeredEvent>(event);
79 return std::holds_alternative<core::UserAbortTriggeredEvent>(event);
85 return std::get<core::UserAbortTriggeredEvent>(event);
91 return std::holds_alternative<core::InternalErrorEvent>(event);
97 return std::get<core::InternalErrorEvent>(event);
103 return std::holds_alternative<core::GlobalPlanningFailedEvent>(event);
109 return std::get<core::GlobalPlanningFailedEvent>(event);
112 operator bool()
const
152 const std::optional<std::string>& providerName);
164 void onGoalReached(
const std::function<
void(
void)>& callback);
179 std::condition_variable
cv;
183 InjectedServices srv;
void setVelocityFactor(float velocityFactor)
void update(const std::vector< core::Pose > &waypoints, core::NavigationFrame frame)
void moveToLocation(const std::string &location, const std::optional< std::string > &providerName)
Navigator(const InjectedServices &services)
std::optional< StopEvent > event
void moveTo(const core::Pose &pose, core::NavigationFrame frame)
void moveToAlternatives(const std::vector< core::TargetAlternative > &targets, core::NavigationFrame frame)
StopEvent waitForStop(std::int64_t timeoutMs=-1)
void moveTowards(const core::Direction &direction, core::NavigationFrame frame)
void onGoalReached(const std::function< void(void)> &callback)
void onWaypointReached(const std::function< void(int)> &callback)
bool isSafetyStopTriggeredEvent() const
core::InternalErrorEvent & toInternalErrorEvent()
core::UserAbortTriggeredEvent & toUserAbortTriggeredEvent()
bool isUserAbortTriggeredEvent() const
bool isInternalErrorEvent() const
core::GlobalPlanningFailedEvent & toGlobalPlanningFailedEvent()
core::SafetyStopTriggeredEvent & toSafetyStopTriggeredEvent()
bool isGoalReachedEvent() const
bool isGlobalPlanningFailedEvent() const
core::GoalReachedEvent & toGoalReachedEvent()
Navigator interface for PointGoal navigation (with waypoints) and relative movement.
Brief description of class targets.
This file is part of ArmarX.
Eigen::Vector3f Direction
This file is part of ArmarX.
core::NavigatorInterface * navigator
EventSubscriptionInterface * subscriber
Event describing that the targeted goal was successfully reached.
Event describing the occurance of an internal unhandled error.
Event describing that for security reasons, the robot was stopped completely.
Event describing that the user aborted the current execution.