Skip to content

Commit

Permalink
Move lane change namespace to bottom level
Browse files Browse the repository at this point in the history
Signed-off-by: Zulfaqar Azmi <[email protected]>
  • Loading branch information
zulfaqar-azmi-t4 committed Jun 17, 2024
1 parent 7a8568f commit 4827a6d
Showing 1 changed file with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,6 @@
#include <utility>
#include <vector>

namespace autoware::behavior_path_planner::lane_change
{
struct CancelParameters
{
bool enable_on_prepare_phase{true};
bool enable_on_lane_changing_phase{false};
double delta_time{1.0};
double duration{5.0};
double max_lateral_jerk{10.0};
double overhang_tolerance{0.0};

// unsafe_hysteresis_threshold will be compare with the number of detected unsafe instance. If the
// number of unsafe exceeds unsafe_hysteresis_threshold, the lane change will be cancelled or
// aborted.
int unsafe_hysteresis_threshold{2};
};

struct PathSafetyStatus
{
bool is_safe{true};
bool is_object_coming_from_rear{false};
};

struct LanesPolygon
{
std::optional<lanelet::BasicPolygon2d> current;
std::optional<lanelet::BasicPolygon2d> target;
std::vector<lanelet::BasicPolygon2d> target_backward;
};

} // namespace autoware::behavior_path_planner::lane_change
namespace autoware::behavior_path_planner
{
struct LateralAccelerationMap
Expand Down Expand Up @@ -99,6 +68,21 @@ struct LateralAccelerationMap
}
};

struct LaneChangeCancelParameters
{
bool enable_on_prepare_phase{true};
bool enable_on_lane_changing_phase{false};
double delta_time{1.0};
double duration{5.0};
double max_lateral_jerk{10.0};
double overhang_tolerance{0.0};

// unsafe_hysteresis_threshold will be compare with the number of detected unsafe instance. If the
// number of unsafe exceeds unsafe_hysteresis_threshold, the lane change will be cancelled or
// aborted.
int unsafe_hysteresis_threshold{2};
};

struct LaneChangeParameters
{
// trajectory generation
Expand Down Expand Up @@ -158,7 +142,7 @@ struct LaneChangeParameters
utils::path_safety_checker::RSSparams rss_params_for_stuck{};

// abort
lane_change::CancelParameters cancel{};
LaneChangeCancelParameters cancel{};

double finish_judge_lateral_threshold{0.2};

Expand Down Expand Up @@ -219,4 +203,20 @@ enum class LaneChangeModuleType {
};
} // namespace autoware::behavior_path_planner

namespace autoware::behavior_path_planner::lane_change
{
struct PathSafetyStatus
{
bool is_safe{true};
bool is_object_coming_from_rear{false};
};

struct LanesPolygon
{
std::optional<lanelet::BasicPolygon2d> current;
std::optional<lanelet::BasicPolygon2d> target;
std::vector<lanelet::BasicPolygon2d> target_backward;
};
} // namespace autoware::behavior_path_planner::lane_change

#endif // AUTOWARE_BEHAVIOR_PATH_LANE_CHANGE_MODULE__UTILS__DATA_STRUCTS_HPP_

0 comments on commit 4827a6d

Please sign in to comment.