EventSubscriptionInterface.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <functional>
4 
9 
10 
12 {
13 
15  std::function<void(const global_planning::GlobalPlannerResult&)>;
17  std::function<void(const local_planning::LocalPlannerResult&)>;
19  std::function<void(const traj_ctrl::local::TrajectoryControllerResult&)>;
21  std::function<void(const core::GlobalPlanningFailedEvent&)>;
22 
23  using LocalPlanningFailedCallback = std::function<void(const core::LocalPlanningFailedEvent&)>;
24 
25  using OnMovementStartedCallback = std::function<void(const core::MovementStartedEvent&)>;
26 
27  using OnGoalReachedCallback = std::function<void(const core::GoalReachedEvent&)>;
28  using OnWaypointReachedCallback = std::function<void(const core::WaypointReachedEvent&)>;
30  std::function<void(const core::SafetyThrottlingTriggeredEvent&)>;
32  std::function<void(const core::SafetyStopTriggeredEvent&)>;
33  using OnUserAbortTriggeredCallback = std::function<void(const core::UserAbortTriggeredEvent&)>;
34  using OnInternalErrorCallback = std::function<void(const core::InternalErrorEvent&)>;
35 
37  {
38 
39  public:
40  virtual void onMovementStarted(const OnMovementStartedCallback& callback) = 0;
41  virtual void onGoalReached(const OnGoalReachedCallback& callback) = 0;
42 
43  virtual void onWaypointReached(const OnWaypointReachedCallback& callback) = 0;
44 
45  virtual void
47 
48  virtual void onSafetyStopTriggered(const OnSafetyStopTriggeredCallback& callback) = 0;
49 
50  virtual void onUserAbortTriggered(const OnUserAbortTriggeredCallback& callback) = 0;
51 
52  virtual void onInternalError(const OnInternalErrorCallback& callback) = 0;
53 
54  virtual void onGlobalPlanningFailed(const GlobalPlanningFailedCallback& callback) = 0;
55  virtual void onLocalPlanningFailed(const LocalPlanningFailedCallback& callback) = 0;
56 
57 
58  // Non-API.
59  virtual ~EventSubscriptionInterface() = default;
60  };
61 
62 } // namespace armarx::navigation::client
armarx::navigation::client::EventSubscriptionInterface::onUserAbortTriggered
virtual void onUserAbortTriggered(const OnUserAbortTriggeredCallback &callback)=0
armarx::navigation::client::EventSubscriptionInterface::onLocalPlanningFailed
virtual void onLocalPlanningFailed(const LocalPlanningFailedCallback &callback)=0
armarx::navigation::client::OnWaypointReachedCallback
std::function< void(const core::WaypointReachedEvent &)> OnWaypointReachedCallback
Definition: EventSubscriptionInterface.h:28
armarx::navigation::client::LocalTrajectoryUpdatedCallback
std::function< void(const local_planning::LocalPlannerResult &)> LocalTrajectoryUpdatedCallback
Definition: EventSubscriptionInterface.h:17
armarx::navigation::client::GlobalPlanningFailedCallback
std::function< void(const core::GlobalPlanningFailedEvent &)> GlobalPlanningFailedCallback
Definition: EventSubscriptionInterface.h:21
armarx::navigation::local_planning::LocalPlannerResult
Definition: LocalPlanner.h:40
TrajectoryController.h
armarx::navigation::core::InternalErrorEvent
Event describing the occurance of an internal unhandled error.
Definition: events.h:101
LocalPlanner.h
armarx::navigation::core::SafetyThrottlingTriggeredEvent
Event desciribing that a significant safety throttling factor was reached.
Definition: events.h:68
armarx::navigation::client::EventSubscriptionInterface::~EventSubscriptionInterface
virtual ~EventSubscriptionInterface()=default
armarx::navigation::client
This file is part of ArmarX.
Definition: ComponentPlugin.cpp:20
armarx::navigation::client::LocalPlanningFailedCallback
std::function< void(const core::LocalPlanningFailedEvent &)> LocalPlanningFailedCallback
Definition: EventSubscriptionInterface.h:23
armarx::navigation::client::EventSubscriptionInterface::onWaypointReached
virtual void onWaypointReached(const OnWaypointReachedCallback &callback)=0
events.h
armarx::navigation::client::EventSubscriptionInterface::onGlobalPlanningFailed
virtual void onGlobalPlanningFailed(const GlobalPlanningFailedCallback &callback)=0
armarx::navigation::client::EventSubscriptionInterface::onSafetyStopTriggered
virtual void onSafetyStopTriggered(const OnSafetyStopTriggeredCallback &callback)=0
armarx::navigation::client::TrajectoryControllerUpdatedCallback
std::function< void(const traj_ctrl::local::TrajectoryControllerResult &)> TrajectoryControllerUpdatedCallback
Definition: EventSubscriptionInterface.h:19
armarx::navigation::core::SafetyStopTriggeredEvent
Event describing that for security reasons, the robot was stopped completely.
Definition: events.h:84
armarx::navigation::client::EventSubscriptionInterface::onMovementStarted
virtual void onMovementStarted(const OnMovementStartedCallback &callback)=0
armarx::navigation::client::OnUserAbortTriggeredCallback
std::function< void(const core::UserAbortTriggeredEvent &)> OnUserAbortTriggeredCallback
Definition: EventSubscriptionInterface.h:33
armarx::navigation::client::OnSafetyThrottlingTriggeredCallback
std::function< void(const core::SafetyThrottlingTriggeredEvent &)> OnSafetyThrottlingTriggeredCallback
Definition: EventSubscriptionInterface.h:30
armarx::navigation::core::UserAbortTriggeredEvent
Event describing that the user aborted the current execution.
Definition: events.h:93
GlobalPlanner.h
armarx::navigation::client::EventSubscriptionInterface::onSafetyThrottlingTriggered
virtual void onSafetyThrottlingTriggered(const OnSafetyThrottlingTriggeredCallback &callback)=0
armarx::navigation::client::EventSubscriptionInterface::onInternalError
virtual void onInternalError(const OnInternalErrorCallback &callback)=0
armarx::navigation::global_planning::GlobalPlannerResult
Definition: GlobalPlanner.h:38
armarx::navigation::core::GlobalPlanningFailedEvent
Definition: events.h:31
armarx::navigation::core::GoalReachedEvent
Event describing that the targeted goal was successfully reached.
Definition: events.h:49
armarx::navigation::client::OnMovementStartedCallback
std::function< void(const core::MovementStartedEvent &)> OnMovementStartedCallback
Definition: EventSubscriptionInterface.h:25
armarx::navigation::client::GlobalTrajectoryUpdatedCallback
std::function< void(const global_planning::GlobalPlannerResult &)> GlobalTrajectoryUpdatedCallback
Definition: EventSubscriptionInterface.h:15
armarx::navigation::client::EventSubscriptionInterface
Definition: EventSubscriptionInterface.h:36
armarx::navigation::traj_ctrl::local::TrajectoryControllerResult
Definition: TrajectoryController.h:43
armarx::navigation::core::WaypointReachedEvent
Event describing that a user-defined waypoint was successfully reached.
Definition: events.h:57
armarx::navigation::client::OnInternalErrorCallback
std::function< void(const core::InternalErrorEvent &)> OnInternalErrorCallback
Definition: EventSubscriptionInterface.h:34
armarx::navigation::client::EventSubscriptionInterface::onGoalReached
virtual void onGoalReached(const OnGoalReachedCallback &callback)=0
armarx::navigation::client::OnSafetyStopTriggeredCallback
std::function< void(const core::SafetyStopTriggeredEvent &)> OnSafetyStopTriggeredCallback
Definition: EventSubscriptionInterface.h:32
armarx::navigation::core::LocalPlanningFailedEvent
Definition: events.h:36
armarx::navigation::client::OnGoalReachedCallback
std::function< void(const core::GoalReachedEvent &)> OnGoalReachedCallback
Definition: EventSubscriptionInterface.h:27
armarx::navigation::core::MovementStartedEvent
Definition: events.h:41