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 beyzanurkaya committed Sep 4, 2024
1 parent 564ec75 commit 1bd80c1
Showing 1 changed file with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void BehaviorPathPlannerNode::run()
const auto current_pose = planner_data_->self_odometry->pose.pose;

const auto current_lanelets = planner_data_->route_handler->getRoadLaneletsAtPose(current_pose);
[[maybe_unused]]const auto is_bidirectional = isLaneBidirectional(current_lanelets);
[[maybe_unused]] const auto is_bidirectional = isLaneBidirectional(current_lanelets);
if (!path->points.empty()) {
const size_t current_seg_idx = planner_data_->findEgoSegmentIndex(path->points);
path->points = autoware::motion_utils::cropPoints(
Expand Down Expand Up @@ -554,26 +554,28 @@ void BehaviorPathPlannerNode::run()
return shifted_path;
}

bool BehaviorPathPlannerNode::isLaneBidirectional([[maybe_unused]]const lanelet::ConstLanelets & current_lanelets)
bool BehaviorPathPlannerNode::isLaneBidirectional(
[[maybe_unused]] const lanelet::ConstLanelets & current_lanelets)
{
// Create a map of left bound and right bound
// std::unordered_map<lanelet::Id, lanelet::ConstLineString3d> left_bound_map;
// std::unordered_map<lanelet::Id, lanelet::ConstLineString3d> right_bound_map;
//
// for (const auto & current_lanelet : current_lanelets) {
// const auto left_bound = current_lanelet.leftBound();
// const auto right_bound = current_lanelet.rightBound();
// left_bound_map[left_bound.id()] = left_bound;
// right_bound_map[right_bound.id()] = right_bound;
// }
// // Check if the left bound and right bound are the same
// for (const auto & current_lanelet : current_lanelets) {
// const auto left_bound = current_lanelet.leftBound();
// const auto right_bound = current_lanelet.rightBound();
// if (left_bound_map[left_bound.id()] != left_bound || right_bound_map[right_bound.id()] != right_bound) {
// return true;
// }
// }
// std::unordered_map<lanelet::Id, lanelet::ConstLineString3d> left_bound_map;
// std::unordered_map<lanelet::Id, lanelet::ConstLineString3d> right_bound_map;
//
// for (const auto & current_lanelet : current_lanelets) {
// const auto left_bound = current_lanelet.leftBound();
// const auto right_bound = current_lanelet.rightBound();
// left_bound_map[left_bound.id()] = left_bound;
// right_bound_map[right_bound.id()] = right_bound;
// }
// // Check if the left bound and right bound are the same
// for (const auto & current_lanelet : current_lanelets) {
// const auto left_bound = current_lanelet.leftBound();
// const auto right_bound = current_lanelet.rightBound();
// if (left_bound_map[left_bound.id()] != left_bound || right_bound_map[right_bound.id()] !=
// right_bound) {
// return true;
// }
// }

return true;
}
Expand Down

0 comments on commit 1bd80c1

Please sign in to comment.