fix(autoware_behavior_path_lane_change_module): avoid empty current lanes #1445
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
Overview:
I have modified the lane change module so that it can utilize
current_lanes
even iftarget_lanes
is empty.Details:
When driving manually with Autoware activated, sometimes
target_lanes
would be empty, which would causecurrent_lanes
to be empty as well.If current_lanes is empty, an error occurs in the
current_lanes.back()
that is called afterwards.Specifically, I encountered the error at utils::lane_change::calcMinimumLaneChangeLength(
route_handler, current_lanes.back(), *lane_change_parameters_, direction_);
Related links
Parent Issue:
Private Links:
How was this PR tested?
I tested by logging simulator with the TIER IV private rosbag and verified that the planner is now stable and no longer aborts.
Notes for reviewers
Recently, this phenomenon has become more frequent, but the reason why target_lanes becomes empty during manual driving remains unclear.
Interface changes
Does not change.
Effects on system behavior
Does not change.