Skip to content

Stop Sign bounding boxes mismatch between actors and environment objects in large maps #9394

@LuisPovedaCano

Description

@LuisPovedaCano

Setup
CARLA version: ue4-dev
Platform: Ubuntu 22.04
Python version: 3.10
GPU: NVIDIA RTX 4090
GPU Drivers: 580.xx

Describe the bug
When testing traffic sign bounding boxes in large maps (such as Town12), the bounding box values returned by:

  • Actor.bounding_box
  • EnvironmentObject.bounding_box
    are not consistent for Stop Signs.
    While for most traffic signs both values are identical, Stop Signs show different transforms and extents when comparing these sources.

Steps to reproduce
Open 'Town12'
Run the Python script in the Scripts section.

Expected behavior
Both bounding boxes (actor’s bounding_box and environment object’s bounding_box) should refer to the same spatial region and be aligned — especially for static traffic signs like Stop Signs.

Scripts

import time
import carla
import numpy as np

client = carla.Client('localhost', 2000)
client.set_timeout(80.0)
client.load_world('Town12')

time.sleep(3.0)

world = client.get_world()
sp = world.get_spectator()
sp.set_location(carla.Location(x=-1130, y=3930.0, z=360.0))

time.sleep(3.0)

actors = world.get_actors()
for x in actors:
    if 8 in x.semantic_tags and not x.is_dormant:
        bbox = x.bounding_box.get_world_vertices(x.get_transform())
        for y in bbox:
            world.debug.draw_point(y, size=0.2, color=carla.Color(0, 255, 0), life_time=100.0)

for x in actors:
    if 8 in x.semantic_tags and not x.is_dormant:
        bbox = x.trigger_volume.get_world_vertices(x.get_transform())
        for y in bbox:
            world.debug.draw_point(y, size=0.2, color=carla.Color(0, 0, 255), life_time=100.0)

time.sleep(1.0)

signs = world.get_environment_objects(carla.CityObjectLabel.TrafficSigns)
for obj in signs:
    bbox = obj.bounding_box.get_world_vertices(obj.transform)
    for y in bbox:
        world.debug.draw_point(y, size=0.2, color=carla.Color(255, 255, 255), life_time=100.0)

time.sleep(20.0)

Screenshots
Image
The green points points are from actor.bounding_box
The gray points are from environment_actor.bounding_box

Metadata

Metadata

Labels

Type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions