Skip to content

Commit 7f5b999

Browse files
rename
Signed-off-by: Yuki Takagi <yuki.takagi@tier4.jp>
1 parent e2c247f commit 7f5b999

File tree

1 file changed

+4
-4
lines changed
  • planning/obstacle_cruise_planner/src

1 file changed

+4
-4
lines changed

planning/obstacle_cruise_planner/src/node.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1180,12 +1180,12 @@ std::optional<StopObstacle> ObstacleCruisePlannerNode::createStopObstacle(
11801180
return std::nullopt;
11811181
}
11821182

1183-
const double lat_margin_for_stop =
1183+
const double max_lat_margin_for_stop =
11841184
(obstacle.classification.label == ObjectClassification::UNKNOWN)
11851185
? p.max_lat_margin_for_stop_against_unknown
11861186
: p.max_lat_margin_for_stop;
11871187

1188-
if (precise_lat_dist > std::max(lat_margin_for_stop, 1e-3)) {
1188+
if (precise_lat_dist > std::max(max_lat_margin_for_stop, 1e-3)) {
11891189
return std::nullopt;
11901190
}
11911191

@@ -1218,7 +1218,7 @@ std::optional<StopObstacle> ObstacleCruisePlannerNode::createStopObstacle(
12181218
calcObstacleMaxLength(obstacle.shape) + p.decimate_trajectory_step_length +
12191219
std::hypot(
12201220
vehicle_info_.vehicle_length_m,
1221-
vehicle_info_.vehicle_width_m * 0.5 + lat_margin_for_stop));
1221+
vehicle_info_.vehicle_width_m * 0.5 + max_lat_margin_for_stop));
12221222
if (collision_points.empty()) {
12231223
RCLCPP_INFO_EXPRESSION(
12241224
get_logger(), enable_debug_info_,
@@ -1244,7 +1244,7 @@ std::optional<StopObstacle> ObstacleCruisePlannerNode::createStopObstacle(
12441244

12451245
// calculate collision points with trajectory with lateral stop margin
12461246
const auto traj_polys_with_lat_margin =
1247-
createOneStepPolygons(traj_points, vehicle_info_, odometry.pose.pose, lat_margin_for_stop);
1247+
createOneStepPolygons(traj_points, vehicle_info_, odometry.pose.pose, max_lat_margin_for_stop);
12481248

12491249
const auto collision_point = polygon_utils::getCollisionPoint(
12501250
traj_points, traj_polys_with_lat_margin, obstacle, is_driving_forward_, vehicle_info_);

0 commit comments

Comments
 (0)