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

Class TimeOut

scenario_runner/srunner/scenariomanager/timer.py:133–158  ·  view source on GitHub ↗

This class contains an atomic timeout behavior. It uses the CARLA game time, not the system time which is used by the py_trees timer.

Source from the content-addressed store, hash-verified

131
132
133class TimeOut(SimulationTimeCondition):
134
135 """
136 This class contains an atomic timeout behavior.
137 It uses the CARLA game time, not the system time which is used by
138 the py_trees timer.
139 """
140
141 def __init__(self, timeout, name="TimeOut"):
142 """
143 Setup timeout
144 """
145 super(TimeOut, self).__init__(timeout, name=name)
146 self.timeout = False
147
148 def update(self):
149 """
150 Upon reaching the timeout value the status changes to SUCCESS
151 """
152
153 new_status = super(TimeOut, self).update()
154
155 if new_status == py_trees.common.Status.SUCCESS:
156 self.timeout = True
157
158 return new_status

Callers 8

_create_behaviorMethod · 0.90
_create_behaviorMethod · 0.90
_create_behaviorMethod · 0.90
_create_behaviorMethod · 0.90
_create_behaviorMethod · 0.90
_create_behaviorMethod · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected