File tree 3 files changed +7
-4
lines changed
behavior_path_lane_change_module/src
behavior_path_planner/src
behavior_path_planner_common/include/behavior_path_planner_common
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1171,9 +1171,9 @@ bool NormalLaneChange::getLaneChangePaths(
1171
1171
};
1172
1172
1173
1173
// get path on original lanes
1174
- const auto prepare_velocity = std::max (
1174
+ const auto prepare_velocity = std::clamp (
1175
1175
current_velocity + sampled_longitudinal_acc * prepare_duration,
1176
- minimum_lane_changing_velocity);
1176
+ minimum_lane_changing_velocity, getCommonParam (). max_vel );
1177
1177
1178
1178
// compute actual longitudinal acceleration
1179
1179
const double longitudinal_acc_on_prepare =
@@ -1237,8 +1237,9 @@ bool NormalLaneChange::getLaneChangePaths(
1237
1237
const auto lane_changing_length =
1238
1238
initial_lane_changing_velocity * lane_changing_time +
1239
1239
0.5 * longitudinal_acc_on_lane_changing * lane_changing_time * lane_changing_time;
1240
- const auto terminal_lane_changing_velocity =
1241
- initial_lane_changing_velocity + longitudinal_acc_on_lane_changing * lane_changing_time;
1240
+ const auto terminal_lane_changing_velocity = std::min (
1241
+ initial_lane_changing_velocity + longitudinal_acc_on_lane_changing * lane_changing_time,
1242
+ getCommonParam ().max_vel );
1242
1243
utils::lane_change::setPrepareVelocity (
1243
1244
prepare_segment, current_velocity, terminal_lane_changing_velocity);
1244
1245
Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ BehaviorPathPlannerParameters BehaviorPathPlannerNode::getCommonParam()
242
242
p.min_acc = declare_parameter<double >(" normal.min_acc" );
243
243
p.max_acc = declare_parameter<double >(" normal.max_acc" );
244
244
245
+ p.max_vel = declare_parameter<double >(" max_vel" );
245
246
p.backward_length_buffer_for_end_of_pull_over =
246
247
declare_parameter<double >(" backward_length_buffer_for_end_of_pull_over" );
247
248
p.backward_length_buffer_for_end_of_pull_out =
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ struct BehaviorPathPlannerParameters
45
45
// common parameters
46
46
double min_acc;
47
47
double max_acc;
48
+ double max_vel;
48
49
49
50
double minimum_pull_over_length;
50
51
double minimum_pull_out_length;
You can’t perform that action at this time.
0 commit comments