Skip to content

Commit

Permalink
fix formats
Browse files Browse the repository at this point in the history
Signed-off-by: mohammad alqudah <[email protected]>
  • Loading branch information
mkquda committed Jun 7, 2024
1 parent 1eba7b9 commit c8d7716
Show file tree
Hide file tree
Showing 28 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#ifndef MANAGER_HPP_
#define MANAGER_HPP_

#include "behavior_path_lane_change_module/manager.hpp"
#include "autoware_route_handler/autoware_route_handler.hpp"
#include "behavior_path_lane_change_module/manager.hpp"

#include <rclcpp/rclcpp.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "autoware_behavior_path_planner_common/utils/drivable_area_expansion/parameters.hpp"
#include "motion_utils/trajectory/trajectory.hpp"

#include <autoware_route_handler/autoware_route_handler.hpp>
#include <lanelet2_extension/regulatory_elements/Forward.hpp>
#include <lanelet2_extension/utility/utilities.hpp>
#include <rclcpp/rclcpp/clock.hpp>
#include <rclcpp/rclcpp/time.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>

#include <autoware_adapi_v1_msgs/msg/operation_mode_state.hpp>
#include <autoware_perception_msgs/msg/predicted_objects.hpp>
Expand All @@ -50,6 +50,7 @@

