ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
decoupled_lflc_planner.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017-2020 German Aerospace Center (DLR).
3  * Eclipse ADORe, Automated Driving Open Research https://eclipse.org/adore
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License 2.0 which is available at
7  * http://www.eclipse.org/legal/epl-2.0.
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  * Daniel Heß - initial API and implementation
13  ********************************************************************************/
14 
15 #pragma once
16 #include "anominalplanner.h"
18 #include "roadcoordinates.h"
19 #include <adore/view/alane.h>
21 #include <adore/mad/adoremath.h>
25 #include <stdexcept>
26 
27 namespace adore
28 {
29  namespace fun
30  {
40  template<int K,int P>
42  {
43  public:
44  static const int N = 3;//number of states
45  static const int R = 1;//number of inputs
46  // static const int K = 20;//number of optimization time steps
47  // static const int P = 5;//number of post-interpolation steps
51  protected:
52  TInformationSet info_;//reference and constraint defintion
53  private://solvers, constraint/reference definitions, initial state
54  TProgressSolver progress_solver_;//solver for longitudinal planning
55  TOffsetSolver offset_solver_;//solver for lateral planning
56  double s0,ds0,dds0;//longitudinal initial state
57  double n0,dn0,ddn0;//lateral initial state
58  double psi0,omega0;//internal dynamics initial state
59  double t0;//observation time of initial state
60  double T_[K+1];
61  double T_end_;
68  bool valid_;
69  int step_;
70 
72  {
73  //default values for cost function of longitudinal optimization problem
74  progress_solver_.wx()(0) = 2.0;
75  progress_solver_.wx()(1) = 2.0;
76  progress_solver_.wx()(2) = 5.0;
77  progress_solver_.wu()(0) = 1.0;
78  progress_solver_.wx_end()(0) = 0.0;
79  progress_solver_.wx_end()(1) = 0.0;
80  progress_solver_.wx_end()(2) = 0.0;
81  progress_solver_.geps()(0) = 1.0e6;
82  progress_solver_.geps()(1) = 1.0e6;
83  progress_solver_.geps()(2) = 1.0e6;
84  progress_solver_.ubeps()(0) = 0.5;//position slack
85  progress_solver_.ubeps()(1) = 10.0;//velocity slack: should be admissible to violate speed limit by certain amount, if solution is otherwise infeasible
86  progress_solver_.ubeps()(2) = 5.0;//acceleration slack
87  }
88 
90  {
91  //default values for cost function of lateral optimization problem
92  offset_solver_.wx()(0) = 6.0;
93  offset_solver_.wx()(1) = 1.0;
94  offset_solver_.wx()(2) = 1.0;
95  offset_solver_.wu()(0) = 1.0;
96  offset_solver_.wx_end()(0) = 0.0;
97  offset_solver_.wx_end()(1) = 0.0;
98  offset_solver_.wx_end()(2) = 0.0;
99  offset_solver_.geps()(0) = 1.0e1;
100  offset_solver_.geps()(1) = 1.0e1;
101  offset_solver_.geps()(2) = 1.0e1;
102  offset_solver_.ubeps()(0) = 0.05;
103  offset_solver_.ubeps()(1) = 0.05;
104  offset_solver_.ubeps()(2) = 0.0;
105  }
106 
107  void initialize(double Tend)
108  {
109  T_end_ = Tend;
110  double dt_int = Tend/(K*P);
111  adore::mad::linspace(0.0,Tend,T_,K+1);
112  adore::mad::define_integrator_chain<double,N>(progress_solver_.Ad(),progress_solver_.Bd(),Tend/K);
113  adore::mad::define_integrator_chain<double,N>(progress_solver_.Ad_p(),progress_solver_.Bd_p(),dt_int);
114  adore::mad::define_integrator_chain<double,N>(offset_solver_.Ad(),offset_solver_.Bd(),Tend/K);
115  adore::mad::define_integrator_chain<double,N>(offset_solver_.Ad_p(),offset_solver_.Bd_p(),dt_int);
116 
117 
118  //optimization options
119  {
120  qpOASES::Options options;
121  options.setToMPC();
122  options.printLevel = qpOASES::PL_NONE;
123  progress_solver_.getQProblem()->setOptions(options);
124  progress_solver_.setMaxCPUTime(0.01);//default value
126  }
127  {
128  qpOASES::Options options;
129  options.setToMPC();
130  options.printLevel = qpOASES::PL_NONE;
131  offset_solver_.getQProblem()->setOptions(options);
132  offset_solver_.setMaxCPUTime(0.01);//default value
134  }
135  }
136 
141  {
142  progress_solver_.x0()(0) = 0.0;//relative start position
145 
146  double s_estimate = s0;
147  double ds_estimate_i = progress_solver_.x0()(1);
148  double ds_estimate_j = progress_solver_.x0()(1);
149  double ds_reference;
150  double s_reference;
151  double ds_max;
152  double ti,tj;
153 
154  // Forward Pass
155  for(int i=0;i<K;i++)
156  {
157  int j=i+1;
158  ti = T_[i] + t0;
159  tj = T_[j] + t0;
160 
161  double dds_max = (std::min)(aplon_->getComfortAccUB(),info_.getUB(0,2,tj,s_estimate,ds_estimate_i));
162  ds_estimate_i = ds_estimate_j;
163  ds_estimate_j += dds_max * (tj-ti);
164  ds_max = info_.getUB(0,1,tj,s_estimate,ds_estimate_i);
165  ds_estimate_j = (std::min)(ds_estimate_j,ds_max);
166  if( info_.getReferenceIfAvailable(0,1,tj,s_estimate,ds_estimate_j,ds_reference))
167  {
168  ds_estimate_j = (std::min)(ds_estimate_j,ds_reference);
169  }
170  else
171  {
172  ds_reference = ds_estimate_j;
173  }
174 
175 
176  s_estimate += (ds_estimate_j+ds_estimate_i)*0.5 * (tj-ti);
177  if( info_.getReferenceIfAvailable(0,0,tj,s_estimate,ds_estimate_j,s_reference))
178  {
179  s_estimate = (std::min)(s_estimate,s_reference);
180  }
181  else
182  {
183  s_reference = s_estimate;
184  }
185 
186 
187  progress_solver_.lbx()(0,i) = info_.getLB(0,0,tj,s_estimate,ds_estimate_j)-s0;//s lower bound
188  progress_solver_.lbx()(1,i) = info_.getLB(0,1,tj,s_estimate,ds_estimate_j);//ds lower bound
189  progress_solver_.lbx()(2,i) = info_.getLB(0,2,tj,s_estimate,ds_estimate_j);//dds lower bound
190  progress_solver_.lbu_hard()(0,i) = info_.getLB(0,3,tj,s_estimate,ds_estimate_j);//ddds lower bound
191 
192  progress_solver_.ubx()(0,i) = info_.getUB(0,0,tj,s_estimate,ds_estimate_j)-s0;//s upper bound
193  progress_solver_.ubx()(1,i) = info_.getUB(0,1,tj,s_estimate,ds_estimate_j);//ds upper bound
194  progress_solver_.ubx()(2,i) = info_.getUB(0,2,tj,s_estimate,ds_estimate_j);//dds upper bound
195  progress_solver_.ubu_hard()(0,i) = info_.getUB(0,3,tj,s_estimate,ds_estimate_j);//ddds upper bound
196 
198  s_reference-s0,
199  progress_solver_.ubx()(0,i));
201  ds_reference,
202  progress_solver_.ubx()(1,i));
203  }
204 
205 
206  // Backward Pass
207  for( int j=K-1;j>0;j-- )
208  {
209  int i = j-1;
210  //prevent backwards motion in reference:
212  std::min(progress_solver_.y()(0,i), progress_solver_.y()(0,j)),
213  progress_solver_.ubx()(0,i));
214  }
215 
216  }
217 
222  {
223  offset_solver_.x0()(0) = n0;
226  // double ti,tj,tj_rel,s,ds; // ti is unused -Wunused-but-set-variable
227  double tj,tj_rel,s,ds;
228  //std::cout<<"DecoupledLFLCPlanner::prepare_offset_computation():"<<std::endl<<"s: (lb, ref, ub)"<<std::endl;
229  //std::cout<<"x0: ("<<offset_solver_.x0()(0)<<", "<<offset_solver_.x0()(1)<<", "<<offset_solver_.x0()(2)<<")"<<std::endl;
230 
231  for(int i=0;i<K;i++)
232  {
233  int j=i+1;
234  // TODO investigate: the following might be actually a bug
235  // ti = T_[i]+t0; // ti is unused -Wunused-but-set-variable
236  tj = T_[j]+t0;
238  tj-t0,
240  s = progress_solver_.result_fun().fi(tj_rel,0) + s0;
241  ds = progress_solver_.result_fun().fi(tj_rel,1);
242 
243  offset_solver_.lbx()(0,i) = info_.getLB(1,0,tj,s,ds);
244  offset_solver_.lbx()(1,i) = info_.getLB(1,1,tj,s,ds);
245  offset_solver_.lbx()(2,i) = info_.getLB(1,2,tj,s,ds);
246  offset_solver_.lbu_hard()(0,i) = info_.getLB(1,3,tj,s,ds);
247 
248  offset_solver_.ubx()(0,i) = info_.getUB(1,0,tj,s,ds);
249  offset_solver_.ubx()(1,i) = info_.getUB(1,1,tj,s,ds);
250  offset_solver_.ubx()(2,i) = info_.getUB(1,2,tj,s,ds);
251  offset_solver_.ubu_hard()(0,i) = info_.getUB(1,3,tj,s,ds);
252 
253  info_.getReferenceIfAvailable(1,0,tj,s,ds,offset_solver_.y()(0,i));
254  info_.getReferenceIfAvailable(1,1,tj,s,ds,offset_solver_.y()(1,i));
255  info_.getReferenceIfAvailable(1,2,tj,s,ds,offset_solver_.y()(2,i));
256  info_.getReferenceIfAvailable(1,3,tj,s,ds,offset_solver_.uset()(0,i));
257  // std::cout<<s<<": ("<<offset_solver_.lbx()(0,i)<<", "<<offset_solver_.y()(0,i)<<", "<<offset_solver_.ubx()(0,i)<<")";
258  // std::cout<<" ("<<offset_solver_.lbx()(1,i)<<", "<<offset_solver_.y()(1,i)<<", "<<offset_solver_.ubx()(1,i)<<")";
259  // std::cout<<" ("<<offset_solver_.lbx()(2,i)<<", "<<offset_solver_.y()(2,i)<<", "<<offset_solver_.ubx()(2,i)<<")"<<std::endl;
260  }
261  }
262  bool update_guard(double& target,double value)
263  {
264  if(target!=value)
265  {
266  target=value;
267  return true;
268  }
269  return false;
270  }
272  {
273  if(aplon_!=nullptr)
274  {
285  {
287  }
288  }
289  }
291  {
292  if(aplat_!=nullptr)
293  {
304  {
306  }
307  }
308  }
309  public:
313  adore::params::APVehicle* apvehicle,
315  :roadCoordinates_(lfv,apvehicle,aptrajectory),aplon_(aplon),
316  aplat_(aplat),aptraj_(aptrajectory),apvehicle_(apvehicle)
317  {
320  initialize(10.0);
321  valid_=false;
322  }
323  void setPlanningHorizon(double Tend)
324  {
325  initialize(Tend);
326  }
327  double getPlanningHorizon() const
328  {
329  return T_end_;
330  }
332  {
333  return info_;
334  }
336  {
337  return progress_solver_;
338  }
340  {
341  return offset_solver_;
342  }
344  {
345  return roadCoordinates_;
346  }
347 
348  std::string getStatus()
349  {
350  if(valid_)return "";
351  switch(step_)
352  {
353  case 0:
354  return "rc transformation failed";
355  case 1:
356  return "longitudinal planning failed";
357  case 2:
358  return "lateral preparation failed";
359  case 3:
360  return "lateral planning failed";
361  case 4:
362  return "feed forward computation failed";
363  default:
364  return "unknown error";
365  }
366  return "";
367  }
368 
372  virtual void compute(const VehicleMotionState9d& initial_state)override
373  {
374  step_ = 0;
375  valid_ = false;
376  bool log_transformation = false;
377  if(!roadCoordinates_.isValid())return;
379  auto rc = roadCoordinates_.toRoadCoordinates(initial_state,log_transformation);
380  if(!rc.valid)return;
381  step_ = 1;
382  PlanarVehicleState10d x_test;
383  roadCoordinates_.toVehicleState(rc,initial_state.getPSI(), initial_state.getOmega(),x_test,log_transformation);
384  if(log_transformation)
385  {
386  std::cout<<"roadCoordinates:"<<std::endl;
387  std::cout<<"s0="<<rc.s0<<std::endl;
388  std::cout<<"s1="<<rc.s1<<std::endl;
389  std::cout<<"s2="<<rc.s2<<std::endl;
390  std::cout<<"n0="<<rc.n0<<std::endl;
391  std::cout<<"n1="<<rc.n1<<std::endl;
392  std::cout<<"n2="<<rc.n2<<std::endl;
393  std::cout<<"transformation error:"<<std::endl;
394  std::cout<<"eX="<<initial_state.getX()-x_test.getX()<<std::endl;
395  std::cout<<"eY="<<initial_state.getY()-x_test.getY()<<std::endl;
396  std::cout<<"ePSI="<<initial_state.getPSI()-x_test.getPSI()<<std::endl;
397  std::cout<<"evx="<<initial_state.getvx()-x_test.getvx()<<std::endl;
398  std::cout<<"evy="<<initial_state.getvy()-x_test.getvy()<<std::endl;
399  std::cout<<"eOmega="<<initial_state.getOmega()-x_test.getOmega()<<std::endl;
400  std::cout<<"eDelta="<<initial_state.getDelta()-x_test.getDelta()<<std::endl;
401  std::cout<<"eAx="<<initial_state.getAx()-x_test.getAx()<<std::endl;
402  }
403 
404  s0 = rc.s0;ds0 = rc.s1;dds0 = rc.s2;
405  n0 = rc.n0;dn0 = rc.n1;ddn0 = rc.n2;
406  psi0 = initial_state.getPSI();
407  omega0 = initial_state.getOmega();
408  t0 = initial_state.getTime();
409 
410 
411  //update constraints and reference
412  info_.update(initial_state.getTime(),s0,ds0);
413 
414  /*
415  * step 1 - longitudinal planning
416  */
420  progress_solver_.setEndTime(this->T_end_);
422  {
423  /*
424  * step 2 - lateral planning
425  */
426  step_ = 2;
428  try
429  {
431  }
432  catch(const std::exception& e)
433  {
434  std::cerr << e.what() << std::endl;
435  return;
436  }
437  step_ = 3;
438 
439 
441  offset_solver_.setEndTime(this->T_end_);
442 
444  {
445  step_ = 4;
446  /*
447  * step 3 - full state trajectory
448  */
449  //find end of trajectory: first standstill
450  double t_start = progress_solver_.result_fun().limitLo();
451  double t_end = progress_solver_.result_fun().limitHi();
452  double t_end_new = t_start + 0.1;
453  double t_step = 0.01;
454  double v_stop = 0.1;
455  double a_stop = 0.001;
456  while( (progress_solver_.result_fun().f(t_end_new)(1)>v_stop
457  || progress_solver_.result_fun().f(t_end_new)(2)>a_stop)
458  && t_end_new<t_end-t_step )t_end_new+=t_step;
459 
461  aptraj_->getZDIntegrationLength()),t_end_new);
462 
463  //integrate zero dynamics from start to end of trajectory
464  auto integration_time = adore::mad::sequence(0.0,
466  t_end_new);//integration time
469  integration_time,
470  s0,
471  initial_state.getPSI(),
472  initial_state.getOmega());
473  spr_.setPoints.clear();
474  spr_.append(integration_time,trajectory,aptraj_->getSetPointCount());
475  spr_.setStartTime(initial_state.getTime());
476  valid_ = true;
477  step_ = 5;
478  }
479  }
480  }
484  virtual bool hasValidPlan()const override
485  {
486  return valid_;
487  }
491  virtual const SetPointRequest* getSetPointRequest()const override
492  {
493  return &spr_;
494  }
498  virtual double getCPUTime()const override
499  {
500  return 0.0;
501  }
502  };
503  }
504 }
Definition: anominalplanner.h:28
Definition: decoupled_lflc_planner.h:42
adore::params::APLateralPlanner * aplat_
Definition: decoupled_lflc_planner.h:64
TOffsetSolver offset_solver_
Definition: decoupled_lflc_planner.h:55
double t0
Definition: decoupled_lflc_planner.h:59
double s0
Definition: decoupled_lflc_planner.h:56
double getPlanningHorizon() const
Definition: decoupled_lflc_planner.h:327
double psi0
Definition: decoupled_lflc_planner.h:58
adore::params::APVehicle * apvehicle_
Definition: decoupled_lflc_planner.h:66
void prepare_progress_computation()
Definition: decoupled_lflc_planner.h:140
SetPointRequest spr_
Definition: decoupled_lflc_planner.h:67
bool valid_
the result as a set-point request
Definition: decoupled_lflc_planner.h:68
RoadCoordinateConverter roadCoordinates_
end time of plan, defines planning horizon as [0,T_end_]
Definition: decoupled_lflc_planner.h:62
TInformationSet info_
Definition: decoupled_lflc_planner.h:52
void init_offset_default_cost()
Definition: decoupled_lflc_planner.h:89
static const int R
Definition: decoupled_lflc_planner.h:45
double T_[K+1]
Definition: decoupled_lflc_planner.h:60
void update_offset_parameters()
Definition: decoupled_lflc_planner.h:290
void init_progress_default_cost()
Definition: decoupled_lflc_planner.h:71
virtual const SetPointRequest * getSetPointRequest() const override
Definition: decoupled_lflc_planner.h:491
DecoupledLFLCPlanner(adore::view::ALane *lfv, adore::params::APLongitudinalPlanner *aplon, adore::params::APLateralPlanner *aplat, adore::params::APVehicle *apvehicle, adore::params::APTrajectoryGeneration *aptrajectory)
Definition: decoupled_lflc_planner.h:310
TProgressSolver & getProgressSolver()
Definition: decoupled_lflc_planner.h:335
static const int N
Definition: decoupled_lflc_planner.h:44
std::string getStatus()
Definition: decoupled_lflc_planner.h:348
virtual double getCPUTime() const override
Definition: decoupled_lflc_planner.h:498
virtual bool hasValidPlan() const override
Definition: decoupled_lflc_planner.h:484
void update_progress_parameters()
Definition: decoupled_lflc_planner.h:271
adore::mad::LQ_OC_single_shooting< N, R, K, P > TProgressSolver
Definition: decoupled_lflc_planner.h:48
void initialize(double Tend)
Definition: decoupled_lflc_planner.h:107
double dn0
Definition: decoupled_lflc_planner.h:57
TInformationSet & getInformationSet()
Definition: decoupled_lflc_planner.h:331
double ddn0
Definition: decoupled_lflc_planner.h:57
TOffsetSolver & getOffsetSolver()
Definition: decoupled_lflc_planner.h:339
adore::params::APTrajectoryGeneration * aptraj_
Definition: decoupled_lflc_planner.h:65
double dds0
Definition: decoupled_lflc_planner.h:56
adore::mad::LQ_OC_single_shooting< N, R, K, P > TOffsetSolver
Definition: decoupled_lflc_planner.h:49
double ds0
Definition: decoupled_lflc_planner.h:56
NominalPlannerInformationSet< N+1, 2 > TInformationSet
Definition: decoupled_lflc_planner.h:50
TProgressSolver progress_solver_
Definition: decoupled_lflc_planner.h:54
double n0
Definition: decoupled_lflc_planner.h:57
double T_end_
time steps, incl. 0 at 0
Definition: decoupled_lflc_planner.h:61
void setPlanningHorizon(double Tend)
Definition: decoupled_lflc_planner.h:323
double omega0
Definition: decoupled_lflc_planner.h:58
void prepare_offset_computation()
Definition: decoupled_lflc_planner.h:221
int step_
Definition: decoupled_lflc_planner.h:69
adore::params::APLongitudinalPlanner * aplon_
Definition: decoupled_lflc_planner.h:63
bool update_guard(double &target, double value)
Definition: decoupled_lflc_planner.h:262
RoadCoordinateConverter & getRoadCoordinateConverter()
Definition: decoupled_lflc_planner.h:343
virtual void compute(const VehicleMotionState9d &initial_state) override
Definition: decoupled_lflc_planner.h:372
virtual double getLB(int dim, int der, double t, double s, double ds) const override
Definition: anominalplannerinformation.h:190
virtual void update(double t0, double s0, double ds0) override
Definition: anominalplannerinformation.h:209
virtual double getUB(int dim, int der, double t, double s, double ds) const override
Definition: anominalplannerinformation.h:168
virtual bool getReferenceIfAvailable(int dim, int der, double t, double s, double ds, double &ref) const override
Definition: anominalplannerinformation.h:147
Definition: roadcoordinates.h:46
adoreMatrix< double, 0, 0 > toVehicleStateTrajectory(adore::mad::AScalarToN< double, 4 > *lon_trajectory_rc, adore::mad::AScalarToN< double, 4 > *lat_trajectory_rc, const adoreMatrix< double, 1, 0 > &integration_time, double s0, double psi0, double omega0)
Definition: roadcoordinates.h:263
void updateParameters(adore::params::APVehicle *p, adore::params::APTrajectoryGeneration *tp)
Definition: roadcoordinates.h:135
void toVehicleState(const RoadCoordinates &r, double psi, double omega, PlanarVehicleState10d &x, bool log=false)
Definition: roadcoordinates.h:202
RoadCoordinates toRoadCoordinates(const PlanarVehicleState10d &x, bool log=false)
Definition: roadcoordinates.h:156
bool isValid()
Definition: roadcoordinates.h:128
Definition: setpointrequest.h:35
void setStartTime(double new_t0)
Definition: setpointrequest.h:86
void append(const adoreMatrix< double, 1, 0 > &T, const adoreMatrix< double, 0, 0 > &X, int N, int maneuverID=0)
Definition: setpointrequest.h:63
std::vector< SetPoint > setPoints
Definition: setpointrequest.h:38
virtual CT f(DT x) const override
Definition: llinearpiecewisefunction.h:251
virtual T fi(DT x, int row) const override
Definition: llinearpiecewisefunction.h:391
virtual DT limitLo() const override
Definition: llinearpiecewisefunction.h:264
virtual DT limitHi() const override
Definition: llinearpiecewisefunction.h:259
Definition: lq_oc_single_shooting.h:61
bool isSolved() const
Definition: lq_oc_single_shooting.h:635
void setMaxCPUTime(real_t value)
Definition: lq_oc_single_shooting.h:729
t_wx & wx()
Definition: lq_oc_single_shooting.h:706
t_Bd & Bd_p()
Definition: lq_oc_single_shooting.h:703
t_Ad & Ad()
Definition: lq_oc_single_shooting.h:700
qpOASES::QProblem * getQProblem()
Definition: lq_oc_single_shooting.h:728
t_lbx & lbx()
Definition: lq_oc_single_shooting.h:713
t_y & y()
Definition: lq_oc_single_shooting.h:720
void setSystemChanged(bool value)
Definition: lq_oc_single_shooting.h:680
t_ubu_hard & ubu_hard()
Definition: lq_oc_single_shooting.h:716
t_uset & uset()
Definition: lq_oc_single_shooting.h:721
t_Bd & Bd()
Definition: lq_oc_single_shooting.h:701
t_lbu_hard & lbu_hard()
Definition: lq_oc_single_shooting.h:715
void compute()
Definition: lq_oc_single_shooting.h:606
t_ubx & ubx()
Definition: lq_oc_single_shooting.h:714
t_wx_end & wx_end()
Definition: lq_oc_single_shooting.h:708
t_geps & geps()
Definition: lq_oc_single_shooting.h:711
t_Ad & Ad_p()
Definition: lq_oc_single_shooting.h:702
t_ubeps & ubeps()
Definition: lq_oc_single_shooting.h:717
t_resultfun & result_fun()
Definition: lq_oc_single_shooting.h:704
t_x0 & x0()
Definition: lq_oc_single_shooting.h:719
void setEndTime(double Tend)
Definition: lq_oc_single_shooting.h:684
t_wu & wu()
Definition: lq_oc_single_shooting.h:707
bool isFeasible() const
Definition: lq_oc_single_shooting.h:628
abstract class containing parameters related to configuring the lateral planner
Definition: ap_lateral_planner.h:26
virtual double getWeightEndAcc() const =0
getWeightEndAcc returns cost function weight for quadratic acceleration term at end point
virtual double getSlackAcc() const =0
getSlackAcc returns maximum slack of soft-constraints for acceleration
virtual double getSlackVel() const =0
getSlackVel returns maximum slack of soft-constraints for velocity
virtual double getSlackPos() const =0
getSlackPos returns maximum slack of soft-constraints for position
virtual double getWeightAcc() const =0
getWeightAcc returns cost function weight for quadratic acceleration term
virtual double getWeightVel() const =0
getWeightVel returns cost function weight for quadratic velocity error term
virtual double getWeightEndVel() const =0
getWeightEndVel returns cost function weight for quadratic velocity error term at end point
virtual double getWeightPos() const =0
getWeightPos returns cost function weight for quadratic position error term
virtual double getWeightEndPos() const =0
getWeightEndPos returns cost function weight for quadratic position error term at end point
virtual double getWeightJerk() const =0
getWeightJerk returns cost function weight for quadratic jerk term
abstract class containing parameters related to configuring the longitudinal planner
Definition: ap_longitudinal_planner.h:26
virtual double getSlackVel() const =0
getSlackVel returns maximum slack of soft-constraints for velocity
virtual double getComfortAccUB() const =0
getAccUB returns longitudinal acceleration upper bound
virtual double getWeightPos() const =0
getWeightPos returns cost function weight for quadratic position error term
virtual double getWeightEndPos() const =0
getWeightEndPos returns cost function weight for quadratic position error term at end point
virtual double getWeightVel() const =0
getWeightVel returns cost function weight for quadratic velocity error term
virtual double getWeightJerk() const =0
getWeightJerk returns cost function weight for quadratic jerk term
virtual double getSlackPos() const =0
getSlackPos returns maximum slack of soft-constraints for position
virtual double getWeightEndAcc() const =0
getWeightEndAcc returns cost function weight for quadratic acceleration term at end point
virtual double getSlackAcc() const =0
getSlackAcc returns maximum slack of soft-constraints for acceleration
virtual double getWeightEndVel() const =0
getWeightEndVel returns cost function weight for quadratic velocity error term at end point
virtual double getWeightAcc() const =0
getWeightAcc returns cost function weight for quadratic acceleration term
abstract class containing parameters to configure the behaviour of trajectory generation
Definition: ap_trajectory_generation.h:26
virtual double getZDIntegrationStep() const =0
zero dynamics step size
virtual int getSetPointCount() const =0
number of set points in set-point request
virtual double getZDIntegrationLength() const =0
zero dynamics integration length
abstract class for vehicle configuration related paremeters
Definition: ap_vehicle.h:29
Definition: alane.h:28
adoreMatrix< T, 1, 0 > sequence(T x0, T dx, T xend)
Definition: adoremath.h:51
adoreMatrix< T, 1, n > linspace(T x0, T x1)
Definition: adoremath.h:91
T bound(T lb, T value, T ub)
Definition: adoremath.h:569
T min(T a, T b, T c, T d)
Definition: adoremath.h:663
Definition: areaofeffectconverter.h:20
This struct holds the motion state of the vehicle in 9d.
Definition: vehiclemotionstate9d.h:39
double getX() const
Get the x-coordinate.
Definition: vehiclemotionstate9d.h:54
double getvx() const
Get the longitudinal velocity.
Definition: vehiclemotionstate9d.h:78
double getOmega() const
Get the yaw rate.
Definition: vehiclemotionstate9d.h:90
double getY() const
Get the y-coordinate.
Definition: vehiclemotionstate9d.h:60
double getPSI() const
Get the heading.
Definition: vehiclemotionstate9d.h:72
double getAx() const
Get the longitudinal acceleration.
Definition: vehiclemotionstate9d.h:96
double getvy() const
Get the lateral velocity.
Definition: vehiclemotionstate9d.h:84
double getDelta() const
Get the steering angle.
Definition: vehiclemotionstate9d.h:102
double getTime() const
Get the time.
Definition: vehiclemotionstate9d.h:48
Definition: planarvehiclestate10d.h:41
double getvx() const
Definition: planarvehiclestate10d.h:65
double getX() const
Definition: planarvehiclestate10d.h:62
double getDelta() const
Definition: planarvehiclestate10d.h:69
double getPSI() const
Definition: planarvehiclestate10d.h:64
double getvy() const
Definition: planarvehiclestate10d.h:66
double getOmega() const
Definition: planarvehiclestate10d.h:67
double getY() const
Definition: planarvehiclestate10d.h:63
double getAx() const
Definition: planarvehiclestate10d.h:68