43 static const int N = 3;
44 static const int R = 1;
86 double dt_int = Tend/(K*P);
93 qpOASES::Options options;
95 options.printLevel = qpOASES::PL_NONE;
108 s = longitudinal_plan->
fi(0.0,0) + s0_offset;
109 ds = longitudinal_plan->
fi(0.0,1);
111 offset_solver_.
x0()(1) =
adore::mad::bound(
info_.
getLB(1,1,0.0,s,ds),
dn0_,
info_.
getUB(1,1,0.0,s,ds));
112 offset_solver_.
x0()(2) =
adore::mad::bound(
info_.
getLB(1,2,0.0,s,ds),
ddn0_,
info_.
getUB(1,2,0.0,s,ds));
118 ti =
T_[i]+t0_offset;
119 tj =
T_[j]+t0_offset;
120 s = longitudinal_plan->
fi(
T_[j],0) + s0_offset;
121 ds = longitudinal_plan->
fi(
T_[j],1);
214 info_.
update(t0_offset,s0_offset,longitudinal_plan->
fi(0,1));
230 double t_start = longitudinal_plan->
limitLo();
231 double t_end = longitudinal_plan->
limitHi();
232 double t_end_new = t_start + 0.1;
233 double t_step = 0.01;
234 double v_stop = 0.05;
235 double a_stop = 0.001;
236 while( (longitudinal_plan->
f(t_end_new)(1)>v_stop
237 || longitudinal_plan->
f(t_end_new)(2)>a_stop)
238 && t_end_new<t_end-t_step )t_end_new+=t_step;
Definition: lateralplanner.h:41
adore::mad::LLinearPiecewiseFunctionM< double, N+R > TLateralPlan
Definition: lateralplanner.h:50
bool update_guard(double &target, double value)
Definition: lateralplanner.h:142
LateralPlanner(adore::view::ALane *lfv, adore::params::APLateralPlanner *aplat, adore::params::APVehicle *apvehicle, adore::params::APTrajectoryGeneration *aptrajectory)
Definition: lateralplanner.h:171
static const int R
Definition: lateralplanner.h:44
adore::params::APVehicle * apvehicle_
Definition: lateralplanner.h:61
SetPointRequest spr_
Definition: lateralplanner.h:62
void init_offset_default_cost()
Definition: lateralplanner.h:65
TOffsetSolver offset_solver_
Definition: lateralplanner.h:54
double T_end_
time steps, incl. 0 at 0
Definition: lateralplanner.h:57
static const int N
Definition: lateralplanner.h:43
RoadCoordinateConverter roadCoordinates_
end time of plan, defines planning horizon as [0,T_end_]
Definition: lateralplanner.h:58
bool hasValidPlan() const
Definition: lateralplanner.h:273
TLateralPlan & getLateralPlan()
Definition: lateralplanner.h:259
double ddn0_
Definition: lateralplanner.h:55
void prepare_offset_computation(TLongitudinalPlan *longitudinal_plan, double t0_offset, double s0_offset)
Definition: lateralplanner.h:105
adore::params::APTrajectoryGeneration * aptraj_
Definition: lateralplanner.h:60
double n0_
Definition: lateralplanner.h:55
adore::mad::LQ_OC_single_shooting< N, R, K, P > TOffsetSolver
Definition: lateralplanner.h:47
NominalPlannerInformationSet< N+1, 2 > TInformationSet
Definition: lateralplanner.h:48
double dn0_
Definition: lateralplanner.h:55
const SetPointRequest * getSetPointRequest() const
Definition: lateralplanner.h:280
adore::params::APLateralPlanner * aplat_
Definition: lateralplanner.h:59
TInformationSet info_
Definition: lateralplanner.h:52
double getTend() const
Definition: lateralplanner.h:265
void compute(const VehicleMotionState9d &initial_state, TLongitudinalPlan *longitudinal_plan, double t0_offset, double s0_offset)
Definition: lateralplanner.h:202
void initialize(double Tend)
Definition: lateralplanner.h:83
TOffsetSolver & getOffsetSolver()
Definition: lateralplanner.h:190
RoadCoordinateConverter & getRoadCoordinateConverter()
Definition: lateralplanner.h:194
double T_[K+1]
Definition: lateralplanner.h:56
TInformationSet & getInformationSet()
Definition: lateralplanner.h:186
void setPlanningHorizon(double Tend)
Definition: lateralplanner.h:182
double getCPUTime() const
Definition: lateralplanner.h:287
void update_offset_parameters()
Definition: lateralplanner.h:151
bool valid_
the result as a set-point request
Definition: lateralplanner.h:63
adore::mad::LLinearPiecewiseFunctionM< double, N+R > TLongitudinalPlan
Definition: lateralplanner.h:49
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
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 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
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 getOmega() const
Get the yaw rate.
Definition: vehiclemotionstate9d.h:90
double getPSI() const
Get the heading.
Definition: vehiclemotionstate9d.h:72