Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored and mitsudome-r committed Feb 19, 2025
1 parent 64377c8 commit 2e4be32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ namespace autoware::behavior_velocity_planner

using autoware::objects_of_interest_marker_interface::ColorName;
using autoware::objects_of_interest_marker_interface::ObjectsOfInterestMarkerInterface;
using autoware_utils::DebugPublisher;
using autoware_utils::StopWatch;
using autoware_internal_debug_msgs::msg::Float64Stamped;
using autoware_internal_planning_msgs::msg::PathWithLaneId;
using autoware_utils::DebugPublisher;
using autoware_utils::StopWatch;
using builtin_interfaces::msg::Time;
using unique_identifier_msgs::msg::UUID;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ inline geometry_msgs::msg::Point convertToGeomPoint(const autoware_utils::Point2

namespace arc_lane_utils
{
using PathIndexWithPose = std::pair<size_t, geometry_msgs::msg::Pose>; // front index, pose
using PathIndexWithPoint2d =
std::pair<size_t, autoware_utils::Point2d>; // front index, point2d
using PathIndexWithPose = std::pair<size_t, geometry_msgs::msg::Pose>; // front index, pose
using PathIndexWithPoint2d = std::pair<size_t, autoware_utils::Point2d>; // front index, point2d
using PathIndexWithPoint = std::pair<size_t, geometry_msgs::msg::Point>; // front index, point2d
using PathIndexWithOffset = std::pair<size_t, double>; // front index, offset

Expand All @@ -60,8 +59,7 @@ std::optional<PathIndexWithPoint> findCollisionSegment(
const geometry_msgs::msg::Point & stop_line_p2)
{
for (size_t i = 0; i < path.points.size() - 1; ++i) {
const auto & p1 =
autoware_utils::get_point(path.points.at(i)); // Point before collision point
const auto & p1 = autoware_utils::get_point(path.points.at(i)); // Point before collision point
const auto & p2 =
autoware_utils::get_point(path.points.at(i + 1)); // Point after collision point

Expand Down Expand Up @@ -117,8 +115,7 @@ std::optional<PathIndexWithOffset> findBackwardOffsetSegment(
double sum_length = 0.0;
const auto start = static_cast<std::int32_t>(base_idx) - 1;
for (std::int32_t i = start; i >= 0; --i) {
sum_length +=
autoware_utils::calc_distance2d(path.points.at(i), path.points.at(i + 1));
sum_length += autoware_utils::calc_distance2d(path.points.at(i), path.points.at(i + 1));

// If it's over offset point, return front index and remain offset length
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

#include "autoware/behavior_velocity_planner_common/utilization/boost_geometry_helper.hpp"
#include "autoware/motion_utils/trajectory/trajectory.hpp"
#include "autoware_utils/geometry/geometry.hpp"
#include "autoware_lanelet2_extension/utility/query.hpp"
#include "autoware_utils/geometry/geometry.hpp"

#include <autoware_planning_msgs/msg/path_point.hpp>

Expand Down Expand Up @@ -49,10 +49,8 @@ size_t calcPointIndexFromSegmentIndex(
const size_t prev_point_idx = seg_idx;
const size_t next_point_idx = seg_idx + 1;

const double prev_dist =
autoware_utils::calc_distance2d(point, points.at(prev_point_idx));
const double next_dist =
autoware_utils::calc_distance2d(point, points.at(next_point_idx));
const double prev_dist = autoware_utils::calc_distance2d(point, points.at(prev_point_idx));
const double next_dist = autoware_utils::calc_distance2d(point, points.at(next_point_idx));

if (prev_dist < next_dist) {
return prev_point_idx;
Expand Down Expand Up @@ -98,9 +96,9 @@ geometry_msgs::msg::Pose transformRelCoordinate2D(
namespace autoware::behavior_velocity_planner::planning_utils
{
using autoware::motion_utils::calcSignedArcLength;
using autoware_planning_msgs::msg::PathPoint;
using autoware_utils::calcDistance2d;
using autoware_utils::calcOffsetPose;
using autoware_planning_msgs::msg::PathPoint;

size_t calcSegmentIndexFromPointIndex(
const std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId> & points,
Expand Down

0 comments on commit 2e4be32

Please sign in to comment.