Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 22aa93d

Browse files
pre-commit-ci[bot]liuXinGangChina
authored andcommittedMar 7, 2025
style(pre-commit): autofix
1 parent 654b169 commit 22aa93d

File tree

5 files changed

+15
-18
lines changed

5 files changed

+15
-18
lines changed
 

‎planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/include/autoware/behavior_velocity_planner_common/scene_module_interface.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ namespace autoware::behavior_velocity_planner
5050

5151
using autoware::objects_of_interest_marker_interface::ColorName;
5252
using autoware::objects_of_interest_marker_interface::ObjectsOfInterestMarkerInterface;
53+
using autoware_internal_debug_msgs::msg::Float64Stamped;
54+
using autoware_internal_planning_msgs::msg::PathWithLaneId;
5355
using autoware_utils::DebugPublisher;
5456
using autoware_utils::get_or_declare_parameter;
5557
using autoware_utils::StopWatch;
56-
using autoware_internal_debug_msgs::msg::Float64Stamped;
57-
using autoware_internal_planning_msgs::msg::PathWithLaneId;
5858
using builtin_interfaces::msg::Time;
5959
using unique_identifier_msgs::msg::UUID;
6060

‎planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/include/autoware/behavior_velocity_planner_common/utilization/arc_lane_util.hpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ inline geometry_msgs::msg::Point convertToGeomPoint(const autoware_utils::Point2
4040

4141
namespace arc_lane_utils
4242
{
43-
using PathIndexWithPose = std::pair<size_t, geometry_msgs::msg::Pose>; // front index, pose
44-
using PathIndexWithPoint2d =
45-
std::pair<size_t, autoware_utils::Point2d>; // front index, point2d
43+
using PathIndexWithPose = std::pair<size_t, geometry_msgs::msg::Pose>; // front index, pose
44+
using PathIndexWithPoint2d = std::pair<size_t, autoware_utils::Point2d>; // front index, point2d
4645
using PathIndexWithPoint = std::pair<size_t, geometry_msgs::msg::Point>; // front index, point2d
4746
using PathIndexWithOffset = std::pair<size_t, double>; // front index, offset
4847

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

@@ -117,8 +115,7 @@ std::optional<PathIndexWithOffset> findBackwardOffsetSegment(
117115
double sum_length = 0.0;
118116
const auto start = static_cast<std::int32_t>(base_idx) - 1;
119117
for (std::int32_t i = start; i >= 0; --i) {
120-
sum_length +=
121-
autoware_utils::calc_distance2d(path.points.at(i), path.points.at(i + 1));
118+
sum_length += autoware_utils::calc_distance2d(path.points.at(i), path.points.at(i + 1));
122119

123120
// If it's over offset point, return front index and remain offset length
124121
/**

‎planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/package.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121

2222
<depend>autoware_adapi_v1_msgs</depend>
2323
<depend>autoware_internal_debug_msgs</depend>
24+
<depend>autoware_internal_planning_msgs</depend>
2425
<depend>autoware_interpolation</depend>
2526
<depend>autoware_lanelet2_extension</depend>
2627
<depend>autoware_map_msgs</depend>
2728
<depend>autoware_motion_utils</depend>
2829
<depend>autoware_objects_of_interest_marker_interface</depend>
2930
<depend>autoware_perception_msgs</depend>
3031
<depend>autoware_planning_factor_interface</depend>
31-
<depend>autoware_internal_planning_msgs</depend>
3232
<depend>autoware_route_handler</depend>
3333
<depend>autoware_universe_utils</depend>
3434
<depend>autoware_vehicle_info_utils</depend>

‎planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/src/utilization/debug.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ visualization_msgs::msg::MarkerArray createPolygonMarkerArray(
3434
auto marker = create_default_marker(
3535
"map", now, ns, static_cast<int32_t>(module_id), visualization_msgs::msg::Marker::LINE_STRIP,
3636
create_marker_scale(static_cast<float>(x), static_cast<float>(y), static_cast<float>(z)),
37-
create_marker_color(static_cast<float>(r), static_cast<float>(g), static_cast<float>(b), 0.8f));
37+
create_marker_color(
38+
static_cast<float>(r), static_cast<float>(g), static_cast<float>(b), 0.8f));
3839
marker.lifetime = rclcpp::Duration::from_seconds(0.3);
3940

4041
for (const auto & p : polygon.points) {
@@ -116,7 +117,8 @@ visualization_msgs::msg::MarkerArray createPointsMarkerArray(
116117

117118
auto marker = create_default_marker(
118119
"map", now, ns, 0, visualization_msgs::msg::Marker::SPHERE, create_marker_scale(x, y, z),
119-
create_marker_color(static_cast<float>(r), static_cast<float>(g), static_cast<float>(b), 0.999f));
120+
create_marker_color(
121+
static_cast<float>(r), static_cast<float>(g), static_cast<float>(b), 0.999f));
120122
marker.lifetime = rclcpp::Duration::from_seconds(0.3);
121123
for (size_t i = 0; i < points.size(); ++i) {
122124
marker.id = static_cast<int32_t>(i + planning_utils::bitShift(module_id));

‎planning/behavior_velocity_planner/autoware_behavior_velocity_planner_common/src/utilization/util.cpp

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
#include "autoware/behavior_velocity_planner_common/utilization/boost_geometry_helper.hpp"
1818
#include "autoware/motion_utils/trajectory/trajectory.hpp"
19-
#include "autoware_utils/geometry/geometry.hpp"
2019
#include "autoware_lanelet2_extension/utility/query.hpp"
20+
#include "autoware_utils/geometry/geometry.hpp"
2121

2222
#include <autoware_planning_msgs/msg/path_point.hpp>
2323

@@ -49,10 +49,8 @@ size_t calcPointIndexFromSegmentIndex(
4949
const size_t prev_point_idx = seg_idx;
5050
const size_t next_point_idx = seg_idx + 1;
5151

52-
const double prev_dist =
53-
autoware_utils::calc_distance2d(point, points.at(prev_point_idx));
54-
const double next_dist =
55-
autoware_utils::calc_distance2d(point, points.at(next_point_idx));
52+
const double prev_dist = autoware_utils::calc_distance2d(point, points.at(prev_point_idx));
53+
const double next_dist = autoware_utils::calc_distance2d(point, points.at(next_point_idx));
5654

5755
if (prev_dist < next_dist) {
5856
return prev_point_idx;
@@ -98,9 +96,9 @@ geometry_msgs::msg::Pose transformRelCoordinate2D(
9896
namespace autoware::behavior_velocity_planner::planning_utils
9997
{
10098
using autoware::motion_utils::calcSignedArcLength;
99+
using autoware_planning_msgs::msg::PathPoint;
101100
using autoware_utils::calc_distance2d;
102101
using autoware_utils::calc_offset_pose;
103-
using autoware_planning_msgs::msg::PathPoint;
104102

105103
size_t calcSegmentIndexFromPointIndex(
106104
const std::vector<autoware_internal_planning_msgs::msg::PathPointWithLaneId> & points,

0 commit comments

Comments
 (0)
Please sign in to comment.