namespace behavior_path_planner
{
using autoware::route_handler::RouteHandler;
using autoware_adapi_v1_msgs::msg::OperationModeState;
using autoware_perception_msgs::msg::PredictedObject;
using autoware_perception_msgs::msg::PredictedObjects;
Expand All @@ -61,7 +62,6 @@ using geometry_msgs::msg::AccelWithCovarianceStamped;
using geometry_msgs::msg::PoseStamped;
using nav_msgs::msg::OccupancyGrid;
using nav_msgs::msg::Odometry;
using autoware::route_handler::RouteHandler;
using tier4_planning_msgs::msg::LateralOffset;
using tier4_planning_msgs::msg::PathWithLaneId;
using PlanResult = PathWithLaneId::SharedPtr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

#include <autoware_behavior_path_planner_common/interface/steering_factor_interface.hpp>
#include <autoware_behavior_path_planner_common/turn_signal_decider.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <magic_enum.hpp>
#include <motion_utils/marker/marker_helper.hpp>
#include <motion_utils/trajectory/path_with_lane_id.hpp>
#include <motion_utils/trajectory/trajectory.hpp>
#include <objects_of_interest_marker_interface/objects_of_interest_marker_interface.hpp>
#include <rclcpp/rclcpp.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <rtc_interface/rtc_interface.hpp>
#include <tier4_autoware_utils/geometry/geometry.hpp>
#include <tier4_autoware_utils/ros/marker_helper.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

#include <autoware_behavior_path_planner_common/parameters.hpp>
#include <autoware_behavior_path_planner_common/utils/path_shifter/path_shifter.hpp>
#include <lanelet2_extension/utility/message_conversion.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <lanelet2_extension/utility/message_conversion.hpp>
#include <tier4_autoware_utils/geometry/boost_geometry.hpp>
#include <tier4_autoware_utils/geometry/geometry.hpp>

Expand All @@ -42,12 +42,12 @@

namespace behavior_path_planner
{
using autoware::route_handler::RouteHandler;
using autoware_vehicle_msgs::msg::HazardLightsCommand;
using autoware_vehicle_msgs::msg::TurnIndicatorsCommand;
using geometry_msgs::msg::Point;
using geometry_msgs::msg::Pose;
using nav_msgs::msg::Odometry;
using autoware::route_handler::RouteHandler;
using tier4_planning_msgs::msg::PathWithLaneId;

const std::map<std::string, uint8_t> g_signal_map = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ using autoware_perception_msgs::msg::PredictedObject;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_perception_msgs::msg::PredictedPath;

using autoware::route_handler::RouteHandler;
using geometry_msgs::msg::Point;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::Vector3;
using autoware::route_handler::RouteHandler;
using tier4_autoware_utils::LinearRing2d;
using tier4_autoware_utils::Polygon2d;
using tier4_planning_msgs::msg::PathPointWithLaneId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ TEST(DrivableAreaExpansionProjection, expand_drivable_area)
planner_data.dynamic_object =
std::make_shared<drivable_area_expansion::PredictedObjects>(dynamic_objects);
planner_data.self_odometry = std::make_shared<nav_msgs::msg::Odometry>();
planner_data.route_handler = std::make_shared<autoware::route_handler::RouteHandler>(route_handler);
planner_data.route_handler =
std::make_shared<autoware::route_handler::RouteHandler>(route_handler);

Check warning on line 232 in planning/autoware_behavior_path_planner_common/test/test_drivable_area_expansion.cpp

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main)

❌ Getting worse: Large Method

TEST:DrivableAreaExpansionProjection:expand_drivable_area increases from 89 to 90 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
drivable_area_expansion::expand_drivable_area(
path, std::make_shared<behavior_path_planner::PlannerData>(planner_data));
// unchanged path points
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
namespace behavior_path_planner
{

using behavior_path_planner::utils::path_safety_checker::CollisionCheckDebug;
using autoware::route_handler::Direction;
using behavior_path_planner::utils::path_safety_checker::CollisionCheckDebug;

enum class ObjectInfo {
NONE = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#ifndef AUTOWARE_PLANNING_TEST_MANAGER__AUTOWARE_PLANNING_TEST_MANAGER_UTILS_HPP_
#define AUTOWARE_PLANNING_TEST_MANAGER__AUTOWARE_PLANNING_TEST_MANAGER_UTILS_HPP_
#include <planning_test_utils/planning_test_utils.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <planning_test_utils/planning_test_utils.hpp>

#include <autoware_planning_msgs/msg/lanelet_route.hpp>
#include <geometry_msgs/msg/pose.hpp>
Expand All @@ -26,10 +26,10 @@

namespace autoware_planning_test_manager::utils
{
using autoware::route_handler::RouteHandler;
using autoware_planning_msgs::msg::LaneletRoute;
using geometry_msgs::msg::Pose;
using nav_msgs::msg::Odometry;
using autoware::route_handler::RouteHandler;
using RouteSections = std::vector<autoware_planning_msgs::msg::LaneletSegment>;

Pose createPoseFromLaneID(const lanelet::Id & lane_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#ifndef REMAINING_DISTANCE_TIME_CALCULATOR_NODE_HPP_
#define REMAINING_DISTANCE_TIME_CALCULATOR_NODE_HPP_

#include <rclcpp/rclcpp.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_internal_msgs/msg/mission_remaining_distance_time.hpp>
#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include "planning_test_utils/mock_data_parser.hpp"
#include "planning_test_utils/planning_test_utils.hpp"

#include <autoware_route_handler/autoware_route_handler.hpp>
#include <lanelet2_extension/io/autoware_osm_parser.hpp>
#include <lanelet2_extension/projection/mgrs_projector.hpp>
#include <lanelet2_extension/utility/message_conversion.hpp>
#include <lanelet2_extension/utility/utilities.hpp>
#include <rclcpp/clock.hpp>
#include <rclcpp/logging.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>

#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@

namespace autoware::static_centerline_generator
{
using autoware::route_handler::RouteHandler;
using autoware_map_msgs::msg::LaneletMapBin;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_planning_msgs::msg::LaneletRoute;
using autoware_planning_msgs::msg::Path;
using autoware_planning_msgs::msg::PathPoint;
using autoware_planning_msgs::msg::Trajectory;
using autoware_planning_msgs::msg::TrajectoryPoint;
using autoware::route_handler::RouteHandler;
using tier4_autoware_utils::LinearRing2d;
using tier4_autoware_utils::LineString2d;
using tier4_autoware_utils::Point2d;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ class AvoidanceByLaneChangeModuleManager : public LaneChangeModuleManager
public:
AvoidanceByLaneChangeModuleManager()
: LaneChangeModuleManager(
"avoidance_by_lane_change", Direction::NONE,
LaneChangeModuleType::AVOIDANCE_BY_LANE_CHANGE)
"avoidance_by_lane_change", Direction::NONE, LaneChangeModuleType::AVOIDANCE_BY_LANE_CHANGE)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#define BEHAVIOR_PATH_LANE_CHANGE_MODULE__MANAGER_HPP_

#include "autoware_behavior_path_planner_common/interface/scene_module_manager_interface.hpp"
#include "behavior_path_lane_change_module/utils/data_structs.hpp"
#include "autoware_route_handler/autoware_route_handler.hpp"
#include "behavior_path_lane_change_module/utils/data_structs.hpp"

#include <rclcpp/rclcpp.hpp>

Expand Down Expand Up @@ -58,8 +58,7 @@ class LaneChangeRightModuleManager : public LaneChangeModuleManager
{
public:
LaneChangeRightModuleManager()
: LaneChangeModuleManager(
"lane_change_right", Direction::RIGHT, LaneChangeModuleType::NORMAL)
: LaneChangeModuleManager("lane_change_right", Direction::RIGHT, LaneChangeModuleType::NORMAL)
{
}
};
Expand All @@ -68,8 +67,7 @@ class LaneChangeLeftModuleManager : public LaneChangeModuleManager
{
public:
LaneChangeLeftModuleManager()
: LaneChangeModuleManager(
"lane_change_left", Direction::LEFT, LaneChangeModuleType::NORMAL)
: LaneChangeModuleManager("lane_change_left", Direction::LEFT, LaneChangeModuleType::NORMAL)
{
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

namespace behavior_path_planner
{
using autoware::route_handler::Direction;
using behavior_path_planner::utils::path_safety_checker::CollisionCheckDebug;
using behavior_path_planner::utils::path_safety_checker::CollisionCheckDebugMap;
using behavior_path_planner::utils::path_safety_checker::ExtendedPredictedObject;
Expand All @@ -33,7 +34,6 @@ using data::lane_change::LanesPolygon;
using geometry_msgs::msg::Point;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::Twist;
using autoware::route_handler::Direction;
using tier4_planning_msgs::msg::PathWithLaneId;
using utils::path_safety_checker::ExtendedPredictedObjects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@

namespace behavior_path_planner
{
using autoware::route_handler::Direction;
using data::lane_change::PathSafetyStatus;
using geometry_msgs::msg::Point;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::Twist;
using autoware::route_handler::Direction;
using tier4_autoware_utils::StopWatch;
using tier4_planning_msgs::msg::PathWithLaneId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

namespace behavior_path_planner::utils::lane_change
{
using autoware::route_handler::Direction;
using autoware_perception_msgs::msg::PredictedObject;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_perception_msgs::msg::PredictedPath;
Expand All @@ -51,7 +52,6 @@ using geometry_msgs::msg::Point;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::Twist;
using path_safety_checker::CollisionCheckDebugMap;
using autoware::route_handler::Direction;
using tier4_autoware_utils::Polygon2d;
using tier4_planning_msgs::msg::PathWithLaneId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@

namespace behavior_path_planner::utils::lane_change
{
using autoware::route_handler::RouteHandler;
using autoware_perception_msgs::msg::ObjectClassification;
using autoware_perception_msgs::msg::PredictedObjects;
using geometry_msgs::msg::Pose;
using autoware::route_handler::RouteHandler;
using tier4_autoware_utils::LineString2d;
using tier4_autoware_utils::Point2d;
using tier4_autoware_utils::Polygon2d;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@

namespace behavior_path_planner::start_planner_utils
{
using autoware::route_handler::RouteHandler;
using autoware_perception_msgs::msg::PredictedObjects;
using autoware_perception_msgs::msg::PredictedPath;
using behavior_path_planner::utils::path_safety_checker::EgoPredictedPathParams;
using geometry_msgs::msg::Pose;
using geometry_msgs::msg::Twist;
using autoware::route_handler::RouteHandler;
using tier4_planning_msgs::msg::PathWithLaneId;

PathWithLaneId getBackwardPath(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ bool object_is_incoming(

std::optional<std::pair<double, double>> object_time_to_range(
const autoware_perception_msgs::msg::PredictedObject & object, const OverlapRange & range,
const std::shared_ptr<autoware::route_handler::RouteHandler> route_handler, const double dist_buffer,
const rclcpp::Logger & logger)
const std::shared_ptr<autoware::route_handler::RouteHandler> route_handler,
const double dist_buffer, const rclcpp::Logger & logger)
{
// skip the dynamic object if it is not in a lane preceding the overlapped lane
// lane changes are intentionally not considered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#include "types.hpp"

#include <rclcpp/logger.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <rclcpp/logger.hpp>

#include <autoware_perception_msgs/msg/predicted_objects.hpp>

Expand Down Expand Up @@ -54,8 +54,8 @@ double time_along_path(const EgoData & ego_data, const size_t target_idx);
/// the opposite direction, time at enter > time at exit
std::optional<std::pair<double, double>> object_time_to_range(
const autoware_perception_msgs::msg::PredictedObject & object, const OverlapRange & range,
const std::shared_ptr<autoware::route_handler::RouteHandler> route_handler, const double dist_buffer,
const rclcpp::Logger & logger);
const std::shared_ptr<autoware::route_handler::RouteHandler> route_handler,
const double dist_buffer, const rclcpp::Logger & logger);
/// @brief use the lanelet map to estimate the times when an object will reach the enter and exit
/// points of an overlapping range
/// @param [in] object dynamic object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ lanelet::ConstLanelets calculate_ignored_lanelets(

lanelet::ConstLanelets calculate_other_lanelets(
const EgoData & ego_data, const lanelet::ConstLanelets & path_lanelets,
const lanelet::ConstLanelets & ignored_lanelets,
const RouteHandler & route_handler, const PlannerParam & params)
const lanelet::ConstLanelets & ignored_lanelets, const RouteHandler & route_handler,
const PlannerParam & params)
{
lanelet::ConstLanelets other_lanelets;
const lanelet::BasicPoint2d ego_point(ego_data.pose.position.x, ego_data.pose.position.y);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ lanelet::ConstLanelets calculate_ignored_lanelets(
/// @return lanelets to check for overlaps
lanelet::ConstLanelets calculate_other_lanelets(
const EgoData & ego_data, const lanelet::ConstLanelets & path_lanelets,
const lanelet::ConstLanelets & ignored_lanelets,
const RouteHandler & route_handler, const PlannerParam & params);
const lanelet::ConstLanelets & ignored_lanelets, const RouteHandler & route_handler,
const PlannerParam & params);
} // namespace behavior_velocity_planner::out_of_lane

#endif // LANELETS_SELECTION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#ifndef LANELET2_PLUGINS__DEFAULT_PLANNER_HPP_
#define LANELET2_PLUGINS__DEFAULT_PLANNER_HPP_

#include <autoware_route_handler/autoware_route_handler.hpp>
#include <mission_planner/mission_planner_plugin.hpp>
#include <rclcpp/rclcpp.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <vehicle_info_util/vehicle_info_util.hpp>

#include <autoware_map_msgs/msg/lanelet_map_bin.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ void insert_marker_array(
}

lanelet::ConstLanelet combine_lanelets_with_shoulder(
const lanelet::ConstLanelets & lanelets, const autoware::route_handler::RouteHandler & route_handler)
const lanelet::ConstLanelets & lanelets,
const autoware::route_handler::RouteHandler & route_handler)
{
lanelet::Points3d lefts;
lanelet::Points3d rights;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#ifndef LANELET2_PLUGINS__UTILITY_FUNCTIONS_HPP_
#define LANELET2_PLUGINS__UTILITY_FUNCTIONS_HPP_

#include <rclcpp/rclcpp.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <rclcpp/rclcpp.hpp>
#include <tier4_autoware_utils/geometry/geometry.hpp>
#include <vehicle_info_util/vehicle_info_util.hpp>

Expand Down Expand Up @@ -54,7 +54,8 @@ void insert_marker_array(
* @param route_handler route handler to query the lanelet map
*/
lanelet::ConstLanelet combine_lanelets_with_shoulder(
const lanelet::ConstLanelets & lanelets, const autoware::route_handler::RouteHandler & route_handler);
const lanelet::ConstLanelets & lanelets,
const autoware::route_handler::RouteHandler & route_handler);

std::vector<geometry_msgs::msg::Point> convertCenterlineToPoints(const lanelet::Lanelet & lanelet);
geometry_msgs::msg::Pose convertBasicPoint3dToPose(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

#include "arrival_checker.hpp"

#include <autoware_route_handler/autoware_route_handler.hpp>
#include <mission_planner/mission_planner_plugin.hpp>
#include <pluginlib/class_loader.hpp>
#include <rclcpp/rclcpp.hpp>
#include <autoware_route_handler/autoware_route_handler.hpp>
#include <tier4_autoware_utils/ros/logger_level_configure.hpp>

#include <autoware_adapi_v1_msgs/srv/set_route.hpp>
Expand Down
Loading

0 comments on commit c8d7716

Please sign in to comment.