events.h
Go to the documentation of this file.
1 #pragma once
2 
3 
4 #include <string>
5 
7 
10 
12 {
13 
14  namespace event_names
15  {
16  inline const std::string GlobalTrajectoryUpdated = "GlobalTrajectoryUpdatedEvent";
17  inline const std::string LocalTrajectoryUpdated = "LocalTrajectoryUpdatedEvent";
18  inline const std::string GlobalPlanningFailed = "GlobalPlanningFailedEvent";
19  inline const std::string LocalPlanningFailed = "LocalPlanningFailedEvent";
20  inline const std::string MovementStarted = "MovementStartedEvent";
21  inline const std::string GoalReached = "GoalReachedEvent";
22  inline const std::string WaypointReached = "WaypointReachedEvent";
23  inline const std::string SafetyThrottlingTriggered = "SafetyThrottlingTriggeredEvent";
24  inline const std::string SafetyStopTriggered = "SafetyStopTriggeredEvent";
25  inline const std::string UserAbortTriggered = "UserAbortTriggeredEvent";
26  inline const std::string InternalError = "InternalErrorEventEvent";
27  } // namespace event_names
28 
29  struct Event
30  {
32  };
33 
35  {
36  std::string message;
37  };
38 
40  {
41  std::string message;
42  };
43 
45  {
47  };
48 
49  /**
50  * @brief Event describing that the targeted goal was successfully reached.
51  */
52  struct GoalReachedEvent : public Event
53  {
55  };
56 
57  /**
58  * @brief Event describing that a user-defined waypoint was successfully reached.
59  */
60  struct WaypointReachedEvent : public Event
61  {
64  };
65 
66  /**
67  * @brief Event desciribing that a significant safety throttling factor was reached.
68  *
69  * Can be configured.
70  */
72  {
74 
75  /**
76  * @brief Ratio of throttled velocity divided by desired velocity.
77  *
78  * Value between 0 and 1 where 0 means full stop and 1 full desired velocity without any throttling.
79  */
80  float throttlingFactor = 1.0;
81  // TODO: Direction where safety-critical obstacle is (or range or whatever...).
82  };
83 
84  /**
85  * @brief Event describing that for security reasons, the robot was stopped completely.
86  */
88  {
90  // TODO: Direction where safety-critical obstacle is (or range or whatever...).
91  };
92 
93  /**
94  * @brief Event describing that the user aborted the current execution.
95  */
97  {
99  };
100 
101  /**
102  * @brief Event describing the occurance of an internal unhandled error.
103  */
104  struct InternalErrorEvent : public Event
105  {
107  std::string message;
108  };
109 
110  /**
111  * @brief Event describing that the global trajectory was updated.
112  */
114  {
116  };
117 
118  /**
119  * @brief Event describing that the local trajectory was updated.
120  */
122  {
124  };
125 
126 } // namespace armarx::navigation::core
armarx::navigation::core::GlobalTrajectory
Definition: Trajectory.h:70
armarx::navigation::core::LocalTrajectoryUpdatedEvent::trajectory
core::LocalTrajectory trajectory
Definition: events.h:123
armarx::navigation::core::event_names::MovementStarted
const std::string MovementStarted
Definition: events.h:20
armarx::navigation::core::MovementStartedEvent::startPose
core::Pose startPose
Definition: events.h:46
armarx::navigation::core::Pose
Eigen::Isometry3f Pose
Definition: basic_types.h:31
armarx::navigation::core::GoalReachedEvent::pose
core::Pose pose
Definition: events.h:54
armarx::navigation::core::WaypointReachedEvent::pose
core::Pose pose
Definition: events.h:62
DateTime.h
armarx::navigation::core::SafetyStopTriggeredEvent::pose
core::Pose pose
Definition: events.h:89
armarx::navigation::core::InternalErrorEvent::pose
core::Pose pose
Definition: events.h:106
armarx::navigation::core::InternalErrorEvent
Event describing the occurance of an internal unhandled error.
Definition: events.h:104
armarx::navigation::core::SafetyThrottlingTriggeredEvent
Event desciribing that a significant safety throttling factor was reached.
Definition: events.h:71
armarx::navigation::core::event_names::UserAbortTriggered
const std::string UserAbortTriggered
Definition: events.h:25
armarx::navigation::core
This file is part of ArmarX.
Definition: aron_conversions.cpp:19
armarx::navigation::core::LocalPlanningFailedEvent::message
std::string message
Definition: events.h:41
armarx::navigation::core::event_names::WaypointReached
const std::string WaypointReached
Definition: events.h:22
armarx::navigation::core::event_names::GlobalTrajectoryUpdated
const std::string GlobalTrajectoryUpdated
Definition: events.h:16
armarx::navigation::core::event_names::SafetyStopTriggered
const std::string SafetyStopTriggered
Definition: events.h:24
armarx::navigation::core::event_names::SafetyThrottlingTriggered
const std::string SafetyThrottlingTriggered
Definition: events.h:23
armarx::navigation::core::SafetyThrottlingTriggeredEvent::pose
core::Pose pose
Definition: events.h:73
armarx::navigation::core::GlobalTrajectoryUpdatedEvent::trajectory
core::GlobalTrajectory trajectory
Definition: events.h:115
armarx::navigation::core::event_names::GlobalPlanningFailed
const std::string GlobalPlanningFailed
Definition: events.h:18
armarx::navigation::core::SafetyStopTriggeredEvent
Event describing that for security reasons, the robot was stopped completely.
Definition: events.h:87
armarx::navigation::core::SafetyThrottlingTriggeredEvent::throttlingFactor
float throttlingFactor
Ratio of throttled velocity divided by desired velocity.
Definition: events.h:80
armarx::navigation::core::Event
Definition: events.h:29
armarx::navigation::core::UserAbortTriggeredEvent
Event describing that the user aborted the current execution.
Definition: events.h:96
armarx::navigation::core::LocalTrajectory
Definition: Trajectory.h:170
armarx::navigation::core::LocalTrajectoryUpdatedEvent
Event describing that the local trajectory was updated.
Definition: events.h:121
armarx::navigation::core::GlobalPlanningFailedEvent
Definition: events.h:34
armarx::navigation::core::GoalReachedEvent
Event describing that the targeted goal was successfully reached.
Definition: events.h:52
armarx::navigation::core::event_names::GoalReached
const std::string GoalReached
Definition: events.h:21
armarx::navigation::core::event_names::InternalError
const std::string InternalError
Definition: events.h:26
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
armarx::navigation::core::WaypointReachedEvent::waypointId
int waypointId
Definition: events.h:63
armarx::navigation::core::Event::timestamp
armarx::core::time::DateTime timestamp
Definition: events.h:31
armarx::navigation::core::GlobalTrajectoryUpdatedEvent
Event describing that the global trajectory was updated.
Definition: events.h:113
armarx::navigation::core::GlobalPlanningFailedEvent::message
std::string message
Definition: events.h:36
armarx::navigation::core::InternalErrorEvent::message
std::string message
Definition: events.h:107
armarx::navigation::core::WaypointReachedEvent
Event describing that a user-defined waypoint was successfully reached.
Definition: events.h:60
Trajectory.h
types.h
armarx::navigation::core::LocalPlanningFailedEvent
Definition: events.h:39
armarx::navigation::core::event_names::LocalPlanningFailed
const std::string LocalPlanningFailed
Definition: events.h:19
armarx::navigation::core::UserAbortTriggeredEvent::pose
core::Pose pose
Definition: events.h:98
armarx::navigation::core::MovementStartedEvent
Definition: events.h:44
armarx::navigation::core::event_names::LocalTrajectoryUpdated
const std::string LocalTrajectoryUpdated
Definition: events.h:17