original_docstring: 
          Run the tick behaviour for this chooser. Note that the status
          of the tick is (for now) 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 chooser. Note that the status
  of the tick is (for now) always determined by its children, not
  by the user customised update function.
docstring_tokens: Run the tick behaviour for this chooser . Note that the status of the tick is ( for now ) always determined by its children not by the user customised update function .
code: def tick(self):
          """
          Run the tick behaviour for this chooser. Note that the status
          of the tick is (for now) 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:
              # chooser specific initialisation
              # invalidate everything
              for child in self.children:
                  child.stop(Status.INVALID)
              self.current_child = None
              # run subclass (user) initialisation
              self.initialise()
          # run any work designated by a customised instance of this class
          self.update()
          if self.current_child is not None:
              # run our child, and invalidate anyone else who may have been ticked last run
              # (bit wasteful always checking for the latter)
              for child in self.children:
                  if child is self.current_child:
                      for node in self.current_child.tick():
                          yield node
                  elif child.status != Status.INVALID:
                      child.stop(Status.INVALID)
          else:
              for child in self.children:
                  for node in child.tick():
                      yield node
                  if child.status == Status.RUNNING or child.status == Status.SUCCESS:
                      self.current_child = child
                      break
          new_status = self.current_child.status if self.current_child is not None else Status.FAILURE
          self.stop(new_status)
          yield self
code_tokens: def tick ( self ) : self . logger . debug ( "%s.tick()" % self . __class__ . __name__ ) if self . status != Status . RUNNING : for child in self . children : child . stop ( Status . INVALID ) self . current_child = None self . initialise ( ) self . update ( ) if self . current_child is not None : for child in self . children : if child is self . current_child : for node in self . current_child . tick ( ) : yield node elif child . status != Status . INVALID : child . stop ( Status . INVALID ) else : for child in self . children : for node in child . tick ( ) : yield node if child . status == Status . RUNNING or child . status == Status . SUCCESS : self . current_child = child break new_status = self . current_child . status if self . current_child is not None else Status . FAILURE self . stop ( new_status ) yield self
short_docstring: Run the tick behaviour for this chooser.
short_docstring_tokens: Run the tick behaviour for this chooser .
comment: """
          Run the tick behaviour for this chooser. Note that the status
          of the tick is (for now) 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$# chooser specific initialisation$SEP$# invalidate everything$SEP$# run subclass (user) initialisation$SEP$# run any work designated by a customised instance of this class$SEP$# run our child, and invalidate anyone else who may have been ticked last run$SEP$# (bit wasteful always checking for the latter)