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

chore: sync beta branch beta/v0.28.0 with tier4/main #1307

Merged
merged 128 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
859776d
feat(intersection): resurrect debug ego-object ttc visualizer (#6829)
soblin Apr 17, 2024
8319209
docs(perception_online_evaluator): update metrics explanation (#6819)
kosuke55 Apr 17, 2024
51b5f83
feat(logger_level_configure): make it possible to change level of con…
satoshi-ota Apr 17, 2024
774e688
feat(crosswalk): restricts to enter the IGNORE status (#6834)
yuki-takagi-66 Apr 18, 2024
a336fa8
feat(obstacle_cruise): ignore right beside objects (#6754)
yuki-takagi-66 Apr 18, 2024
52c8df5
feat(behavior_path_planner_common): add safety target object located …
kyoichi-sugahara Apr 18, 2024
fac57c9
revert: "feat(logger_level_configure): make it possible to change lev…
satoshi-ota Apr 18, 2024
3adffc3
perf(pointcloud_preprocessor): prevent excessive log and speed up a b…
KYabuuchi Apr 18, 2024
b34e520
chore: added sensing members to sensing related packages (#6751)
knzo25 Apr 19, 2024
e11b1f4
refactor(lane_change): make return previous output a common function …
zulfaqar-azmi-t4 Apr 19, 2024
e5b3f60
feat(dynamic_avoidance): avoid pedestrians (#6553)
yuki-takagi-66 Apr 19, 2024
c93648c
chore: update CODEOWNERS (#6603)
awf-autoware-bot[bot] Apr 19, 2024
7b28702
build(deps): bump actions/checkout from 3 to 4 (#4890)
dependabot[bot] Apr 19, 2024
fb5b20f
chore: update CODEOWNERS (#6856)
awf-autoware-bot[bot] Apr 20, 2024
6a78774
feat(probabilistic_occupancy_grid_map): enable to create partial occu…
YoshiRi Apr 22, 2024
8adf18e
perf(behavior_path_planner): improve getReferencePath to support very…
maxime-clem Apr 22, 2024
4917b54
feat: remake diagnostic graph packages (#6715)
isamu-takagi Apr 22, 2024
1da2091
docs(tier4_logging_level_configure_rviz_plugin): update document (#6720)
zulfaqar-azmi-t4 Apr 22, 2024
75885a5
refactor(lane_change): refactor min and max lane change length (#6845)
zulfaqar-azmi-t4 Apr 22, 2024
c09bc59
refactor(bpp, avoidance): remove unnecessary verbose flag (#6822)
satoshi-ota Apr 22, 2024
00db87d
feat(perception_online_evaluator): add use_perception_online_evaluato…
kosuke55 Apr 22, 2024
5a25d84
feat(pointcloud_preprocessor): add pickup based voxel grid filter (#6…
yukkysaito Apr 22, 2024
5b1b776
feat(tier4_screen_capture_panel): add new service to capture screen s…
satoshi-ota Apr 23, 2024
702b183
feat(bpp-interface): add empty path validation (#6868)
satoshi-ota Apr 23, 2024
5a6cde9
refactor(bpp): simplify extended predicted object initialization (#6858)
zulfaqar-azmi-t4 Apr 23, 2024
8881d23
chore(roi_pointcloud_fusion): add maximum cluster size param (#6860)
badai-nguyen Apr 24, 2024
6459816
feat(perception_evaluator): counts objects within detection range (#…
kosuke55 Apr 24, 2024
1b6b942
perf(behavior_path_planner_common): simplify turn signal loop to supp…
maxime-clem Apr 24, 2024
29cd854
refactor(lane_change): fix logger (#6873)
zulfaqar-azmi-t4 Apr 24, 2024
f9de26d
fix(image_projection_based_fusion): add intensity field for roi_point…
badai-nguyen Apr 24, 2024
f297d06
revert: feat(global_parameter_loader): add gtest to global parameter …
h-ohta Apr 24, 2024
41bee43
feat(learned_model): create package (#6395)
atomyks Apr 24, 2024
a6c6912
feat(perception_online_evaluator): imporve yaw rate metrics consideri…
kosuke55 Apr 24, 2024
d5cef0d
feat(freespace_planning_algorithms): add Astar search by python (#6398)
TakumIto Apr 25, 2024
77e8a8b
fix(tier4_perception_launch): change traffic light recognition pipeli…
mebasoglu Apr 25, 2024
a2c4de5
feat(system diags): rename diag of ndt scan matcher (#6889)
YamatoAndo Apr 25, 2024
80eca5e
feat(autonomous_emergency_braking): filter and crop aeb pointcloud (#…
danielsanchezaran Apr 26, 2024
553ac9a
fix(route_handler): add logger (#6888)
zulfaqar-azmi-t4 Apr 26, 2024
1872e9b
refactor(sensing/livox_tag_filter): rework parameters (#6743)
oguzkaganozt Apr 26, 2024
2809a67
feat(ndt_scan_matcher): remake diag (#5076)
YamatoAndo Apr 26, 2024
46905ee
refactor(centerpoint, pointpainting): rearrange parameters for ML mod…
badai-nguyen Apr 26, 2024
44c6169
fix(lidar_centerpoint): add param file for centerpoint_tiny (#6901)
badai-nguyen Apr 26, 2024
7f368a2
fix(avoidance): fix bug in the logic to check object moving distance …
satoshi-ota Apr 29, 2024
6116001
fix(ekf_localizer): updated ekf gate_dist params (#6871)
SakodaShintaro Apr 30, 2024
f059d1b
chore(autoware_auto_perception_rviz_plugin): improve distant object v…
TakaHoribe Apr 30, 2024
766b1b1
fix(avoidance): fix logic to check if it is parked vehicle (#6731)
satoshi-ota Apr 30, 2024
b630838
fix(avoidance): don't avoid merging/deviating vehicle whose overhang …
satoshi-ota Apr 30, 2024
00d8222
fix(bpp): change wrong function parameter's type for safety check (#6…
zulfaqar-azmi-t4 Apr 30, 2024
8fe1685
feat(autoware_overlay_rviz_plugin): get the current traffic light (#6…
maxime-clem Apr 30, 2024
162f331
fix(avoidance): add missing parameter declaration (#6908)
satoshi-ota May 1, 2024
62d26be
fix(trajectory_follower_node): fix config file of plot juggler (#6910)
tkimura4 May 1, 2024
38ab80e
chore(component_state_monitor): relax pose_estimator_pose timeout (#6…
shmpwk May 1, 2024
7f9a322
docs(tier4_simulated_clock_rviz_plugin): update how to use (#6914)
zulfaqar-azmi-t4 May 1, 2024
52f4b3e
refactor(avoidance): rebuild object info list (#6913)
satoshi-ota May 2, 2024
23f99a7
feat(mission_planner): publish initial and goal poses to logs (#6918)
zulfaqar-azmi-t4 May 2, 2024
4740914
feat(pull_request_templates): improve the pull request template to en…
Owen-Liuyuxuan May 3, 2024
b307b3d
chore(radar_track_msgs_converter): change radar tracks subscription q…
YoshiRi May 4, 2024
aab29f7
feat(probabilistic_occupancy_grid_map): add downsample filter option …
YoshiRi May 6, 2024
76de4dd
fix(behavior_path_planner_common): fix warning of containerOutOfBound…
veqcc May 6, 2024
ebe360d
fix: do not use c++20 char8_t keyword (#3629)
ralwing May 6, 2024
28d384e
fix(control_performance_analysis): fix bug of ignoredReturnValue (#6921)
veqcc May 6, 2024
4200be3
fix(perception_online_evaluator): fix bug of constStatement (#6922)
veqcc May 7, 2024
ccbe319
refactor(bpp): path shifter clang tidy and logging level configuratio…
zulfaqar-azmi-t4 May 7, 2024
1fecd17
fix(occupancy_grid_map_outlier_filter): add intensity field (#6797)
badai-nguyen May 7, 2024
dc62238
feat(crosswalk)!: change ego min assumed speed (#6904)
yuki-takagi-66 May 7, 2024
985b735
perf(lane_change): rework object filter (#6847)
zulfaqar-azmi-t4 May 7, 2024
32359da
fix(lane_change): return safe is object list is empty (#6931)
zulfaqar-azmi-t4 May 7, 2024
a06d4af
fix(diagnostic_graph_aggregator): fix a bug where unit links were inc…
isamu-takagi May 7, 2024
fbbb2f3
feat(autonomous_emergency_braking): add obstacle velocity estimation …
danielsanchezaran May 7, 2024
edc7878
feat(start_planner): add centerline crossing check (#6900)
danielsanchezaran May 7, 2024
21bbbd2
fix(ground_segmentation): fix warning of identicalConditionAfterEarly…
veqcc May 8, 2024
18813bf
fix(voxel_grid_downsample_filter): add intensity field (#6849)
badai-nguyen May 8, 2024
43adbd5
feat(freespace_planner): only plan if ego is stopped (#6062)
VRichardJP May 8, 2024
2c9a936
feat(image projection based fusion): unrecify 3d point for image proj…
yukkysaito May 8, 2024
db38f04
perf(route_handler): simplify queries on the road and shoulder lanele…
maxime-clem May 8, 2024
da9df0c
refactor(lane_change): move getCurrentTurnSignalInfo to scene file (#…
zulfaqar-azmi-t4 May 8, 2024
b6d7477
refactor(avoidance): organize alias (#6947)
satoshi-ota May 8, 2024
6d00269
fix(tvm_utility): fix warning of negativeContainerIndex (#6924)
veqcc May 8, 2024
6ba26e5
perf(yabloc): fix performance warning of iterateByValue (#6929)
veqcc May 8, 2024
e517f09
feat: add low_intensity_cluster_filter (#6850)
badai-nguyen May 8, 2024
39cccb6
feat(vehicle_cmd_gate): support for real time update params for v cmd…
danielsanchezaran May 9, 2024
8c7adc3
fix(traffic_light_classifier): fix warning of uninitvar (#6925)
veqcc May 9, 2024
b5b7f95
feat(build_depends): add glog-vendor (#6952)
TakaHoribe May 9, 2024
f30268c
feat(goal_planner): align z-height of road_shoulder (#6854)
soblin May 9, 2024
baeeab5
feat(autoware_pose_covariance_modifier): add new node to early fuse g…
meliketanrikulu May 9, 2024
788b2e3
chore(glog): add initialization check (#6792)
TakaHoribe May 9, 2024
dd19bb8
feat(image projection based fusion): revert #6902 (unrecify 3d point …
yukkysaito May 9, 2024
2f46b25
chore: update sensing/perception maintainer (#6950)
YoshiRi May 9, 2024
473f238
fix(system_monitor): fix warning of containerOutOfBounds (#6927)
veqcc May 9, 2024
569d56c
fix(bpp): keep publishing rtc cooperate status (#6953)
satoshi-ota May 9, 2024
729eec0
fix(ground_segmentation): add intensity field (#6791)
badai-nguyen May 9, 2024
010965b
fix(freespace_planner): fix motion_velocity_smoother error while park…
ahmeddesokyebrahim May 9, 2024
d5aa5d6
feat(map_based_prediction): use different time horizon (#6877)
soblin May 10, 2024
c7c826d
fix(map_based_prediction): improve pedestrian path generation efficie…
technolojin May 10, 2024
35d39e7
feat(goal_planner): fix non-thread-safe access in goal_planner (rever…
soblin May 10, 2024
04faf5e
feat(autonomous_emergency_braking): add param update support for AEB …
danielsanchezaran May 10, 2024
32186de
fix(autonomous_emergency_braking): add missing erase to velocity hist…
danielsanchezaran May 10, 2024
9378b4f
fix(componet_state_monitor): remove ndt node alive monitoring (#6957)
YamatoAndo May 10, 2024
299b050
feat(path_sampler): make the trajectory smoother, add params, fix cra…
maxime-clem May 10, 2024
885c0af
fix(map_based_prediction): revert use different time horizon (#6877) …
YoshiRi May 10, 2024
bca574a
feat(control_evaluator): implement a control evaluator (#6959)
danielsanchezaran May 10, 2024
e218218
feat: update rviz2 overlay (#6883)
KhalilSelyan May 10, 2024
c24ad46
perf(side_shift): fix unupdated prev path that caused heavy interpola…
maxime-clem May 10, 2024
8176c63
refactor(mission_planner): remove redundant `is_reroute` check (#6980)
veqcc May 11, 2024
fd6306d
fix(autoware_overlay_rviz_plugin): fix subs and cleanup (#6978)
xmfcx May 11, 2024
bffbcce
fix(accel_brake_calibrator): fix to set service name and exception fa…
h-ohta May 13, 2024
fd89ca2
test: behavior path obstacle avoidance (#6972)
go-sakayori May 13, 2024
bd46dc3
feat(rtc_interface)!: add new field to rtc cooperate status (#6933)
satoshi-ota May 13, 2024
f3cd528
fix(behavior_velocity_run_out_module): initialize `accel_reason_` (#6…
veqcc May 13, 2024
86804e1
feat: add autoware_remaining_distance_time_calculator and overlay (#6…
ahmeddesokyebrahim May 13, 2024
7302cd7
fix(accel_brake_map_calibrator): fix accel_brake_map_calibrator not t…
tkimura4 May 13, 2024
2f2438e
feat(mrm_emergency_stop_operator): add support for real time param re…
danielsanchezaran May 13, 2024
aff5370
feat(map_based_prediction): incorporate crosswalk user history (#6905)
dkoldaev May 13, 2024
d9b3df7
feat(out_of_lane): add option to ignore overlaps in lane changes (#6991)
maxime-clem May 13, 2024
b6bd750
feat(tier4_perception_launch): downsample perception input pointcloud…
YoshiRi May 13, 2024
a3c1ed3
feat(tier4_perception_launch): fix typo error (#6999)
YoshiRi May 14, 2024
a714f94
refactor(behavior_velocity_occlusion_spot_module): reduce cppcheck wa…
veqcc May 14, 2024
ac5190b
fix(ndt_scan_matcher): improved tpe (#6990)
SakodaShintaro May 14, 2024
0e6f175
refactor(behavior_velocity_occlusion_spot_module): remove unnecessary…
veqcc May 14, 2024
590518f
chore(tools): move system and evaluation tools to autoware_tools repo…
satoshi-ota May 14, 2024
f012a75
chore: added maintainer (#7003)
go-sakayori May 14, 2024
a5fdb8d
chore: update CODEOWNERS (#6866)
awf-autoware-bot[bot] May 14, 2024
f30c035
feat(smart_mpc_trajectory_follower): add smart_mpc_trajectory_followe…
masayukiaino May 14, 2024
2ae1716
perf(behavior_path_dynamic_avoidance_module): use const reference (#6…
veqcc May 14, 2024
a4bb177
refactor(turn_signal_decider): straddle bound method (#7006)
danielsanchezaran May 14, 2024
ea009b8
feat(goal_planner): reject candidate path whose start pose direction …
soblin May 14, 2024
e6f7a01
Merge remote-tracking branch 'origin/beta/v0.28.0' into sync-upstream
TakaHoribe May 15, 2024
6bb900d
Merge pull request #1298 from tier4/sync-upstream
tier4-autoware-public-bot[bot] May 15, 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
Prev Previous commit
Next Next commit
refactor(lane_change): move getCurrentTurnSignalInfo to scene file (a…
…utowarefoundation#6943)

* refactor(lane_change): move getCurrentTurnSignalInfo to scene file

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

* removed reference from trivial variable

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
zulfaqar-azmi-t4 and pre-commit-ci[bot] authored May 8, 2024
commit da9df0c542ddc13a73e9585b4bc69475580326ba
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ class LaneChangeInterface : public SceneModuleInterface

MarkerArray getModuleVirtualWall() override;

TurnSignalInfo getCurrentTurnSignalInfo(
const PathWithLaneId & path, const TurnSignalInfo & original_turn_signal_info);

// TODO(someone): remove this, and use base class function
[[deprecated]] BehaviorModuleOutput run() override
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class NormalLaneChange : public LaneChangeBase

bool isStoppedAtRedTrafficLight() const override;

TurnSignalInfo get_current_turn_signal_info() override;

protected:
lanelet::ConstLanelets getCurrentLanes() const override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ class LaneChangeBase

void resetStopPose() { lane_change_stop_pose_ = std::nullopt; }

virtual TurnSignalInfo get_current_turn_signal_info() = 0;

protected:
virtual lanelet::ConstLanelets getCurrentLanes() const = 0;

Expand Down
80 changes: 1 addition & 79 deletions planning/behavior_path_lane_change_module/src/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ BehaviorModuleOutput LaneChangeInterface::planWaitingApproval()

BehaviorModuleOutput out = getPreviousModuleOutput();
module_type_->insertStopPoint(module_type_->getLaneChangeStatus().current_lanes, out.path);
out.turn_signal_info =
getCurrentTurnSignalInfo(out.path, getPreviousModuleOutput().turn_signal_info);
out.turn_signal_info = module_type_->get_current_turn_signal_info();

const auto & lane_change_debug = module_type_->getDebugData();
for (const auto & [uuid, data] : lane_change_debug.collision_check_objects) {
Expand Down Expand Up @@ -367,81 +366,4 @@ void LaneChangeInterface::updateSteeringFactorPtr(
{output.start_distance_to_path_change, output.finish_distance_to_path_change},
PlanningBehavior::LANE_CHANGE, steering_factor_direction, SteeringFactor::APPROACHING, "");
}

TurnSignalInfo LaneChangeInterface::getCurrentTurnSignalInfo(
const PathWithLaneId & path, const TurnSignalInfo & original_turn_signal_info)
{
const auto & current_lanes = module_type_->getLaneChangeStatus().current_lanes;
const auto & is_valid = module_type_->getLaneChangeStatus().is_valid_path;
const auto & lane_change_path = module_type_->getLaneChangeStatus().lane_change_path;
const auto & lane_change_param = module_type_->getLaneChangeParam();

if (
module_type_->getModuleType() != LaneChangeModuleType::NORMAL || current_lanes.empty() ||
!is_valid) {
return original_turn_signal_info;
}

// check direction
TurnSignalInfo current_turn_signal_info;
const auto & current_pose = module_type_->getEgoPose();
const auto direction = module_type_->getDirection();
if (direction == Direction::LEFT) {
current_turn_signal_info.turn_signal.command = TurnIndicatorsCommand::ENABLE_LEFT;
} else if (direction == Direction::RIGHT) {
current_turn_signal_info.turn_signal.command = TurnIndicatorsCommand::ENABLE_RIGHT;
}

if (path.points.empty()) {
current_turn_signal_info.desired_start_point = current_pose;
current_turn_signal_info.required_start_point = current_pose;
current_turn_signal_info.desired_end_point = lane_change_path.info.lane_changing_end;
current_turn_signal_info.required_end_point = lane_change_path.info.lane_changing_end;
return current_turn_signal_info;
}

const auto & min_length_for_turn_signal_activation =
lane_change_param.min_length_for_turn_signal_activation;
const auto & route_handler = module_type_->getRouteHandler();
const auto & common_parameter = module_type_->getCommonParam();
const auto shift_intervals =
route_handler->getLateralIntervalsToPreferredLane(current_lanes.back());
const double next_lane_change_buffer =
utils::lane_change::calcMinimumLaneChangeLength(lane_change_param, shift_intervals);
const double & nearest_dist_threshold = common_parameter.ego_nearest_dist_threshold;
const double & nearest_yaw_threshold = common_parameter.ego_nearest_yaw_threshold;
const double & base_to_front = common_parameter.base_link2front;

const double buffer =
next_lane_change_buffer + min_length_for_turn_signal_activation + base_to_front;
const double path_length = motion_utils::calcArcLength(path.points);
const size_t & current_nearest_seg_idx =
motion_utils::findFirstNearestSegmentIndexWithSoftConstraints(
path.points, current_pose, nearest_dist_threshold, nearest_yaw_threshold);
const double dist_to_terminal = utils::getDistanceToEndOfLane(current_pose, current_lanes);
const auto start_pose =
motion_utils::calcLongitudinalOffsetPose(path.points, 0, std::max(path_length - buffer, 0.0));
if (dist_to_terminal - base_to_front < buffer && start_pose) {
// modify turn signal
current_turn_signal_info.desired_start_point = *start_pose;
current_turn_signal_info.desired_end_point = lane_change_path.info.lane_changing_end;
current_turn_signal_info.required_start_point = current_turn_signal_info.desired_start_point;
current_turn_signal_info.required_end_point = current_turn_signal_info.desired_end_point;

const auto & original_command = original_turn_signal_info.turn_signal.command;
if (
original_command == TurnIndicatorsCommand::DISABLE ||
original_command == TurnIndicatorsCommand::NO_COMMAND) {
return current_turn_signal_info;
}

// check the priority of turn signals
return module_type_->getTurnSignalDecider().use_prior_turn_signal(
path, current_pose, current_nearest_seg_idx, original_turn_signal_info,
current_turn_signal_info, nearest_dist_threshold, nearest_yaw_threshold);
}

// not in the vicinity of the end of the path. return original
return original_turn_signal_info;
}
} // namespace behavior_path_planner
77 changes: 77 additions & 0 deletions planning/behavior_path_lane_change_module/src/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,83 @@ bool NormalLaneChange::isStoppedAtRedTrafficLight() const
status_.lane_change_path.info.length.sum());
}

TurnSignalInfo NormalLaneChange::get_current_turn_signal_info()
{
const auto original_turn_signal_info = prev_module_output_.turn_signal_info;

const auto & current_lanes = getLaneChangeStatus().current_lanes;
const auto is_valid = getLaneChangeStatus().is_valid_path;
const auto & lane_change_path = getLaneChangeStatus().lane_change_path;
const auto & lane_change_param = getLaneChangeParam();

if (getModuleType() != LaneChangeModuleType::NORMAL || current_lanes.empty() || !is_valid) {
return original_turn_signal_info;
}

// check direction
TurnSignalInfo current_turn_signal_info;
const auto & current_pose = getEgoPose();
const auto direction = getDirection();
if (direction == Direction::LEFT) {
current_turn_signal_info.turn_signal.command = TurnIndicatorsCommand::ENABLE_LEFT;
} else if (direction == Direction::RIGHT) {
current_turn_signal_info.turn_signal.command = TurnIndicatorsCommand::ENABLE_RIGHT;
}

const auto & path = prev_module_output_.path;
if (path.points.empty()) {
current_turn_signal_info.desired_start_point = current_pose;
current_turn_signal_info.required_start_point = current_pose;
current_turn_signal_info.desired_end_point = lane_change_path.info.lane_changing_end;
current_turn_signal_info.required_end_point = lane_change_path.info.lane_changing_end;
return current_turn_signal_info;
}

const auto min_length_for_turn_signal_activation =
lane_change_param.min_length_for_turn_signal_activation;
const auto & route_handler = getRouteHandler();
const auto & common_parameter = getCommonParam();
const auto shift_intervals =
route_handler->getLateralIntervalsToPreferredLane(current_lanes.back());
const double next_lane_change_buffer =
utils::lane_change::calcMinimumLaneChangeLength(lane_change_param, shift_intervals);
const double nearest_dist_threshold = common_parameter.ego_nearest_dist_threshold;
const double nearest_yaw_threshold = common_parameter.ego_nearest_yaw_threshold;
const double base_to_front = common_parameter.base_link2front;

const double buffer =
next_lane_change_buffer + min_length_for_turn_signal_activation + base_to_front;
const double path_length = motion_utils::calcArcLength(path.points);
const size_t current_nearest_seg_idx =
motion_utils::findFirstNearestSegmentIndexWithSoftConstraints(
path.points, current_pose, nearest_dist_threshold, nearest_yaw_threshold);
const double dist_to_terminal = utils::getDistanceToEndOfLane(current_pose, current_lanes);
const auto start_pose =
motion_utils::calcLongitudinalOffsetPose(path.points, 0, std::max(path_length - buffer, 0.0));
if (dist_to_terminal - base_to_front < buffer && start_pose) {
// modify turn signal
current_turn_signal_info.desired_start_point = *start_pose;
current_turn_signal_info.desired_end_point = lane_change_path.info.lane_changing_end;
current_turn_signal_info.required_start_point = current_turn_signal_info.desired_start_point;
current_turn_signal_info.required_end_point = current_turn_signal_info.desired_end_point;

const auto & original_command = original_turn_signal_info.turn_signal.command;
if (
original_command == TurnIndicatorsCommand::DISABLE ||
original_command == TurnIndicatorsCommand::NO_COMMAND) {
return current_turn_signal_info;
}

// check the priority of turn signals
return getTurnSignalDecider().use_prior_turn_signal(
path, current_pose, current_nearest_seg_idx, original_turn_signal_info,
current_turn_signal_info, nearest_dist_threshold, nearest_yaw_threshold);
}

// not in the vicinity of the end of the path. return original
return original_turn_signal_info;
}

LaneChangePath NormalLaneChange::getLaneChangePath() const
{
return status_.lane_change_path;
Expand Down