Skip to content

Fix traffic light snapshots outside junctions - #9853

Open
timothyanderson096-ocdealcheck wants to merge 2 commits into
carla-simulator:ue58-devfrom
timothyanderson096-ocdealcheck:fix-9832-traffic-light-group
Open

Fix traffic light snapshots outside junctions#9853
timothyanderson096-ocdealcheck wants to merge 2 commits into
carla-simulator:ue58-devfrom
timothyanderson096-ocdealcheck:fix-9832-traffic-light-group

Conversation

@timothyanderson096-ocdealcheck

@timothyanderson096-ocdealcheck timothyanderson096-ocdealcheck commented Aug 30, 2026

Copy link
Copy Markdown

Description

Standalone OpenDRIVE traffic lights use a fallback controller-registration path when their controller is not associated with a junction. That path appended the controller directly to the group's controller array, bypassing ATrafficLightGroup::AddController() and its Controller->SetGroup(this) call.

Without the owning group, WorldObserver emits a zero-initialized client snapshot: the state appears permanently Red, the OpenDRIVE signal ID is empty, and all phase timings are zero even though the server-side component accepts state changes.

This change:

  • registers fallback controllers through ATrafficLightGroup::AddController()
  • adds a smoke regression using a minimal OpenDRIVE map with one traffic light outside any junction
  • verifies the signal ID, phase timings, and Green/Yellow/Red states after fresh world snapshots

Fixes #9832

Where has this been tested?

  • Platform(s): Linux x86_64 (source-level validation)
  • Python version(s): 3.12.13
  • Unreal Engine version(s): Not run locally; a CARLA UE5 server/build was unavailable
  • Local checks: Python syntax parsing, embedded OpenDRIVE XML parsing, line-length check, and git diff --check

The regression uses the issue reporter's runtime-proven minimal fixture and is intended to be exercised against the UE5 server by the upstream smoke-test environment.

Possible Drawbacks

The smoke suite now generates one additional minimal OpenDRIVE world, adding some runtime. The production behavior change is limited to fallback traffic-light controllers and gives them the same group registration used by the normal controller path.


This change is Reviewable

@update-docs

update-docs Bot commented Aug 30, 2026

Copy link
Copy Markdown

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.

@Blyron
Blyron changed the base branch from ue5-dev to ue58-dev August 31, 2026 09:25
@Blyron

Blyron commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Hey, we are truly sorry about the delay;

Please, target ue58-dev

Register fallback traffic-light controllers through the group API so they receive their owning group. Add a smoke regression covering OpenDRIVE traffic lights outside junctions and their client snapshot state.

Co-authored-by: Codex <codex@openai.com>
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.

Traffic light outside a junction accepts set_state(), but get_state() always returns Red

2 participants