20#include "modules/planning/planning_base/proto/piecewise_jerk_path_config.pb.h"
28using SLState = std::pair<std::array<double, 3>, std::array<double, 3>>;
36 const std::vector<double>& dx,
37 const std::vector<double>& ddx,
39 const double start_s);
45 static std::vector<common::PathPoint>
54 const SLState& init_state,
const std::array<double, 3>& end_state,
55 std::vector<double> l_ref, std::vector<double> l_ref_weight,
57 const std::vector<std::pair<double, double>>& ddl_bounds,
59 std::vector<double>* x, std::vector<double>* dx,
60 std::vector<double>* ddx);
63 const SLState& init_state,
const std::array<double, 3>& end_state,
64 std::vector<double> l_ref, std::vector<double> l_ref_weight,
65 std::vector<double> towing_l_ref, std::vector<double> towing_l_ref_weight,
67 const std::vector<std::pair<double, double>>& ddl_bounds,
69 std::vector<double>* x, std::vector<double>* dx,
70 std::vector<double>* ddx);
77 double weight, std::vector<double>* ref_l,
78 std::vector<double>* weight_ref_l);
82 const std::vector<double>& towing_ref_l,
83 std::vector<double>* ref_l,
84 std::vector<double>* weight_ref_l);
88 std::vector<double>* ref_l, std::vector<double>* weight_ref_l,
89 bool is_left_side_pass);
96 std::vector<std::pair<double, double>>* ddl_bounds);
static bool OptimizePathWithTowingPoints(const SLState &init_state, const std::array< double, 3 > &end_state, std::vector< double > l_ref, std::vector< double > l_ref_weight, std::vector< double > towing_l_ref, std::vector< double > towing_l_ref_weight, const PathBoundary &path_boundary, const std::vector< std::pair< double, double > > &ddl_bounds, double dddl_bound, const PiecewiseJerkPathConfig &config, std::vector< double > *x, std::vector< double > *dx, std::vector< double > *ddx)
static void UpdatePathRefWithBoundInSidePassDirection(const PathBoundary &path_boundary, double weight, std::vector< double > *ref_l, std::vector< double > *weight_ref_l, bool is_left_side_pass)
static std::vector< common::PathPoint > ConvertPathPointRefFromFrontAxeToRearAxe(const PathData &path_data)
static void CalculateAccBound(const PathBoundary &path_boundary, const ReferenceLine &reference_line, std::vector< std::pair< double, double > > *ddl_bounds)
calculate ddl bound by referenceline kappa and adc lat accleration
static FrenetFramePath ToPiecewiseJerkPath(const std::vector< double > &x, const std::vector< double > &dx, const std::vector< double > &ddx, const double delta_s, const double start_s)
Data format tramform from raw data to FrenetFramePath
static void FormulateExtraConstraints(PathBound extra_path_bound, const PathBoundary &path_boundary, ObsCornerConstraints *extra_constraints)
static double EstimateJerkBoundary(const double vehicle_speed)
Calculation of jerk boundary based on vehicle kinematics model.
static bool OptimizePath(const SLState &init_state, const std::array< double, 3 > &end_state, std::vector< double > l_ref, std::vector< double > l_ref_weight, const PathBoundary &path_boundary, const std::vector< std::pair< double, double > > &ddl_bounds, double dddl_bound, const PiecewiseJerkPathConfig &config, std::vector< double > *x, std::vector< double > *dx, std::vector< double > *ddx)
Piecewise jerk path optimizer.
static void UpdatePathRefWithBound(const PathBoundary &path_boundary, double weight, std::vector< double > *ref_l, std::vector< double > *weight_ref_l)
If ref_l is below or above path boundary, will update its values and weights
Planning module main class.
std::pair< std::array< double, 3 >, std::array< double, 3 > > SLState
std::vector< PathBoundPoint > PathBound