Skip to content

Commit

Permalink
refactor(behavior_path_planner): remove unrelated header file (autowa…
Browse files Browse the repository at this point in the history
…refoundation#1593)

* refactor(behavior_path_planner): remove unrelated header file

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Remove some header from behavior_path_planner_node.hpp/cpp

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix spell checks

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
  • Loading branch information
zulfaqar-azmi-t4 authored and yukke42 committed Oct 14, 2022
1 parent fd7b2f1 commit a5acec7
Show file tree
Hide file tree
Showing 29 changed files with 51 additions and 185 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@

#include "behavior_path_planner/behavior_tree_manager.hpp"
#include "behavior_path_planner/data_manager.hpp"
#include "behavior_path_planner/scene_module/avoidance/avoidance_module.hpp"
#include "behavior_path_planner/scene_module/avoidance/avoidance_module_data.hpp"
#include "behavior_path_planner/scene_module/lane_change/lane_change_module.hpp"
#include "behavior_path_planner/scene_module/lane_following/lane_following_module.hpp"
#include "behavior_path_planner/scene_module/pull_out/pull_out_module.hpp"
#include "behavior_path_planner/scene_module/pull_over/pull_over_module.hpp"
#include "behavior_path_planner/scene_module/side_shift/side_shift_module.hpp"
#include "behavior_path_planner/turn_signal_decider.hpp"

#include <route_handler/route_handler.hpp>
#include <tier4_autoware_utils/ros/self_pose_listener.hpp>

#include <autoware_auto_mapping_msgs/msg/had_map_bin.hpp>
Expand All @@ -38,18 +37,9 @@
#include <nav_msgs/msg/occupancy_grid.hpp>
#include <nav_msgs/msg/odometry.hpp>
#include <tier4_planning_msgs/msg/approval.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>
#include <tier4_planning_msgs/msg/path_change_module.hpp>
#include <tier4_planning_msgs/msg/path_change_module_array.hpp>
#include <tier4_planning_msgs/msg/path_change_module_id.hpp>
#include <tier4_planning_msgs/msg/scenario.hpp>
#include <tier4_planning_msgs/msg/stop_reason_array.hpp>

#include <lanelet2_core/LaneletMap.h>
#include <lanelet2_routing/RoutingGraph.h>
#include <lanelet2_traffic_rules/TrafficRulesFactory.h>

#include <memory>
#include <mutex>
Expand All @@ -69,12 +59,8 @@ using autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand;
using geometry_msgs::msg::TwistStamped;
using nav_msgs::msg::OccupancyGrid;
using nav_msgs::msg::Odometry;
using route_handler::RouteHandler;
using tier4_planning_msgs::msg::AvoidanceDebugFactor;
using tier4_planning_msgs::msg::AvoidanceDebugMsg;
using tier4_planning_msgs::msg::AvoidanceDebugMsgArray;
using tier4_planning_msgs::msg::PathChangeModule;
using tier4_planning_msgs::msg::PathChangeModuleArray;
using tier4_planning_msgs::msg::Scenario;
using visualization_msgs::msg::MarkerArray;

Expand Down Expand Up @@ -160,8 +146,6 @@ class BehaviorPathPlannerNode : public rclcpp::Node
const std::vector<std::shared_ptr<SceneModuleStatus>> & statuses) const;

// debug

private:
rclcpp::Publisher<OccupancyGrid>::SharedPtr debug_drivable_area_publisher_;
rclcpp::Publisher<MarkerArray>::SharedPtr debug_drivable_area_lanelets_publisher_;
rclcpp::Publisher<Path>::SharedPtr debug_path_publisher_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include "behavior_path_planner/data_manager.hpp"
#include "behavior_path_planner/scene_module/scene_module_bt_node_interface.hpp"

#include <route_handler/route_handler.hpp>

#include <visualization_msgs/msg/marker_array.hpp>

#include <behaviortree_cpp_v3/behavior_tree.h>
Expand All @@ -29,8 +27,6 @@

#include <memory>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>

namespace behavior_path_planner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@
#include <autoware_auto_perception_msgs/msg/predicted_objects.hpp>
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <nav_msgs/msg/odometry.hpp>

#include <lanelet2_core/LaneletMap.h>
#include <lanelet2_routing/RoutingGraph.h>
#include <lanelet2_traffic_rules/TrafficRulesFactory.h>
#include <lanelet2_core/geometry/Lanelet.h>

#include <memory>
#include <string>
Expand All @@ -38,7 +35,6 @@ namespace behavior_path_planner
using autoware_auto_perception_msgs::msg::PredictedObjects;
using autoware_auto_planning_msgs::msg::PathWithLaneId;
using geometry_msgs::msg::PoseStamped;
using geometry_msgs::msg::TwistStamped;
using nav_msgs::msg::OccupancyGrid;
using nav_msgs::msg::Odometry;
using route_handler::RouteHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
#ifndef BEHAVIOR_PATH_PLANNER__DEBUG_UTILITIES_HPP_
#define BEHAVIOR_PATH_PLANNER__DEBUG_UTILITIES_HPP_

