MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / get_bounding_box

Method get_bounding_box

PythonAPI/examples/no_rendering_mode.py:176–187  ·  view source on GitHub ↗

Gets the bounding box corners of an actor in world space

(actor)

Source from the content-addressed store, hash-verified

174
175 @staticmethod
176 def get_bounding_box(actor):
177 """Gets the bounding box corners of an actor in world space"""
178 bb = actor.trigger_volume.extent
179 corners = [carla.Location(x=-bb.x, y=-bb.y),
180 carla.Location(x=bb.x, y=-bb.y),
181 carla.Location(x=bb.x, y=bb.y),
182 carla.Location(x=-bb.x, y=bb.y),
183 carla.Location(x=-bb.x, y=-bb.y)]
184 corners = [x + actor.trigger_volume.location for x in corners]
185 t = actor.get_transform()
186 t.transform(corners)
187 return corners
188
189# ==============================================================================
190# -- FadingText ----------------------------------------------------------------

Callers 3

draw_traffic_signsMethod · 0.45
_render_speed_limitsMethod · 0.45

Calls 1

LocationMethod · 0.45

Tested by

no test coverage detected