7 from flexbe_msgs.msg
import CommandFeedback
8 from std_msgs.msg
import Bool, Empty
13 @StateLogger.log_events(
'flexbe.events',
14 start=
'on_start', stop=
'on_stop',
15 pause=
'on_pause', resume=
'on_resume',
16 enter=
'on_enter', exit=
'on_exit')
17 @StateLogger.log_userdata(
'flexbe.userdata')
20 A state that allows implementing certain events.
24 super(EventState, self).
__init__(*args, **kwargs)
42 Logger.localinfo(
"--> Pausing in state %s", self.
name)
46 PriorityContainer.active_container = self.
path
49 Logger.localinfo(
"--> Resuming in state %s", self.
name)
55 if self.
_paused and not PreemptableState.preempt:
62 if self.
_skipped and not PreemptableState.preempt:
70 Logger.localinfo(
"--> Repeating state %s", self.
name)
75 if repeat
or outcome
is not None and not PreemptableState.preempt:
98 PriorityContainer.active_container =
None
105 Will be executed once when the behavior starts.
111 Will be executed once when the behavior stops or is preempted.
117 Will be executed each time this state is paused.
123 Will be executed each time this state is resumed.
129 Will be executed each time the state is entered from any other state (but not from itself).
135 Will be executed each time the state will be left to any other state (but not to itself).