Repository navigation
test(autoware_traffic_light_visualization): add characterization test for TrafficLightMapVisualizerNode - #12487
Merged
takam5f2 merged 3 commits intoApr 21, 2026
Conversation
…s for TrafficLightMapVisualizerNode Add characterization tests to capture the current behavior of TrafficLightMapVisualizerNode before refactoring. These tests serve as a safety net to ensure behavior is preserved during upcoming logic separation and code cleanup.
takam5f2
requested review from
MasatoSaeki,
a-maumau,
technolojin,
tzhong518 and
yukkysaito
as code owners
April 16, 2026 10:49
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12487 +/- ##
===========================================
+ Coverage 18.53% 19.25% +0.72%
===========================================
Files 1916 6 -1910
Lines 131184 270 -130914
Branches 44341 39 -44302
===========================================
- Hits 24314 52 -24262
+ Misses 86872 187 -86685
+ Partials 19998 31 -19967
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a-maumau
approved these changes
Apr 21, 2026
a-maumau
left a comment
Contributor
There was a problem hiding this comment.
LGTM!
only one comment for the typo in the comment.
…m with XZ side view Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp>
takam5f2
enabled auto-merge (squash)
April 21, 2026 13:14
mkquda
pushed a commit
to tier4/autoware_universe
that referenced
this pull request
Apr 22, 2026
… for TrafficLightMapVisualizerNode (autowarefoundation#12487) * test(autoware_traffic_light_visualization): add characterization tests for TrafficLightMapVisualizerNode Add characterization tests to capture the current behavior of TrafficLightMapVisualizerNode before refactoring. These tests serve as a safety net to ensure behavior is preserved during upcoming logic separation and code cleanup. * test(autoware_traffic_light_visualization): clarify map layout diagram with XZ side view Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> --------- Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp>
XiaoyuWang0601
pushed a commit
to XiaoyuWang0601/autoware_universe
that referenced
this pull request
Apr 23, 2026
… for TrafficLightMapVisualizerNode (autowarefoundation#12487) * test(autoware_traffic_light_visualization): add characterization tests for TrafficLightMapVisualizerNode Add characterization tests to capture the current behavior of TrafficLightMapVisualizerNode before refactoring. These tests serve as a safety net to ensure behavior is preserved during upcoming logic separation and code cleanup. * test(autoware_traffic_light_visualization): clarify map layout diagram with XZ side view Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> --------- Signed-off-by: Takayuki AKAMINE <takayuki.akamine@tier4.jp> Signed-off-by: XiaoyuWang0601 <xiaoyu.wang@tier4.jp>
This was referenced May 2, 2026
takam5f2
added a commit
that referenced
this pull request
May 15, 2026
… and tidy internal naming (#12553) Second of a planned series of incremental refactors for traffic_light_map_visualizer (follow-up to #12511). - Introduce Bulb { id, position, color } and BulbsByGroupId, and extract `extract_bulbs(map_traffic_lights) -> BulbsByGroupId` as a free function. TrafficLightVisualizer no longer holds lanelet::ConstPoint3d; lanelet API knowledge is confined to the conversion seam. - Extract `parse_bulb_color` helper. - Tidy helper signatures (pass Time by value, hoist `using` to namespace scope) and scope TrafficLightGroupArray / LaneletMapBin aliases to the node class private section. - Internal renames for clarity: viz_lanelet_map -> lanelet_map, regulatory_element -> traffic_light, traffic_lights -> map_traffic_lights, current_time -> stamp, plus subscription / publisher / callback member updates. - Drop noisy "Map is loaded" debug log. - Update copyright year to 2020-2026. Behavior is preserved end-to-end; the characterization test from #12487 acts as the safety net.
PanConChicharron
pushed a commit
to PanConChicharron/autoware.universe
that referenced
this pull request
Jun 10, 2026
…est and rename core unit test (autowarefoundation#12612) * test(autoware_traffic_light_visualization): retire characterization test for TrafficLightMapVisualizerNode The characterization test introduced in autowarefoundation#12487 has served its purpose as the safety net during the refactor series (autowarefoundation#12511 / autowarefoundation#12553 / autowarefoundation#12591 / autowarefoundation#12596). Its scope is now fully covered by the finer-grained layers: - extract_bulbs unit tests: lanelet -> Bulb conversion - TrafficLightVisualizer core unit tests: bulb -> marker generation - Node smoke tests: pub/sub plumbing and map-not-received guard Remove the characterization test and its CMakeLists.txt entry. The remaining test executables run an order of magnitude faster, with no loss of behavioural coverage. * test(autoware_traffic_light_visualization): rename TrafficLightVisualizer unit test to take the package's main test slot With the characterization test retired, the unit test file for TrafficLightVisualizer is the most natural fit for the package's main test name. Rename it from test_traffic_light_map_visualizer_core.cpp to test_traffic_light_map_visualizer.cpp and update the matching ament_add_gtest target name in CMakeLists.txt accordingly. No content changes; this is a pure rename + CMake target rename. Signed-off-by: Arjun Jagdish Ram <arjun.ram@tier4.jp>
TetsuKawa
pushed a commit
to TetsuKawa/autoware_universe
that referenced
this pull request
Sep 7, 2026
… and tidy internal naming (autowarefoundation#12553) Second of a planned series of incremental refactors for traffic_light_map_visualizer (follow-up to autowarefoundation#12511). - Introduce Bulb { id, position, color } and BulbsByGroupId, and extract `extract_bulbs(map_traffic_lights) -> BulbsByGroupId` as a free function. TrafficLightVisualizer no longer holds lanelet::ConstPoint3d; lanelet API knowledge is confined to the conversion seam. - Extract `parse_bulb_color` helper. - Tidy helper signatures (pass Time by value, hoist `using` to namespace scope) and scope TrafficLightGroupArray / LaneletMapBin aliases to the node class private section. - Internal renames for clarity: viz_lanelet_map -> lanelet_map, regulatory_element -> traffic_light, traffic_lights -> map_traffic_lights, current_time -> stamp, plus subscription / publisher / callback member updates. - Drop noisy "Map is loaded" debug log. - Update copyright year to 2020-2026. Behavior is preserved end-to-end; the characterization test from autowarefoundation#12487 acts as the safety net. Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
TetsuKawa
pushed a commit
to TetsuKawa/autoware_universe
that referenced
this pull request
Sep 7, 2026
…est and rename core unit test (autowarefoundation#12612) * test(autoware_traffic_light_visualization): retire characterization test for TrafficLightMapVisualizerNode The characterization test introduced in autowarefoundation#12487 has served its purpose as the safety net during the refactor series (autowarefoundation#12511 / autowarefoundation#12553 / autowarefoundation#12591 / autowarefoundation#12596). Its scope is now fully covered by the finer-grained layers: - extract_bulbs unit tests: lanelet -> Bulb conversion - TrafficLightVisualizer core unit tests: bulb -> marker generation - Node smoke tests: pub/sub plumbing and map-not-received guard Remove the characterization test and its CMakeLists.txt entry. The remaining test executables run an order of magnitude faster, with no loss of behavioural coverage. * test(autoware_traffic_light_visualization): rename TrafficLightVisualizer unit test to take the package's main test slot With the characterization test retired, the unit test file for TrafficLightVisualizer is the most natural fit for the package's main test name. Rename it from test_traffic_light_map_visualizer_core.cpp to test_traffic_light_map_visualizer.cpp and update the matching ament_add_gtest target name in CMakeLists.txt accordingly. No content changes; this is a pure rename + CMake target rename. Signed-off-by: TetsuKawa <kawaguchitnon@icloud.com>
TetsuKawa
pushed a commit
to TetsuKawa/autoware_universe
that referenced
this pull request
Sep 7, 2026
… and tidy internal naming (autowarefoundation#12553) Second of a planned series of incremental refactors for traffic_light_map_visualizer (follow-up to autowarefoundation#12511). - Introduce Bulb { id, position, color } and BulbsByGroupId, and extract `extract_bulbs(map_traffic_lights) -> BulbsByGroupId` as a free function. TrafficLightVisualizer no longer holds lanelet::ConstPoint3d; lanelet API knowledge is confined to the conversion seam. - Extract `parse_bulb_color` helper. - Tidy helper signatures (pass Time by value, hoist `using` to namespace scope) and scope TrafficLightGroupArray / LaneletMapBin aliases to the node class private section. - Internal renames for clarity: viz_lanelet_map -> lanelet_map, regulatory_element -> traffic_light, traffic_lights -> map_traffic_lights, current_time -> stamp, plus subscription / publisher / callback member updates. - Drop noisy "Map is loaded" debug log. - Update copyright year to 2020-2026. Behavior is preserved end-to-end; the characterization test from autowarefoundation#12487 acts as the safety net.
TetsuKawa
pushed a commit
to TetsuKawa/autoware_universe
that referenced
this pull request
Sep 7, 2026
…est and rename core unit test (autowarefoundation#12612) * test(autoware_traffic_light_visualization): retire characterization test for TrafficLightMapVisualizerNode The characterization test introduced in autowarefoundation#12487 has served its purpose as the safety net during the refactor series (autowarefoundation#12511 / autowarefoundation#12553 / autowarefoundation#12591 / autowarefoundation#12596). Its scope is now fully covered by the finer-grained layers: - extract_bulbs unit tests: lanelet -> Bulb conversion - TrafficLightVisualizer core unit tests: bulb -> marker generation - Node smoke tests: pub/sub plumbing and map-not-received guard Remove the characterization test and its CMakeLists.txt entry. The remaining test executables run an order of magnitude faster, with no loss of behavioural coverage. * test(autoware_traffic_light_visualization): rename TrafficLightVisualizer unit test to take the package's main test slot With the characterization test retired, the unit test file for TrafficLightVisualizer is the most natural fit for the package's main test name. Rename it from test_traffic_light_map_visualizer_core.cpp to test_traffic_light_map_visualizer.cpp and update the matching ament_add_gtest target name in CMakeLists.txt accordingly. No content changes; this is a pure rename + CMake target rename.
This was referenced Sep 15, 2026
This was referenced Oct 6, 2026
This was referenced Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add characterization tests for
TrafficLightMapVisualizerNodeto capture the current behavior before refactoring. The node has several refactoring candidates including logic/node separation, dead code removal, and deeply nested loop simplification. These tests serve as a safety net to ensure behavior is preserved during those changes.5 test cases covering:
Related links
Parent Issue:
How was this PR tested?
colcon build --packages-select autoware_traffic_light_visualization \ --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON colcon test --packages-select autoware_traffic_light_visualization \ --event-handlers console_direct+All 5 tests pass.
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.