TeleoperationState.cpp
Go to the documentation of this file.
2 
3 namespace rsm {
4 
6 }
7 
9 }
10 
12  _name = "Teleoperation";
13 }
14 
16 }
17 
19 }
20 
22 }
23 
25  std::string &message) {
26  success = false;
27  message = "Teleoperation active";
28 }
29 
31  std::string &message) {
32  success = false;
33  message = "Exploration not running";
34 }
35 
37  std::string &message) {
38  success = false;
39  message = "Teleoperation active";
40 }
41 
43  std::string &message) {
44  success = false;
45  message = "Waypoint following not running";
46 }
47 
48 void TeleoperationState::onInterrupt(int interrupt) {
49  if (interrupt == EMERGENCY_STOP_INTERRUPT) {
51  boost::make_shared<EmergencyStopState>());
52  _interrupt_occured = true;
53  } else if (interrupt == INTERRUPT_END) {
55  boost::make_shared<IdleState>());
56  _interrupt_occured = true;
57  }
58 
59 }
60 
61 }
void transitionToVolatileState(boost::shared_ptr< rsm::BaseState > next_state)
bool _interrupt_occured
Shows if an interupt occured.
Definition: BaseState.h:129
void onExplorationStart(bool &success, std::string &message)
void onWaypointFollowingStop(bool &success, std::string &message)
Definition: BaseState.h:8
std::string _name
Name of the state.
Definition: BaseState.h:133
StateInterface * _stateinterface
Pointer to State Interface handling all state transitions.
Definition: BaseState.h:125
#define EMERGENCY_STOP_INTERRUPT
Definition: BaseState.h:11
void onWaypointFollowingStart(bool &success, std::string &message)
void onInterrupt(int interrupt)
Called when an operation mode interrupt was received.
#define INTERRUPT_END
Definition: BaseState.h:10
void onExplorationStop(bool &success, std::string &message)


rsm_core
Author(s): Marco Steinbrink
autogenerated on Tue Mar 16 2021 02:44:31