Skip to content

Commit

Permalink
fix some conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Zulfaqar Azmi <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 committed Jan 5, 2025
1 parent 08faa0b commit 3253f79
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ bool NormalLaneChange::get_path_using_path_shifter(
PathWithLaneId prepare_segment;
try {
if (!utils::lane_change::get_prepare_segment(
common_data_ptr_, prev_module_output_.path, prep_metric, prepare_segment)) {
common_data_ptr_, prev_module_output_.path, prep_metric.length, prepare_segment)) {
debug_print("Reject: failed to get valid prepare segment!");
continue;
}
Expand All @@ -1268,6 +1268,11 @@ bool NormalLaneChange::get_path_using_path_shifter(
const auto lane_changing_metrics = get_lane_changing_metrics(
prepare_segment, prep_metric, shift_length, dist_to_next_regulatory_element);

// set_prepare_velocity must only be called after computing lane change metrics, as lane change
// metrics rely on the prepare segment's original velocity as max_path_velocity.
utils::lane_change::set_prepare_velocity(
prepare_segment, common_data_ptr_->get_ego_speed(), prep_metric.velocity);

for (const auto & lc_metric : lane_changing_metrics) {
const auto debug_print_lat = [&](const std::string & s) {
RCLCPP_DEBUG(
Expand Down

0 comments on commit 3253f79

Please sign in to comment.