fix(autoware_crosswalk_traffic_light_estimator): add process that guard access to empty elements #10281
+10
−2
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
There is a problem that the crosswalk traffic light estimator drops out when a pedestrian signal is received with V2I signal coordination.
This problem is caused by a process in crosswalk_traffic_light_estimator that accesses elements without checking for the presence of signal recognition results.
Accessing an element without checking its value even when it is empty causes a segmentation fault.
This PR solves the problem by adding a process that prevents the result of signal recognition from being referenced in an empty state.
Related links
Private Links:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.