4 from flexbe_msgs.msg
import CommandFeedback
5 from std_msgs.msg
import Empty
12 A state that can be preempted. 13 If preempted, the state will not be executed anymore and return the outcome preempted. 16 _preempted_name =
'preempted' 20 super(PreemptableState, self).
__init__(*args, **kwargs)
24 PreemptableState.preempt =
False 32 self._pub.publish(self.
_feedback_topic, CommandFeedback(command=
"preempt"))
33 PreemptableState.preempt =
True 34 Logger.localinfo(
"--> Behavior will be preempted")
36 if PreemptableState.preempt:
38 Logger.localinfo(
"Behavior will be preempted")
48 self._pub.publish(self.
_feedback_topic, CommandFeedback(command=
"preempt"))
49 PreemptableState.preempt =
True 55 PreemptableState.preempt =
False
def _notify_skipped(self)
def _preemptable_execute(self, args, kwargs)
def __init__(self, args, kwargs)
def _disable_ros_control(self)
def _enable_ros_control(self)