loopback_state_machine.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import rospy
3 
4 from flexbe_core.core.lockable_state_machine import LockableStateMachine
5 
6 
8  """
9  A state machine that can loop back to itself.
10  """
11 
12  _loopback_name = 'loopback'
13 
14  def __init__(self, *args, **kwargs):
15  # add loopback outcome
16  if len(args) > 0:
17  args[0].append(self._loopback_name)
18  else:
19  outcomes = kwargs.get('outcomes', [])
20  outcomes.append(self._loopback_name)
21  kwargs['outcomes'] = outcomes
22 
23  super(LoopbackStateMachine, self).__init__(*args, **kwargs)


flexbe_core
Author(s): Philipp Schillinger
autogenerated on Wed Jun 5 2019 21:51:59