#include "behavior_path_planner/path_utilities.hpp"
#include "behavior_path_planner/scene_module/utils/path_shifter.hpp"
#include "behavior_path_planner/utilities.hpp"

#include <tier4_autoware_utils/ros/marker_helper.hpp>

Expand All @@ -25,9 +23,7 @@
#include <geometry_msgs/msg/polygon.hpp>
#include <visualization_msgs/msg/marker_array.hpp>

#include <lanelet2_core/LaneletMap.h>
#include <lanelet2_routing/RoutingGraph.h>
#include <tf2/utils.h>
#include <lanelet2_core/geometry/Lanelet.h>

#include <string>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,19 @@

#include <behavior_path_planner/parameters.hpp>
#include <behavior_path_planner/scene_module/utils/path_shifter.hpp>
#include <opencv2/opencv.hpp>

#include <autoware_auto_planning_msgs/msg/path.hpp>
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp>
#include <geometry_msgs/msg/point.hpp>

#include <boost/geometry/geometries/box.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometry.hpp>

#include <lanelet2_core/geometry/Lanelet.h>
#include <lanelet2_routing/Route.h>
#include <lanelet2_routing/RoutingGraph.h>
#include <lanelet2_routing/RoutingGraphContainer.h>

#include <limits>
#include <utility>
#include <vector>

namespace behavior_path_planner
{
namespace util
namespace behavior_path_planner::util
{
using autoware_auto_planning_msgs::msg::Path;
using autoware_auto_planning_msgs::msg::PathWithLaneId;
Expand Down Expand Up @@ -69,7 +58,6 @@ std::pair<TurnIndicatorsCommand, double> getPathTurnSignal(
const ShiftPoint & shift_point, const Pose & pose, const double & velocity,
const BehaviorPathPlannerParameters & common_parameter);

} // namespace util
} // namespace behavior_path_planner
} // namespace behavior_path_planner::util

#endif // BEHAVIOR_PATH_PLANNER__PATH_UTILITIES_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,19 @@

#include <rclcpp/rclcpp.hpp>

#include <autoware_auto_perception_msgs/msg/predicted_objects.hpp>
#include <autoware_auto_planning_msgs/msg/path.hpp>
#include <autoware_auto_perception_msgs/msg/predicted_object.hpp>
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>

#include <memory>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

