Main Page
Namespaces
Classes
Files
File List
src
flexbe_core
core
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
7
class
LoopbackStateMachine
(
LockableStateMachine
):
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.core.lockable_state_machine.LockableStateMachine
Definition:
lockable_state_machine.py:6
flexbe_core.core.loopback_state_machine.LoopbackStateMachine
Definition:
loopback_state_machine.py:7
flexbe_core.core.lockable_state_machine
Definition:
lockable_state_machine.py:1
flexbe_core.core.loopback_state_machine.LoopbackStateMachine.__init__
def __init__(self, args, kwargs)
Definition:
loopback_state_machine.py:14
flexbe_core.core.loopback_state_machine.LoopbackStateMachine._loopback_name
string _loopback_name
Definition:
loopback_state_machine.py:12
flexbe_core
Author(s): Philipp Schillinger
autogenerated on Wed Jun 5 2019 21:51:59