Skip to content

Conversation

@LuisPovedaCano
Copy link
Contributor

@LuisPovedaCano LuisPovedaCano commented Oct 22, 2025

Fix for issue #9362 was already merge in @GoodarzMehr PR #9381
Currently working on fix for issues #9361 #9385 and #9387

For the issue #9361 this is the current status.
In Green the bounding box returned by '.bounding_box' in the actor.
In Blue the bounding box returned by '.trigger_volume' in the actor.
In Gray the bounding box returned by 'bounding_box' in the environment object.
Screenshot from 2025-10-28 10-46-11

This is for a new issue. The bounding boxes for the actors in large maps are different with both calls. I saw this behavior only for the Stop Signs.

Script used for testing in the 'Town12'

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)

Fixed the issue #9385.
Screenshot from 2025-10-27 12-42-57

Fixed the issue #9387
Screenshot from 2025-10-28 10-11-24

Script used to test these two issues.

import carla

client = carla.Client()
world = client.get_world()

# Get the ego vehicle
ego = None
for vehicle in world.get_actors().filter('vehicle.*'):
    if vehicle.attributes['role_name'] == 'hero':
        print("Ego vehicle found")
        ego = vehicle
        break

if ego is not None:
    ego_loc = ego.get_location()

world.wait_for_tick()
for i, traffic in enumerate(world.get_actors().filter("traffic*")):
    tt = traffic.get_transform()
    if ego is not None and tt.location.distance(ego_loc) > 100:
        continue

    bb = traffic.bounding_box
    bb.location = tt.transform(bb.location)
    bb.rotation = carla.Rotation(roll=bb.rotation.roll, pitch=bb.rotation.pitch, yaw=bb.rotation.yaw + tt.rotation.yaw)
    world.debug.draw_box(bb, bb.rotation, color=carla.Color(0,255,0),life_time=60)

    tv = traffic.trigger_volume
    tv.location = tt.transform(tv.location)
    tv.rotation = carla.Rotation(roll=tv.rotation.roll, pitch=tv.rotation.pitch, yaw=tv.rotation.yaw + tt.rotation.yaw)
    world.debug.draw_box(tv, tv.rotation, color=carla.Color(0,0,255), life_time=60)

This change is Reviewable

@LuisPovedaCano LuisPovedaCano self-assigned this Oct 22, 2025
@update-docs
Copy link

update-docs bot commented Oct 22, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update our CHANGELOG.md based on your changes.

Added new parameter for ActorInfo for the trigger volume. Now `get_trigger_volume` returns the real trigger volume
@LuisPovedaCano LuisPovedaCano marked this pull request as ready for review October 23, 2025 10:03
@LuisPovedaCano LuisPovedaCano requested a review from a team as a code owner October 23, 2025 10:03
@LuisPovedaCano LuisPovedaCano requested a review from Blyron October 23, 2025 10:04
glopezdiest
glopezdiest previously approved these changes Oct 23, 2025
Copy link
Contributor

@glopezdiest glopezdiest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glopezdiest reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Blyron)

@LuisPovedaCano LuisPovedaCano changed the title Fix for the issues 9361 and 9362 Fix for the issue 9362 Oct 24, 2025
@LuisPovedaCano LuisPovedaCano changed the title Fix for the issue 9362 Fix for the issues 9361 and 9362 Oct 24, 2025
@LuisPovedaCano LuisPovedaCano marked this pull request as draft October 24, 2025 10:11
@LuisPovedaCano LuisPovedaCano changed the title Fix for the issues 9361 and 9362 Fix for the issues 9361 and 9385 Oct 24, 2025
@LuisPovedaCano LuisPovedaCano changed the title Fix for the issues 9361 and 9385 Fix for the issues 9361, 9385 and 9387 Oct 24, 2025
Add RegisterEnvironmentObjects method and update object registration logic
@LuisPovedaCano LuisPovedaCano marked this pull request as ready for review October 28, 2025 09:22
Copy link
Contributor

@glopezdiest glopezdiest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glopezdiest reviewed 12 of 12 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Blyron)

@LuisPovedaCano LuisPovedaCano merged commit 6e83de0 into ue4-dev Oct 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants