Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lane_change): reduce prepare duration when blinker has been activated #9185

Open
wants to merge 46 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e7b994e
add minimum prepare duration parameter
mkquda Oct 25, 2024
5da415d
reduce prepare duration according to signal activation time
mkquda Oct 25, 2024
19d7caa
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Oct 26, 2024
ed271cb
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Oct 30, 2024
dd0cba0
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Oct 31, 2024
c12034a
chore: update CODEOWNERS (#9203)
awf-autoware-bot[bot] Oct 31, 2024
a56ce35
refactor(time_utils): prefix package and namespace with autoware (#9173)
esteve Oct 31, 2024
8cda060
feat(rtc_interface): add requested field (#9202)
go-sakayori Oct 31, 2024
0ed5613
fix(mpc_lateral_controller): correctly resample the MPC trajectory ya…
maxime-clem Oct 31, 2024
092f5ae
fix(bpp): prevent accessing nullopt (#9204)
shmpwk Oct 31, 2024
acc2286
refactor(autoware_map_based_prediction): split pedestrian and bicycle…
technolojin Oct 31, 2024
882c4dc
refactor(ndt_scan_matcher, ndt_omp): move ndt_omp into ndt_scan_match…
SakodaShintaro Oct 31, 2024
9d4b5b4
feat(autoware_test_utils): add traffic light msgs parser (#9177)
soblin Oct 31, 2024
79009b6
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Oct 31, 2024
0277683
modify implementation to compute and keep actual prepare duration in …
mkquda Nov 1, 2024
c19c534
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 4, 2024
b9afb08
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 6, 2024
2853e4c
if LC path is approved, set prepare duration in transient data from a…
mkquda Nov 6, 2024
e0ffba8
change default value of LC param min_prepare_duration
mkquda Nov 6, 2024
bcc0e8e
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 6, 2024
d23249a
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 13, 2024
ed8cf38
Merge remote-tracking branch 'origin/awf-latest' into RT1-8204-reduce…
mkquda Nov 13, 2024
d8fd96b
Update planning/behavior_path_planner/autoware_behavior_path_lane_cha…
mkquda Nov 15, 2024
62740ab
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 22, 2024
64477c9
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 25, 2024
8bacfed
add function to set signal activation time, add docstring for functio…
mkquda Nov 25, 2024
3071e20
check for zero value max_acc to avoid division by zero
mkquda Nov 25, 2024
4b3ea3a
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 26, 2024
dfac34b
chore: rename codeowners file
tkimura4 Nov 27, 2024
275f13d
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 28, 2024
aa5bb07
chore: rename codeowners file
tkimura4 Nov 27, 2024
fdb9eb2
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 29, 2024
27df6d6
chore: rename codeowners file
tkimura4 Nov 27, 2024
5ca9cbb
allow decelerating in lane changing phase near terminal
mkquda Nov 29, 2024
99e459d
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Nov 29, 2024
6397625
fix spelling
mkquda Dec 2, 2024
b875410
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Dec 2, 2024
0bb17b0
fix units
mkquda Dec 3, 2024
cca0655
allow decelerating in lane changing phase near terminal
mkquda Nov 29, 2024
e77d6bf
Update planning/behavior_path_planner/autoware_behavior_path_lane_cha…
mkquda Dec 3, 2024
8b4ed32
run pre-commit check
mkquda Dec 4, 2024
7b7033e
Merge branch 'awf-latest' into RT1-8204-reduce-prepare-duration-when-…
mkquda Dec 4, 2024
2436114
fix spelling
mkquda Dec 4, 2024
3ccc458
Merge branch 'RT1-8751-improve-computation-of-lane-changing-accelerat…
mkquda Dec 4, 2024
9f5a3e5
fix format
mkquda Dec 4, 2024
b6b5b13
Merge branch 'RT1-8751-improve-computation-of-lane-changing-accelerat…
mkquda Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -886,13 +886,15 @@ The following parameters are configurable in [lane_change.param.yaml](https://gi
| `backward_length_buffer_for_end_of_lane` | [m] | double | The end of lane buffer to ensure ego vehicle has enough distance to start lane change | 3.0 |
| `backward_length_buffer_for_blocking_object` | [m] | double | The end of lane buffer to ensure ego vehicle has enough distance to start lane change when there is an object in front | 3.0 |
| `backward_length_from_intersection` | [m] | double | Distance threshold from the last intersection to invalidate or cancel the lane change path | 5.0 |
| `trajectory.prepare_duration` | [m] | double | The preparation time for the ego vehicle to be ready to perform lane change. | 4.0 |
| `trajectory.max_prepare_duration` | [s] | double | The maximum preparation time for the ego vehicle to be ready to perform lane change. | 4.0 |
| `trajectory.min_prepare_duration` | [s] | double | The minimum preparation time for the ego vehicle to be ready to perform lane change. | 2.0 |
| `trajectory.lateral_jerk` | [m/s3] | double | Lateral jerk value for lane change path generation | 0.5 |
| `trajectory.minimum_lane_changing_velocity` | [m/s] | double | Minimum speed during lane changing process. | 2.78 |
| `trajectory.lon_acc_sampling_num` | [-] | int | Number of possible lane-changing trajectories that are being influenced by longitudinal acceleration | 3 |
| `trajectory.lat_acc_sampling_num` | [-] | int | Number of possible lane-changing trajectories that are being influenced by lateral acceleration | 3 |
| `trajectory.max_longitudinal_acc` | [m/s2] | double | maximum longitudinal acceleration for lane change | 1.0 |
| `trajectory.min_longitudinal_acc` | [m/s2] | double | maximum longitudinal deceleration for lane change | -1.0 |
| `trajectory.lane_changing_decel_factor` | [-] | double | longitudinal deceleration factor during lane changing phase | 0.5 |
| `min_length_for_turn_signal_activation` | [m] | double | Turn signal will be activated if the ego vehicle approaches to this length from minimum lane change length | 10.0 |
| `lateral_acceleration.velocity` | [m/s] | double | Reference velocity for lateral acceleration calculation (look up table) | [0.0, 4.0, 10.0] |
| `lateral_acceleration.min_values` | [m/s2] | double | Min lateral acceleration values corresponding to velocity (look up table) | [0.4, 0.4, 0.4] |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

# trajectory generation
trajectory:
prepare_duration: 4.0
max_prepare_duration: 4.0
min_prepare_duration: 2.0
lateral_jerk: 0.5
min_longitudinal_acc: -1.0
max_longitudinal_acc: 1.0
Expand All @@ -20,6 +21,7 @@
min_lane_changing_velocity: 2.78
lon_acc_sampling_num: 5
lat_acc_sampling_num: 3
lane_changing_decel_factor: 0.5

# delay lane change
delay_lane_change:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class NormalLaneChange : public LaneChangeBase

void update_lanes(const bool is_approved) final;

void update_transient_data() final;
void update_transient_data(const bool is_approved) final;

void update_filtered_objects() final;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@

virtual void update_lanes(const bool is_approved) = 0;

virtual void update_transient_data() = 0;
virtual void update_transient_data(const bool is_approved) = 0;

virtual void update_filtered_objects() = 0;

Expand Down Expand Up @@ -267,6 +267,15 @@
return turn_signal;
}

void set_signal_activation_time(const bool reset = false) const

Check warning on line 270 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/base_class.hpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/base_class.hpp#L270

Added line #L270 was not covered by tests
{
if (reset) {
signal_activation_time_ = std::nullopt;
} else if (!signal_activation_time_) {
signal_activation_time_ = clock_.now();
}
}

Check warning on line 277 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/base_class.hpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/base_class.hpp#L277

Added line #L277 was not covered by tests

LaneChangeStatus status_{};
PathShifter path_shifter_{};

Expand All @@ -292,6 +301,7 @@

mutable StopWatch<std::chrono::milliseconds> stop_watch_;
mutable lane_change::Debug lane_change_debug_;
mutable std::optional<rclcpp::Time> signal_activation_time_{std::nullopt};

rclcpp::Logger logger_ = utils::lane_change::getLogger(getModuleTypeStr());
mutable rclcpp::Clock clock_{RCL_ROS_TIME};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ double calc_dist_to_last_fit_width(
* of the maximum lane change preparation duration and the maximum velocity of the ego vehicle.
*
* @param common_data_ptr Shared pointer to a CommonData structure, which should include:
* - `lc_param_ptr->lane_change_prepare_duration`: The duration allowed for lane change
* - `lc_param_ptr->maximum_prepare_duration`: The maximum duration allowed for lane change
* preparation.
* - `bpp_param_ptr->max_vel`: The maximum velocity of the ego vehicle.
*
Expand Down Expand Up @@ -106,8 +106,9 @@ double calc_ego_dist_to_lanes_start(
const lanelet::ConstLanelets & target_lanes);

double calc_lane_changing_acceleration(
const double initial_lane_changing_velocity, const double max_path_velocity,
const double lane_changing_time, const double prepare_longitudinal_acc);
const CommonDataPtr & common_data_ptr, const double initial_lane_changing_velocity,
const double max_path_velocity, const double lane_changing_time,
const double prepare_longitudinal_acc);

/**
* @brief Calculates the distance required during a lane change operation.
Expand All @@ -130,6 +131,24 @@ std::vector<double> calc_lon_acceleration_samples(
const CommonDataPtr & common_data_ptr, const double max_path_velocity,
const double prepare_duration);

/**
* @brief calculates the actual prepare duration that will be used for path generation
*
* @details computes the required prepare duration to be used for candidate path
* generation based on the elapsed time of turn signal activation, the minimum
* and maximum parameterized values for the prepare duration,
* and the minimum lane changing velocity.
*
* @param common_data_ptr Shared pointer to a CommonData structure, which includes
* lane change parameters and bpp common parameters.
* @param current_velocity current ego vehicle velocity.
* @param active_signal_duration elapsed time since turn signal activation.
* @return The calculated prepare duration value in seconds (s)
*/
double calc_actual_prepare_duration(
mkquda marked this conversation as resolved.
Show resolved Hide resolved
const CommonDataPtr & common_data_ptr, const double current_velocity,
const double active_signal_duration);

std::vector<PhaseMetrics> calc_prepare_phase_metrics(
const CommonDataPtr & common_data_ptr, const double current_velocity,
const double max_path_velocity, const double min_length_threshold = 0.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ struct TransientData
size_t current_path_seg_idx; // index of nearest segment to ego along current path
double current_path_velocity; // velocity of the current path at the ego position along the path

double lane_change_prepare_duration{0.0};

bool is_ego_near_current_terminal_start{false};
bool is_ego_stuck{false};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,15 @@ struct SafetyParameters

struct TrajectoryParameters
{
double prepare_duration{4.0};
double max_prepare_duration{4.0};
double min_prepare_duration{1.0};
double lateral_jerk{0.5};
double min_longitudinal_acc{-1.0};
double max_longitudinal_acc{1.0};
double th_prepare_length_diff{0.5};
double th_lane_changing_length_diff{0.5};
double min_lane_changing_velocity{5.6};
double lane_changing_decel_factor{0.5};
int lon_acc_sampling_num{10};
int lat_acc_sampling_num{10};
LateralAccelerationMap lat_acc_map{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void LaneChangeInterface::updateData()
module_type_->setPreviousModuleOutput(getPreviousModuleOutput());
module_type_->update_lanes(getCurrentStatus() == ModuleStatus::RUNNING);
module_type_->update_filtered_objects();
module_type_->update_transient_data();
module_type_->update_transient_data(getCurrentStatus() == ModuleStatus::RUNNING);
module_type_->updateSpecialData();

if (isWaitingApproval() || module_type_->isAbortState()) {
Expand Down Expand Up @@ -153,10 +153,10 @@ BehaviorModuleOutput LaneChangeInterface::plan()

BehaviorModuleOutput LaneChangeInterface::planWaitingApproval()
{
*prev_approved_path_ = getPreviousModuleOutput().path;

BehaviorModuleOutput out = getPreviousModuleOutput();

*prev_approved_path_ = out.path;

module_type_->insert_stop_point(module_type_->get_current_lanes(), out.path);
out.turn_signal_info = module_type_->get_current_turn_signal_info();

Expand All @@ -166,7 +166,7 @@ BehaviorModuleOutput LaneChangeInterface::planWaitingApproval()
setObjectsOfInterestData(data.current_obj_pose, data.obj_shape, color);
}

path_reference_ = std::make_shared<PathWithLaneId>(getPreviousModuleOutput().reference_path);
path_reference_ = std::make_shared<PathWithLaneId>(out.reference_path);
stop_pose_ = module_type_->getStopPose();

if (!module_type_->isValidPath()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,32 @@

// trajectory generation
{
p.trajectory.prepare_duration =
getOrDeclareParameter<double>(*node, parameter("trajectory.prepare_duration"));
p.trajectory.max_prepare_duration =
getOrDeclareParameter<double>(*node, parameter("trajectory.max_prepare_duration"));
p.trajectory.min_prepare_duration =
getOrDeclareParameter<double>(*node, parameter("trajectory.min_prepare_duration"));
p.trajectory.lateral_jerk =
getOrDeclareParameter<double>(*node, parameter("trajectory.lateral_jerk"));
p.trajectory.min_longitudinal_acc =
getOrDeclareParameter<double>(*node, parameter("trajectory.min_longitudinal_acc"));
p.trajectory.max_longitudinal_acc =
getOrDeclareParameter<double>(*node, parameter("trajectory.max_longitudinal_acc"));
p.trajectory.th_prepare_length_diff =
getOrDeclareParameter<double>(*node, parameter("trajectory.th_prepare_length_diff"));
p.trajectory.th_lane_changing_length_diff =
getOrDeclareParameter<double>(*node, parameter("trajectory.th_lane_changing_length_diff"));
p.trajectory.min_lane_changing_velocity =
getOrDeclareParameter<double>(*node, parameter("trajectory.min_lane_changing_velocity"));
p.trajectory.lane_changing_decel_factor =
getOrDeclareParameter<double>(*node, parameter("trajectory.lane_changing_decel_factor"));
p.trajectory.lon_acc_sampling_num =
getOrDeclareParameter<int>(*node, parameter("trajectory.lon_acc_sampling_num"));
p.trajectory.lat_acc_sampling_num =
getOrDeclareParameter<int>(*node, parameter("trajectory.lat_acc_sampling_num"));

const auto max_acc = getOrDeclareParameter<double>(*node, "normal.max_acc");
p.trajectory.min_lane_changing_velocity =
std::min(p.trajectory.min_lane_changing_velocity, max_acc * p.trajectory.prepare_duration);
p.trajectory.min_lane_changing_velocity = std::min(
p.trajectory.min_lane_changing_velocity, max_acc * p.trajectory.max_prepare_duration);

Check warning on line 72 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/manager.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Complex Method

LaneChangeModuleManager::set_params already has high cyclomatic complexity, and now it increases in Lines of Code from 196 to 200. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
maxime-clem marked this conversation as resolved.
Show resolved Hide resolved

// validation of trajectory parameters
if (p.trajectory.lon_acc_sampling_num < 1 || p.trajectory.lat_acc_sampling_num < 1) {
Expand Down Expand Up @@ -308,15 +312,20 @@

{
const std::string ns = "lane_change.trajectory.";
updateParam<double>(parameters, ns + "prepare_duration", p->trajectory.prepare_duration);
updateParam<double>(
parameters, ns + "max_prepare_duration", p->trajectory.max_prepare_duration);
updateParam<double>(
parameters, ns + "min_prepare_duration", p->trajectory.min_prepare_duration);
updateParam<double>(parameters, ns + "lateral_jerk", p->trajectory.lateral_jerk);
updateParam<double>(
parameters, ns + ".min_lane_changing_velocity", p->trajectory.min_lane_changing_velocity);
// longitudinal acceleration
updateParam<double>(
parameters, ns + "min_longitudinal_acc", p->trajectory.min_longitudinal_acc);
updateParam<double>(
parameters, ns + "max_longitudinal_acc", p->trajectory.max_longitudinal_acc);
updateParam<double>(
parameters, ns + "lane_changing_decel_factor", p->trajectory.lane_changing_decel_factor);

Check warning on line 328 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/manager.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

LaneChangeModuleManager::updateModuleParams increases from 99 to 104 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
int longitudinal_acc_sampling_num = 0;
updateParam<int>(parameters, ns + "lon_acc_sampling_num", longitudinal_acc_sampling_num);
if (longitudinal_acc_sampling_num > 0) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 TIER IV, Inc.

Check notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Lines of Code in a Single File

The lines of code increases from 1598 to 1610, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check notice on line 1 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

ℹ Getting worse: Overall Code Complexity

The mean cyclomatic complexity increases from 4.77 to 4.80, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -130,7 +130,7 @@
*common_data_ptr_->lanes_polygon_ptr = create_lanes_polygon(common_data_ptr_);
}

void NormalLaneChange::update_transient_data()
void NormalLaneChange::update_transient_data(const bool is_approved)
{
if (
!common_data_ptr_ || !common_data_ptr_->is_data_available() ||
Expand All @@ -149,6 +149,13 @@
prev_module_output_.path.points.at(nearest_seg_idx).point.longitudinal_velocity_mps;
transient_data.current_path_seg_idx = nearest_seg_idx;

const auto active_signal_duration =
signal_activation_time_ ? (clock_.now() - signal_activation_time_.value()).seconds() : 0.0;
transient_data.lane_change_prepare_duration =
is_approved ? status_.lane_change_path.info.duration.prepare
: calculation::calc_actual_prepare_duration(
common_data_ptr_, common_data_ptr_->get_ego_speed(), active_signal_duration);

std::tie(transient_data.lane_changing_length, transient_data.current_dist_buffer) =
calculation::calc_lc_length_and_dist_buffer(common_data_ptr_, get_current_lanes());

Expand Down Expand Up @@ -327,6 +334,8 @@
return get_terminal_turn_signal_info();
}

set_signal_activation_time();

Check warning on line 337 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L337

Added line #L337 was not covered by tests

return get_turn_signal(getEgoPose(), getLaneChangePath().info.lane_changing_end);
}

Expand Down Expand Up @@ -355,9 +364,14 @@
const auto nearest_yaw_threshold = common_param.ego_nearest_yaw_threshold;
const auto current_nearest_seg_idx = common_data_ptr_->transient_data.current_path_seg_idx;

return getTurnSignalDecider().overwrite_turn_signal(
const auto turn_signal_info = getTurnSignalDecider().overwrite_turn_signal(
path, current_pose, current_nearest_seg_idx, original_turn_signal_info,
terminal_turn_signal_info, nearest_dist_threshold, nearest_yaw_threshold);

set_signal_activation_time(

Check warning on line 371 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L371

Added line #L371 was not covered by tests
turn_signal_info.turn_signal.command != terminal_turn_signal_info.turn_signal.command);

return turn_signal_info;

Check warning on line 374 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L374

Added line #L374 was not covered by tests
}

LaneChangePath NormalLaneChange::getLaneChangePath() const
Expand Down Expand Up @@ -428,8 +442,6 @@
output.path = utils::combinePath(output.path, *found_extended_path);
}
output.reference_path = getReferencePath();
output.turn_signal_info =
get_turn_signal(getEgoPose(), status_.lane_change_path.info.lane_changing_end);

if (isStopState()) {
const auto current_velocity = getEgoVelocity();
Expand All @@ -445,12 +457,17 @@

extendOutputDrivableArea(output);

const auto turn_signal_info =
get_turn_signal(getEgoPose(), status_.lane_change_path.info.lane_changing_end);

Check warning on line 461 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L461

Added line #L461 was not covered by tests
const auto current_seg_idx = planner_data_->findEgoSegmentIndex(output.path.points);
output.turn_signal_info = planner_data_->turn_signal_decider.overwrite_turn_signal(
output.path, getEgoPose(), current_seg_idx, prev_module_output_.turn_signal_info,
output.turn_signal_info, planner_data_->parameters.ego_nearest_dist_threshold,
turn_signal_info, planner_data_->parameters.ego_nearest_dist_threshold,

Check warning on line 465 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L465

Added line #L465 was not covered by tests
planner_data_->parameters.ego_nearest_yaw_threshold);

set_signal_activation_time(

Check warning on line 468 in planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

View check run for this annotation

Codecov / codecov/patch

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp#L468

Added line #L468 was not covered by tests
output.turn_signal_info.turn_signal.command != turn_signal_info.turn_signal.command);

return output;
}

Expand Down
Loading
Loading