File tree 1 file changed +6
-1
lines changed
planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1249,7 +1249,7 @@ bool NormalLaneChange::get_path_using_path_shifter(
1249
1249
PathWithLaneId prepare_segment;
1250
1250
try {
1251
1251
if (!utils::lane_change::get_prepare_segment (
1252
- common_data_ptr_, prev_module_output_.path , prep_metric, prepare_segment)) {
1252
+ common_data_ptr_, prev_module_output_.path , prep_metric. length , prepare_segment)) {
1253
1253
debug_print (" Reject: failed to get valid prepare segment!" );
1254
1254
continue ;
1255
1255
}
@@ -1268,6 +1268,11 @@ bool NormalLaneChange::get_path_using_path_shifter(
1268
1268
const auto lane_changing_metrics = get_lane_changing_metrics (
1269
1269
prepare_segment, prep_metric, shift_length, dist_to_next_regulatory_element);
1270
1270
1271
+ // set_prepare_velocity must only be called after computing lane change metrics, as lane change
1272
+ // metrics rely on the prepare segment's original velocity as max_path_velocity.
1273
+ utils::lane_change::set_prepare_velocity (
1274
+ prepare_segment, common_data_ptr_->get_ego_speed (), prep_metric.velocity );
1275
+
1271
1276
for (const auto & lc_metric : lane_changing_metrics) {
1272
1277
const auto debug_print_lat = [&](const std::string & s) {
1273
1278
RCLCPP_DEBUG (
You can’t perform that action at this time.
0 commit comments