Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jun 23, 2023
1 parent 8ad8ab6 commit a968134
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,18 @@ class StopLineModule : public SceneModuleInterface

geometry_msgs::msg::Point getCenterOfStopLine(const lanelet::ConstLineString3d & stop_line);


boost::optional<StopLineModule::SegmentIndexWithOffset> findOffsetSegment(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const StopLineModule::SegmentIndexWithPoint2d & collision);

boost::optional<StopLineModule::SegmentIndexWithPose> calcStopPose(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const boost::optional<StopLineModule::SegmentIndexWithOffset> & offset_segment);

autoware_auto_planning_msgs::msg::PathWithLaneId insertStopPose(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const StopLineModule::SegmentIndexWithPose & insert_index_with_pose,
tier4_planning_msgs::msg::StopReason * stop_reason);
boost::optional<StopLineModule::SegmentIndexWithOffset> findOffsetSegment(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const StopLineModule::SegmentIndexWithPoint2d & collision);

boost::optional<StopLineModule::SegmentIndexWithPose> calcStopPose(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const boost::optional<StopLineModule::SegmentIndexWithOffset> & offset_segment);

autoware_auto_planning_msgs::msg::PathWithLaneId insertStopPose(
const autoware_auto_planning_msgs::msg::PathWithLaneId & path,
const StopLineModule::SegmentIndexWithPose & insert_index_with_pose,
tier4_planning_msgs::msg::StopReason * stop_reason);

int64_t lane_id_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ inline bool smoothPath(
}
// Resample trajectory with ego-velocity based interval distances
auto traj_resampled = smoother->resampleTrajectory(traj_with_ego_point_on_path, v0, nearest_idx);
const auto traj_resampled_closest = tier4_autoware_utils::findFirstNearestIndexWithSoftConstraints(
*traj_resampled, current_pose, planner_data->ego_nearest_dist_threshold,
planner_data->ego_nearest_yaw_threshold);
const auto traj_resampled_closest =
tier4_autoware_utils::findFirstNearestIndexWithSoftConstraints(
*traj_resampled, current_pose, planner_data->ego_nearest_dist_threshold,
planner_data->ego_nearest_yaw_threshold);
std::vector<TrajectoryPoints> debug_trajectories;
// Clip trajectory from closest point
TrajectoryPoints clipped;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ size_t calcSegmentIndexFromPointIndex(
return 0;
}

const double offset_to_seg = tier4_autoware_utils::calcLongitudinalOffsetToSegment(points, idx, point);
const double offset_to_seg =
tier4_autoware_utils::calcLongitudinalOffsetToSegment(points, idx, point);
if (0 < offset_to_seg) {
return idx;
}
Expand Down
6 changes: 4 additions & 2 deletions planning/behavior_velocity_planner/src/utilization/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,8 @@ boost::optional<geometry_msgs::msg::Pose> insertStopPoint(
const geometry_msgs::msg::Point & stop_point, PathWithLaneId & output)
{
const size_t base_idx = tier4_autoware_utils::findNearestSegmentIndex(output.points, stop_point);
const auto insert_idx = tier4_autoware_utils::insertStopPoint(base_idx, stop_point, output.points);
const auto insert_idx =
tier4_autoware_utils::insertStopPoint(base_idx, stop_point, output.points);

if (!insert_idx) {
return {};
Expand All @@ -608,7 +609,8 @@ boost::optional<geometry_msgs::msg::Pose> insertStopPoint(
boost::optional<geometry_msgs::msg::Pose> insertStopPoint(
const geometry_msgs::msg::Point & stop_point, const size_t stop_seg_idx, PathWithLaneId & output)
{
const auto insert_idx = tier4_autoware_utils::insertStopPoint(stop_seg_idx, stop_point, output.points);
const auto insert_idx =
tier4_autoware_utils::insertStopPoint(stop_seg_idx, stop_point, output.points);

if (!insert_idx) {
return {};
Expand Down

0 comments on commit a968134

Please sign in to comment.