MCPcopy Create free account
hub / github.com/OpenDriveLab/DriveAdapter / tick

Method tick

scenario_runner/srunner/tools/py_trees_port.py:48–72  ·  view source on GitHub ↗

A decorator's tick is exactly the same as a normal proceedings for a Behaviour's tick except that it also ticks the decorated child node. Yields: :class:`~py_trees.behaviour.Behaviour`: a reference to itself or one of its children

(self)

Source from the content-addressed store, hash-verified

46 self.decorated.parent = self
47
48 def tick(self):
49 """
50 A decorator's tick is exactly the same as a normal proceedings for
51 a Behaviour's tick except that it also ticks the decorated child node.
52 Yields:
53 :class:`~py_trees.behaviour.Behaviour`: a reference to itself or one of its children
54 """
55 self.logger.debug("%s.tick()" % self.__class__.__name__)
56 # initialise just like other behaviours/composites
57 if self.status != py_trees.common.Status.RUNNING:
58 self.initialise()
59 # interrupt proceedings and process the child node
60 # (including any children it may have as well)
61 for node in self.decorated.tick():
62 yield node
63 # resume normal proceedings for a Behaviour's tick
64 new_status = self.update()
65 if new_status not in list(py_trees.common.Status):
66 self.logger.error(
67 "A behaviour returned an invalid status, setting to INVALID [%s][%s]" % (new_status, self.name))
68 new_status = py_trees.common.Status.INVALID
69 if new_status != py_trees.common.Status.RUNNING:
70 self.stop(new_status)
71 self.status = new_status
72 yield self
73
74 def stop(self, new_status=py_trees.common.Status.INVALID):
75 """

Callers 6

setup_sensorsMethod · 0.45
__init__Method · 0.45
_tick_scenarioMethod · 0.45
handle_actor_batchMethod · 0.45
request_new_actorMethod · 0.45

Calls 3

stopMethod · 0.95
initialiseMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected