46 if (!Scenario::LoadConfig<ScenarioLargeCurvatureConfig>(&context_.
scenario_config)) {
47 AERROR <<
"fail to get config of scenario" <<
Name();
52 CHECK_NOTNULL(hdmap_);
59 AINFO <<
"No lane follow command from routing";
63 AINFO <<
"Other scenario is null or no reference line";
70 if (!frame.
reference_line_info().front().reference_line().XYToSL({vehicle_state.x(), vehicle_state.y()}, &adc_sl)) {
71 AINFO <<
"scenario LargeCurvature: failed to get nearest lane";
76 = frame.
reference_line_info().front().reference_line().GetNearestReferencePoint(adc_sl.
s() + 3.0).kappa();
77 AINFO <<
"kappa: " << kappa <<
" ego_x : " << vehicle_state.
x() <<
" ego_y: " << vehicle_state.
y()
78 <<
" ref length: " << frame.
reference_line_info().front().reference_line().Length() <<
" s: " << adc_sl.
s();
79 double vehicle_max_curvature = 1 / common::VehicleConfigHelper::Instance()->GetConfig().vehicle_param().min_turn_radius();
83 AINFO <<
"ego in large curvature";
The class of polygon in 2-D.
Implements a class of 2-dimensional vectors.
static const HDMap * BaseMapPtr()
Frame holds all data for one planning cycle.
const LocalView & local_view() const
const std::list< ReferenceLineInfo > & reference_line_info() const
bool IsTransferable(const Scenario *const other_scenario, const Frame &frame) override
Each scenario should define its own transfer condition, i.e., when it should allow to transfer from o...
bool Init(std::shared_ptr< DependencyInjector > injector, const std::string &name) override
virtual bool Init(std::shared_ptr< DependencyInjector > injector, const std::string &name)
std::shared_ptr< DependencyInjector > injector_
const std::string & Name() const
Planning module main class.
ScenarioLargeCurvatureConfig scenario_config
std::shared_ptr< PlanningCommand > planning_command
optional double curvature_ratio