namespace behavior_path_planner
{
using tier4_planning_msgs::msg::AvoidanceDebugMsg;
class AvoidanceModule : public SceneModuleInterface
{
using RegisteredShiftPointArray = std::vector<std::pair<UUID, Pose>>;
Expand Down Expand Up @@ -207,7 +204,7 @@ class AvoidanceModule : public SceneModuleInterface

// -- for shift point operations --
void alignShiftPointsOrder(
AvoidPointArray & shift_points, const bool recalc_start_length = true) const;
AvoidPointArray & shift_points, const bool recalculate_start_length = true) const;
AvoidPointArray fillAdditionalInfo(const AvoidPointArray & shift_points) const;
AvoidPoint fillAdditionalInfo(const AvoidPoint & shift_point) const;
void fillAdditionalInfoFromPoint(AvoidPointArray & shift_points) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,24 @@
#include <rclcpp/rclcpp.hpp>

#include <autoware_auto_perception_msgs/msg/predicted_objects.hpp>
#include <autoware_auto_planning_msgs/msg/path.hpp>
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>

#include <lanelet2_core/geometry/Lanelet.h>

#include <memory>
#include <string>
#include <vector>

namespace behavior_path_planner
{
using autoware_auto_perception_msgs::msg::PredictedObject;
using autoware_auto_perception_msgs::msg::PredictedObjects;
using autoware_auto_planning_msgs::msg::PathWithLaneId;

using tier4_planning_msgs::msg::AvoidanceDebugFactor;
using tier4_planning_msgs::msg::AvoidanceDebugMsg;
using tier4_planning_msgs::msg::AvoidanceDebugMsgArray;

using geometry_msgs::msg::Point;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::PoseStamped;

struct AvoidanceParameters
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include <memory>
#include <string>
#include <utility>
#include <vector>

namespace behavior_path_planner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,13 @@

#include "behavior_path_planner/scene_module/lane_change/lane_change_path.hpp"
#include "behavior_path_planner/scene_module/scene_module_interface.hpp"
#include "behavior_path_planner/utilities.hpp"

#include <lanelet2_extension/utility/message_conversion.hpp>
#include <lanelet2_extension/utility/utilities.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_auto_planning_msgs/msg/path.hpp>
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp>

#include <tf2/utils.h>

#include <memory>
#include <string>
#include <utility>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@

#include "behavior_path_planner/scene_module/scene_module_interface.hpp"

#include <lanelet2_extension/utility/utilities.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>

#include <memory>
#include <string>
#include <utility>

namespace behavior_path_planner
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,11 @@
#include "behavior_path_planner/scene_module/pull_out/pull_out_path.hpp"
#include "behavior_path_planner/scene_module/scene_module_interface.hpp"
#include "behavior_path_planner/scene_module/utils/path_shifter.hpp"
#include "behavior_path_planner/utilities.hpp"

#include <lanelet2_extension/utility/message_conversion.hpp>
#include <lanelet2_extension/utility/utilities.hpp>
#include <vehicle_info_util/vehicle_info.hpp>

#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>

#include <tf2/utils.h>

#include <memory>
#include <string>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,19 @@
#define BEHAVIOR_PATH_PLANNER__SCENE_MODULE__PULL_OUT__UTIL_HPP_

#include "behavior_path_planner/scene_module/pull_out/pull_out_module.hpp"
#include "behavior_path_planner/utilities.hpp"

#include <autoware_auto_perception_msgs/msg/predicted_objects.hpp>
#include <autoware_auto_perception_msgs/msg/predicted_path.hpp>
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <geometry_msgs/msg/pose_stamped.hpp>
#include <geometry_msgs/msg/twist_stamped.hpp>
#include <geometry_msgs/msg/pose.hpp>
#include <geometry_msgs/msg/twist.hpp>

#include <lanelet2_core/primitives/Primitive.h>

#include <memory>
#include <vector>

namespace behavior_path_planner
{
namespace pull_out_utils
namespace behavior_path_planner::pull_out_utils
{
using autoware_auto_perception_msgs::msg::PredictedObjects;
using autoware_auto_perception_msgs::msg::PredictedPath;
Expand Down Expand Up @@ -83,7 +80,6 @@ bool hasEnoughDistance(
const bool isInGoalRouteSection, const Pose & goal_pose,
const lanelet::routing::RoutingGraphContainer & overall_graphs);
bool isObjectFront(const Pose & ego_pose, const Pose & obj_pose);
} // namespace pull_out_utils
} // namespace behavior_path_planner
} // namespace behavior_path_planner::pull_out_utils

#endif // BEHAVIOR_PATH_PLANNER__SCENE_MODULE__PULL_OUT__UTIL_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,24 @@
#include "behavior_path_planner/scene_module/scene_module_interface.hpp"
#include "behavior_path_planner/scene_module/utils/geometric_parallel_parking.hpp"
#include "behavior_path_planner/scene_module/utils/occupancy_grid_based_collision_detector.hpp"
#include "behavior_path_planner/scene_module/utils/path_shifter.hpp"
#include "behavior_path_planner/utilities.hpp"

#include <lane_departure_checker/lane_departure_checker.hpp>
#include <lanelet2_extension/utility/message_conversion.hpp>
#include <lanelet2_extension/utility/utilities.hpp>
#include <vehicle_info_util/vehicle_info_util.hpp>

#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <autoware_auto_vehicle_msgs/msg/hazard_lights_command.hpp>

#include <tf2/utils.h>

#include <deque>
#include <memory>
#include <string>
#include <utility>
#include <vector>

using nav_msgs::msg::OccupancyGrid;

namespace behavior_path_planner
{
using autoware_auto_vehicle_msgs::msg::HazardLightsCommand;
using geometry_msgs::msg::PoseArray;
using lane_departure_checker::LaneDepartureChecker;
using nav_msgs::msg::OccupancyGrid;
using visualization_msgs::msg::Marker;
using visualization_msgs::msg::MarkerArray;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,9 @@
#include <autoware_auto_planning_msgs/msg/path_with_lane_id.hpp>
#include <autoware_auto_vehicle_msgs/msg/hazard_lights_command.hpp>
#include <autoware_auto_vehicle_msgs/msg/turn_indicators_command.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_factor.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg.hpp>
#include <tier4_planning_msgs/msg/avoidance_debug_msg_array.hpp>
#include <unique_identifier_msgs/msg/uuid.hpp>

#include <boost/optional.hpp>

#include <behaviortree_cpp_v3/basic_types.h>

#include <limits>
Expand All @@ -45,9 +41,6 @@ namespace behavior_path_planner
using autoware_auto_planning_msgs::msg::PathWithLaneId;
using autoware_auto_vehicle_msgs::msg::HazardLightsCommand;
using autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand;
using route_handler::LaneChangeDirection;
using route_handler::PullOutDirection;
using route_handler::PullOverDirection;
using rtc_interface::RTCInterface;
using tier4_planning_msgs::msg::AvoidanceDebugMsgArray;
using unique_identifier_msgs::msg::UUID;
Expand All @@ -73,7 +66,7 @@ struct TurnSignalInfo

struct BehaviorModuleOutput
{
BehaviorModuleOutput() {}
BehaviorModuleOutput() = default;

// path planed by module
PlanResult path{};
Expand All @@ -86,7 +79,7 @@ struct BehaviorModuleOutput

struct CandidateOutput
{
CandidateOutput() {}
CandidateOutput() = default;
explicit CandidateOutput(const PathWithLaneId & path) : path_candidate{path} {}
PathWithLaneId path_candidate{};
double lateral_shift{0.0};
Expand Down
Loading

0 comments on commit a5acec7

Please sign in to comment.