Skip to content

Commit 42b7c5f

Browse files
style(pre-commit): autofix
1 parent 3c635f2 commit 42b7c5f

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/interface.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ namespace autoware
2929
{
3030
namespace behavior_path_planner
3131
{
32+
using ::behavior_path_planner::Direction;
3233
using ::behavior_path_planner::LaneChangeInterface;
33-
using ::behavior_path_planner::RTCInterface;
3434
using ::behavior_path_planner::ObjectsOfInterestMarkerInterface;
35-
using ::behavior_path_planner::Direction;
35+
using ::behavior_path_planner::RTCInterface;
3636

3737
class AvoidanceByLaneChangeInterface : public LaneChangeInterface
3838
{

planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/manager.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ namespace autoware
3030
{
3131
namespace behavior_path_planner
3232
{
33-
using ::route_handler::Direction;
3433
using ::behavior_path_planner::AvoidancePlanningData;
3534
using ::behavior_path_planner::LaneChangeModuleManager;
3635
using ::behavior_path_planner::LaneChangeModuleType;
37-
using ::behavior_path_planner::SceneModuleInterface;
3836
using ::behavior_path_planner::ObjectParameter;
37+
using ::behavior_path_planner::SceneModuleInterface;
3938
using ::behavior_path_planner::SceneModuleManagerInterface;
39+
using ::route_handler::Direction;
4040

4141
class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager
4242
{

planning/behavior_path_avoidance_by_lane_change_module/include/behavior_path_avoidance_by_lane_change_module/scene.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ namespace autoware
2525
{
2626
namespace behavior_path_planner
2727
{
28-
using ::route_handler::Direction;
2928
using ::behavior_path_planner::AvoidanceParameters;
29+
using ::route_handler::Direction;
3030
using AvoidanceDebugData = DebugData;
31-
using ::behavior_path_planner::helper::avoidance::AvoidanceHelper;
32-
using ::behavior_path_planner::LaneChangeParameters;
3331
using ::behavior_path_planner::AvoidancePlanningData;
34-
using ::behavior_path_planner::ObjectDataArray;
35-
using ::behavior_path_planner::ObjectData;
36-
using ::behavior_path_planner::PredictedObject;
3732
using ::behavior_path_planner::LaneChangeModuleType;
33+
using ::behavior_path_planner::LaneChangeParameters;
34+
using ::behavior_path_planner::ObjectData;
35+
using ::behavior_path_planner::ObjectDataArray;
3836
using ::behavior_path_planner::Point2d;
37+
using ::behavior_path_planner::PredictedObject;
38+
using ::behavior_path_planner::helper::avoidance::AvoidanceHelper;
3939

4040
class AvoidanceByLaneChange : public ::behavior_path_planner::NormalLaneChange
4141
{

planning/behavior_path_avoidance_by_lane_change_module/src/scene.cpp

+18-10
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ bool AvoidanceByLaneChange::specialRequiredCheck() const
6262
const auto & objects = avoidance_data_.target_objects;
6363

6464
const auto is_avoidance_target = [&p](const auto & object) {
65-
const auto target_class = ::behavior_path_planner::utils::getHighestProbLabel(object.object.classification) == p.first;
65+
const auto target_class = ::behavior_path_planner::utils::getHighestProbLabel(
66+
object.object.classification) == p.first;
6667
return target_class && object.avoid_required;
6768
};
6869

@@ -105,12 +106,14 @@ void AvoidanceByLaneChange::updateSpecialData()
105106
if (avoidance_data_.target_objects.empty()) {
106107
direction_ = Direction::NONE;
107108
} else {
108-
direction_ = ::behavior_path_planner::utils::avoidance::isOnRight(avoidance_data_.target_objects.front())
109-
? Direction::LEFT
110-
: Direction::RIGHT;
109+
direction_ =
110+
::behavior_path_planner::utils::avoidance::isOnRight(avoidance_data_.target_objects.front())
111+
? Direction::LEFT
112+
: Direction::RIGHT;
111113
}
112114

113-
::behavior_path_planner::utils::avoidance::updateRegisteredObject(registered_objects_, avoidance_data_.target_objects, p);
115+
::behavior_path_planner::utils::avoidance::updateRegisteredObject(
116+
registered_objects_, avoidance_data_.target_objects, p);
114117
::behavior_path_planner::utils::avoidance::compensateDetectionLost(
115118
registered_objects_, avoidance_data_.target_objects, avoidance_data_.other_objects);
116119

@@ -130,7 +133,8 @@ AvoidancePlanningData AvoidanceByLaneChange::calcAvoidancePlanningData(
130133
data.reference_path_rough = prev_module_path_;
131134

132135
const auto resample_interval = avoidance_parameters_->resample_interval_for_planning;
133-
data.reference_path = ::behavior_path_planner::utils::resamplePathWithSpline(data.reference_path_rough, resample_interval);
136+
data.reference_path = ::behavior_path_planner::utils::resamplePathWithSpline(
137+
data.reference_path_rough, resample_interval);
134138

135139
data.current_lanelets = getCurrentLanes();
136140

@@ -237,11 +241,13 @@ std::optional<ObjectData> AvoidanceByLaneChange::createObjectData(
237241

238242
// Find the footprint point closest to the path, set to object_data.overhang_distance.
239243
object_data.overhang_points =
240-
::behavior_path_planner::utils::avoidance::calcEnvelopeOverhangDistance(object_data, data.reference_path);
244+
::behavior_path_planner::utils::avoidance::calcEnvelopeOverhangDistance(
245+
object_data, data.reference_path);
241246

242247
// Check whether the the ego should avoid the object.
243248
const auto & vehicle_width = planner_data_->parameters.vehicle_width;
244-
::behavior_path_planner::utils::avoidance::fillAvoidanceNecessity(object_data, registered_objects_, vehicle_width, p);
249+
::behavior_path_planner::utils::avoidance::fillAvoidanceNecessity(
250+
object_data, registered_objects_, vehicle_width, p);
245251

246252
::behavior_path_planner::utils::avoidance::fillLongitudinalAndLengthByClosestEnvelopeFootprint(
247253
data.reference_path_rough, getEgoPosition(), object_data);
@@ -251,7 +257,8 @@ std::optional<ObjectData> AvoidanceByLaneChange::createObjectData(
251257
double AvoidanceByLaneChange::calcMinAvoidanceLength(const ObjectData & nearest_object) const
252258
{
253259
const auto ego_width = getCommonParam().vehicle_width;
254-
const auto nearest_object_type = ::behavior_path_planner::utils::getHighestProbLabel(nearest_object.object.classification);
260+
const auto nearest_object_type =
261+
::behavior_path_planner::utils::getHighestProbLabel(nearest_object.object.classification);
255262
const auto nearest_object_parameter =
256263
avoidance_parameters_->object_parameters.at(nearest_object_type);
257264
const auto lateral_hard_margin = std::max(
@@ -262,7 +269,8 @@ double AvoidanceByLaneChange::calcMinAvoidanceLength(const ObjectData & nearest_
262269

263270
avoidance_helper_->setData(planner_data_);
264271
const auto shift_length = avoidance_helper_->getShiftLength(
265-
nearest_object, ::behavior_path_planner::utils::avoidance::isOnRight(nearest_object), avoid_margin);
272+
nearest_object, ::behavior_path_planner::utils::avoidance::isOnRight(nearest_object),
273+
avoid_margin);
266274

267275
return avoidance_helper_->getMinAvoidanceDistance(shift_length);
268276
}

0 commit comments

Comments
 (0)