original_docstring: 
          Run the tick behaviour for this selector. Note that the status
          of the tick is always determined by its children, not
          by the user customised update function.
  
          Yields:
              :class:`~py_trees.behaviour.Behaviour`: a reference to itself or one of its children
          
docstring: Run the tick behaviour for this selector. Note that the status
  of the tick is always determined by its children, not
  by the user customised update function.
docstring_tokens: Run the tick behaviour for this selector . Note that the status of the tick is always determined by its children not by the user customised update function .
code: def tick(self):
          """
          Run the tick behaviour for this selector. Note that the status
          of the tick is always determined by its children, not
          by the user customised update function.
  
          Yields:
              :class:`~py_trees.behaviour.Behaviour`: a reference to itself or one of its children
          """
          self.logger.debug("%s.tick()" % self.__class__.__name__)
          # Required behaviour for *all* behaviours and composites is
          # for tick() to check if it isn't running and initialise
          if self.status != Status.RUNNING:
              # selectors dont do anything specific on initialisation
              #   - the current child is managed by the update, never needs to be 'initialised'
              # run subclass (user) handles
              self.initialise()
          # run any work designated by a customised instance of this class
          self.update()
          previous = self.current_child
          for child in self.children:
              for node in child.tick():
                  yield node
                  if node is child:
                      if node.status == Status.RUNNING or node.status == Status.SUCCESS:
                          self.current_child = child
                          self.status = node.status
                          if previous is None or previous != self.current_child:
                              # we interrupted, invalidate everything at a lower priority
                              passed = False
                              for child in self.children:
                                  if passed:
                                      if child.status != Status.INVALID:
                                          child.stop(Status.INVALID)
                                  passed = True if child == self.current_child else passed
                          yield self
                          return
          # all children failed, set failure ourselves and current child to the last bugger who failed us
          self.status = Status.FAILURE
          try:
              self.current_child = self.children[-1]
          except IndexError:
              self.current_child = None
          yield self
code_tokens: def tick ( self ) : self . logger . debug ( "%s.tick()" % self . __class__ . __name__ ) if self . status != Status . RUNNING : self . initialise ( ) self . update ( ) previous = self . current_child for child in self . children : for node in child . tick ( ) : yield node if node is child : if node . status == Status . RUNNING or node . status == Status . SUCCESS : self . current_child = child self . status = node . status if previous is None or previous != self . current_child : passed = False for child in self . children : if passed : if child . status != Status . INVALID : child . stop ( Status . INVALID ) passed = True if child == self . current_child else passed yield self return self . status = Status . FAILURE try : self . current_child = self . children [ - 1 ] except IndexError : self . current_child = None yield self
short_docstring: Run the tick behaviour for this selector.
short_docstring_tokens: Run the tick behaviour for this selector .
comment: """
          Run the tick behaviour for this selector. Note that the status
          of the tick is always determined by its children, not
          by the user customised update function.
  
          Yields:
              :class:`~py_trees.behaviour.Behaviour`: a reference to itself or one of its children
          """$SEP$# Required behaviour for *all* behaviours and composites is$SEP$# for tick() to check if it isn't running and initialise$SEP$# selectors dont do anything specific on initialisation$SEP$#   - the current child is managed by the update, never needs to be 'initialised'$SEP$# run subclass (user) handles$SEP$# run any work designated by a customised instance of this class$SEP$# we interrupted, invalidate everything at a lower priority$SEP$# all children failed, set failure ourselves and current child to the last bugger who failed us