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 Jan 19, 2023
1 parent 63a3c14 commit ad280ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ namespace drivable_area_utils
bool isOutsideDrivableAreaFromRectangleFootprint(
const autoware_auto_planning_msgs::msg::TrajectoryPoint & traj_point,
const std::vector<geometry_msgs::msg::Point> & left_bound,
const std::vector<geometry_msgs::msg::Point> & right_bound, const VehicleParam & vehicle_param, const bool is_considering_footprint_edges);
const std::vector<geometry_msgs::msg::Point> & right_bound, const VehicleParam & vehicle_param,
const bool is_considering_footprint_edges);
}

#endif // OBSTACLE_AVOIDANCE_PLANNER__UTILS__UTILS_HPP_
6 changes: 4 additions & 2 deletions planning/obstacle_avoidance_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ ObstacleAvoidancePlanner::ObstacleAvoidancePlanner(const rclcpp::NodeOptions & n
enable_pre_smoothing_ = declare_parameter<bool>("option.enable_pre_smoothing");
skip_optimization_ = declare_parameter<bool>("option.skip_optimization");
reset_prev_optimization_ = declare_parameter<bool>("option.reset_prev_optimization");
is_considering_footprint_edges_ = declare_parameter<bool>("option.is_considering_footprint_edges");
is_considering_footprint_edges_ =
declare_parameter<bool>("option.is_considering_footprint_edges");
}

{ // trajectory parameter
Expand Down Expand Up @@ -601,7 +602,8 @@ rcl_interfaces::msg::SetParametersResult ObstacleAvoidancePlanner::onParam(
updateParam<bool>(parameters, "option.enable_pre_smoothing", enable_pre_smoothing_);
updateParam<bool>(parameters, "option.skip_optimization", skip_optimization_);
updateParam<bool>(parameters, "option.reset_prev_optimization", reset_prev_optimization_);
updateParam<bool>(parameters, "option.is_considering_footprint_edges", is_considering_footprint_edges_);
updateParam<bool>(
parameters, "option.is_considering_footprint_edges", is_considering_footprint_edges_);
}

{ // trajectory parameter
Expand Down
8 changes: 4 additions & 4 deletions planning/obstacle_avoidance_planner/src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ namespace drivable_area_utils
bool isOutsideDrivableAreaFromRectangleFootprint(
const autoware_auto_planning_msgs::msg::TrajectoryPoint & traj_point,
const std::vector<geometry_msgs::msg::Point> & left_bound,
const std::vector<geometry_msgs::msg::Point> & right_bound, const VehicleParam & vehicle_param, const bool is_considering_footprint_edges)
const std::vector<geometry_msgs::msg::Point> & right_bound, const VehicleParam & vehicle_param,
const bool is_considering_footprint_edges)
{
if (left_bound.empty() || right_bound.empty()) {
return false;
Expand All @@ -711,8 +712,7 @@ bool isOutsideDrivableAreaFromRectangleFootprint(
tier4_autoware_utils::calcOffsetPose(traj_point.pose, -base_to_rear, -base_to_left, 0.0)
.position;

if(is_considering_footprint_edges){

if (is_considering_footprint_edges) {
LinearRing2d footprint_polygon;
LineString2d left_bound_line;
LineString2d right_bound_line;
Expand Down Expand Up @@ -742,7 +742,7 @@ bool isOutsideDrivableAreaFromRectangleFootprint(
return true;
}
}

const bool front_top_left = isFrontDrivableArea(top_left_pos, left_bound, right_bound);
const bool front_top_right = isFrontDrivableArea(top_right_pos, left_bound, right_bound);
const bool front_bottom_left = isFrontDrivableArea(bottom_left_pos, left_bound, right_bound);
Expand Down

0 comments on commit ad280ca

Please sign in to comment.