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

Method stop

scenario_runner/srunner/tools/py_trees_port.py:74–89  ·  view source on GitHub ↗

As with other composites, it checks if the child is running and stops it if that is the case. Args: new_status (:class:`~py_trees.common.Status`): the behaviour is transitioning to this new status

(self, new_status=py_trees.common.Status.INVALID)

Source from the content-addressed store, hash-verified

72 yield self
73
74 def stop(self, new_status=py_trees.common.Status.INVALID):
75 """
76 As with other composites, it checks if the child is running
77 and stops it if that is the case.
78 Args:
79 new_status (:class:`~py_trees.common.Status`): the behaviour is transitioning to this new status
80 """
81 self.logger.debug("%s.stop(%s)" % (self.__class__.__name__, new_status))
82 self.terminate(new_status)
83 # priority interrupt handling
84 if new_status == py_trees.common.Status.INVALID:
85 self.decorated.stop(new_status)
86 # if the decorator returns SUCCESS/FAILURE and should stop the child
87 if self.decorated.status == py_trees.common.Status.RUNNING:
88 self.decorated.stop(py_trees.common.Status.INVALID)
89 self.status = new_status
90
91 def tip(self):
92 """

Callers 4

tickMethod · 0.95
destroyMethod · 0.45
cleanupMethod · 0.45
cleanMethod · 0.45

Calls 1

terminateMethod · 0.45

Tested by

no test coverage detected