148 std::vector<adore::fun::PlanningResult> available_results;
161 bool suppress_lanechanges =
false;
167 if (suppress_lanechanges)
182 suppress_lanechanges =
true;
185 bool force_lanechange_left =
false;
189 if (force_lanechange_left)
196 force_lanechange_left =
true;
199 bool force_lanechange_right =
false;
203 if (force_lanechange_right)
211 force_lanechange_right =
true;
214 bool force_slow_maneuvers =
false;
218 if (force_slow_maneuvers)
226 force_slow_maneuvers =
true;
259 if(result.
name.find(
"lcr") != std::string::npos)
263 else if(result.
name.find(
"lcl") != std::string::npos)
268 if(suppress_lanechanges && (isLCL || isLCR))
276 if(force_lanechange_left && result.
name.find(
"lcl") == std::string::npos)
282 if(force_lanechange_right && result.
name.find(
"lcr") == std::string::npos)
289 available_results.push_back(result);
290 if(valid)valid_results.insert({result.
id,result});
297 if(valid_results.size()>0 && best_id>=0)
321 std::cout<<std::endl<<
"--------------------------------------------------------------------------------"<<std::endl;
322 if(valid_results.size()==0)std::cout <<
"No valid plans\n";
324 std::sort(std::begin(available_results),
325 std::end(available_results),
326 [](
auto& a,
auto& b) {
return a.id < b.id; });
327 for(
auto& result:available_results)
330 std::cout<<result.name<<
" ("<<result.nominal_maneuver_valid<<
","<<result.combined_maneuver_valid<<
") ";
332 std::cout<<
"c_ttc_nom="<<result.getObjectiveValue(
"TTC_nom",0.0)<<
" ";
333 std::cout<<result.status_string<<std::endl;
340 if(!x0_available)
return;
Decision making and maneuver planning.
Definition: tactical_planner.h:48
adore::fun::AFactory::TPlanningRequestWriter * request_writer_
Definition: tactical_planner.h:53
adore::params::APTacticalPlanner * pTacticalPlanner_
Definition: tactical_planner.h:51
adore::fun::AFactory::TForceSlowManeuversReader * force_slow_maneuvers_reader_
Definition: tactical_planner.h:79
uint64_t iteration_
Definition: tactical_planner.h:61
double force_slow_maneuver_timeout_
Definition: tactical_planner.h:72
virtual ~TacticalPlanner()
Definition: tactical_planner.h:114
double iteration_time_length_
Definition: tactical_planner.h:64
adore::fun::AFactory::TMotionStateReader * vehicle_state_reader_
Definition: tactical_planner.h:52
adore::fun::EvaluatorWeightedSum * getEvaluator()
Definition: tactical_planner.h:82
adore::fun::AFactory::TForceLanechangeLeftReader * force_langechange_left_reader_
Definition: tactical_planner.h:77
double lanechange_supression_timeout_
Definition: tactical_planner.h:69
double last_time_
Definition: tactical_planner.h:65
adore::env::AFactory::TPropositionWriter * proposition_writer_
Definition: tactical_planner.h:56
double force_langechange_left_timeout_
Definition: tactical_planner.h:70
adore::fun::SetPointRequestDispatcher spr_dispatcher_
Definition: tactical_planner.h:57
double force_langechange_right_timeout_
Definition: tactical_planner.h:71
std::string cost_bound_name_
Definition: tactical_planner.h:73
adore::params::APNavigation * pNavigation_
Definition: tactical_planner.h:49
void run()
retrieve planning results, dispatch and formulate new planning request
Definition: tactical_planner.h:127
adore::fun::AFactory::TForceLanechangeRightReader * force_langechange_right_reader_
Definition: tactical_planner.h:78
adore::fun::AFactory::TPlanningResultWriter * select_writer_
Definition: tactical_planner.h:55
adore::fun::AFactory::TLanechangeSuppressionReader * langechange_suppression_reader_
Definition: tactical_planner.h:76
adore::fun::PlanningResult best_planning_result_
Definition: tactical_planner.h:63
adore::params::APTrajectoryGeneration * pTrajectoryGeneration_
Definition: tactical_planner.h:50
adore::fun::IndicatorDispatcher indicator_dispatcher_
Definition: tactical_planner.h:58
double cost_bound_guard_
Definition: tactical_planner.h:67
adore::fun::EvaluatorWeightedSum evaluator_
Definition: tactical_planner.h:62
fun::TurnSignalObserver turn_signal_observer_
Definition: tactical_planner.h:74
double cost_bound_
Definition: tactical_planner.h:66
adore::env::AFactory::TNavigationGoalReader * navigation_goal_reader_
Definition: tactical_planner.h:59
TacticalPlanner(double iteration_time_length)
constructur
Definition: tactical_planner.h:88
fun::UserInputObserver user_input_observer_
Definition: tactical_planner.h:75
adore::fun::AFactory::TPlanningResultFeed * result_reader_
Definition: tactical_planner.h:54
adore::env::AFactory::TResetLaneMatchingWriter * lane_view_reset_writer_
Definition: tactical_planner.h:60
virtual TPropositionWriter * getPropositionWriter()=0
virtual TNavigationGoalReader * getNavigationGoalReader()=0
virtual TVehicleMotionStateReader * getVehicleMotionStateReader()=0
virtual TResetLaneMatchingWriter * getResetLaneMatchingWriter()=0
static adore::env::AFactory * get()
Definition: afactory.h:236
Definition: evaluator_weighted_sum.h:31
int evaluateToBest(const PlanningResultMap &planning_results) override
Definition: evaluator_weighted_sum.h:83
double getCost(int id)
Definition: evaluator_weighted_sum.h:63
static adore::fun::AFactory * get()
Definition: afactory.h:170
Dispatches indicator command for maneuver, which is currently executed.
Definition: indicator_dispatcher.h:25
void setIndicators(const PlanningResult &selected_maneuver)
Definition: indicator_dispatcher.h:40
class helps to dispatch SetPointRequest to controller SetPointRequestDispatcher handles selection of ...
Definition: setpointrequest_dispatcher.h:29
std::string getStatus()
Definition: setpointrequest_dispatcher.h:218
bool getInitialState(VehicleMotionState9d &result)
compute and return initial state for next planning iteration The according initial state in odometry ...
Definition: setpointrequest_dispatcher.h:191
void dispatch(SetPointRequest &combined_trajectory, SetPointRequest &nominal_trajectory)
dispatch SetPointRequests computed in localization coordinates The combined trajectory will be conver...
Definition: setpointrequest_dispatcher.h:208
PlanarVehicleState10d x0ref
Definition: setpoint.h:32
double tStart
Definition: setpoint.h:34
double tEnd
Definition: setpoint.h:35
Definition: turn_signal_observer.h:22
bool rightIndicatorTurnedOnManuallyWithinLastSecond(double current_time, double max_delay=1.0)
Definition: turn_signal_observer.h:106
void update(double t)
Definition: turn_signal_observer.h:63
bool leftIndicatorTurnedOnManuallyWithinLastSecond(double current_time, double max_delay=1.0)
Definition: turn_signal_observer.h:110
Definition: com_patterns.h:29
virtual void getNext(T &value)=0
virtual bool hasNext() const =0
Definition: com_patterns.h:68
virtual void getData(T &value)=0
virtual bool hasData() const =0
virtual bool hasUpdate() const =0
Definition: com_patterns.h:97
virtual void write(const T &value)=0
virtual APTacticalPlanner * getTacticalPlanner() const =0
virtual APTrajectoryGeneration * getTrajectoryGeneration() const =0
virtual APNavigation * getNavigation() const =0
abstract class containing parameters which configure navigation behaviour
Definition: ap_navigation.h:25
virtual double getLaneChangePenalty() const =0
abstract classs containing parameters to configure aspects and constraints of the tactical planner
Definition: ap_tactical_planner.h:25
virtual double getLVResetVelocity() const =0
virtual bool getEnforceMonotonousNavigationCost() const =0
virtual double getTimeoutForLangechangeSuppression() const =0
virtual double getTimeoutForPreferredLCAfterManuallySetIndicator() const =0
abstract class containing parameters to configure the behaviour of trajectory generation
Definition: ap_trajectory_generation.h:26
virtual double getEmergencyManeuverDelay() const =0
time after which emergency maneuver kicks in
static adore::params::AFactory * get()
Definition: afactory.h:103
@ right
Definition: indicator_hint.h:36
@ left
Definition: indicator_hint.h:35
Turnstate
Definition: turnstate.h:21
@ off
Definition: turnstate.h:22
std::unordered_map< int, adore::fun::PlanningResult > PlanningResultMap
Definition: atrajectory_evaluator.h:29
x0
Definition: adore_set_goal.py:25
x
Definition: adore_set_goal.py:30
Definition: areaofeffectconverter.h:20
A logical proposition, with a possible timeout for the information.
Definition: proposition.h:27
This struct holds the motion state of the vehicle in 9d.
Definition: vehiclemotionstate9d.h:39
Definition: navigationgoal.h:26
Definition: planarvehiclestate10d.h:41
double getvx() const
Definition: planarvehiclestate10d.h:65
void setDDelta(double value)
Definition: planarvehiclestate10d.h:82
void setDAx(double value)
Definition: planarvehiclestate10d.h:81
double getAx() const
Definition: planarvehiclestate10d.h:68
void setAx(double value)
Definition: planarvehiclestate10d.h:79
Definition: planning_request.h:22
double t_planning_start
Definition: planning_request.h:24
double t_emergency_start
Definition: planning_request.h:26
double t_planning_end
Definition: planning_request.h:25
SetPoint initial_state
Definition: planning_request.h:27
long long int iteration
Definition: planning_request.h:23
Definition: planning_result.h:29
bool combined_maneuver_valid
Definition: planning_result.h:64
std::string name
Definition: planning_result.h:32
double getObjectiveValue(std::string name, double bound)
Definition: planning_result.h:89
std::string status_string
Definition: planning_result.h:65
int id
Definition: planning_result.h:30
int iteration
Definition: planning_result.h:31
SetPointRequest nominal_maneuver
Definition: planning_result.h:33
SetPointRequest combined_maneuver
Definition: planning_result.h:35