smach.sequence module

class smach.sequence.Sequence(outcomes, connector_outcome, input_keys=[], output_keys=[])

Bases: StateMachine

Sequence Container

This container inherits functionality from L{smach.StateMachine} and adds some auto-generated transitions that create a sequence of states from the order in which said states are added to the container.

static add(label, state, transitions=None, remapping=None)

Add a state to the sequence. Each state added will receive an additional transition from it to the state which is added after it. The transition will follow the outcome specified at construction of this container.

@type label: string @param label: The label of the state being added.

@param state: An instance of a class implementing the L{State} interface.

@param transitions: A dictionary mapping state outcomes to other state labels. If one of these transitions follows the connector outcome specified in the constructor, the provided transition will override the automatically generated connector transition.