34 static const int N = 3;
35 static const int R = 1;
86 return -std::sqrt(0.5*a0*a0-v0*jmin);
91 t3 = std::sqrt(a0/jmin-2.0*v0/jmin)-a0/jmin;
105 const double dv1 = 0.5 * t1 * (amin-a0) + t1 * a0;
106 const double dv3 = 0.5 * t3 * amin;
107 t2 = -(v0+dv1+dv3)/amin;
113 if(-(a0/jmin)*(0.5*a0)>=v0)
return 0;
151 return a1-jmin*(t-t1-t2);
183 double s0_offset = s0;
184 double t0_offset = initial_state.
getTime();
188 double s = s0-s0_offset;
209 s =
std::max(s,s+dt*ds+0.5*dt*dt*dds+1.0/6.0*dt*dt*dt*jset);
210 ds =
std::max(0.0,ds+dds*dt+0.5*dt*dt*jset);
211 dds = dds + dt * jset;
216 s =
std::max(s,s+dt*ds+0.5*dt*dt*dds+1.0/6.0*dt*dt*dt*jset);
217 ds =
std::max(0.0,ds+dds*dt+0.5*dt*dt*jset);
Definition: anominalplanner.h:28
TInformationSet & getInformationSet()
Definition: informationsetpostprocessing.h:38
bool isLongitudinalPlanValid(double t0_offset, double s0_offset, adore::mad::LLinearPiecewiseFunctionM< double, K > *longitudinal_plan)
Definition: informationsetpostprocessing.h:50
Definition: lateralplanner.h:41
Definition: mrmplanner.h:32
double amin_
Definition: mrmplanner.h:48
void t_medium_brake_trapezoidal(double v0, double a0, double jmin, double &t1, double &t3) const
times required for ramp down and ramp up during medium brake
Definition: mrmplanner.h:94
virtual const SetPointRequest * getSetPointRequest() const
Definition: mrmplanner.h:273
LateralPlanner< K, P > lateralPlanner_
Definition: mrmplanner.h:39
static const int R
Definition: mrmplanner.h:35
double a_brake_trapezoidal(double t, double a0, double a1, double jmin, double t1, double t2, double t3)
Definition: mrmplanner.h:139
RoadCoordinateConverter roadCoordinates_
Definition: mrmplanner.h:42
void brake_params_trapezoidal(double v0, double a0, double amin, double jmin, double &a1, double &t1, double &t2, double &t3)
general parameters
Definition: mrmplanner.h:118
adore::params::APTrajectoryGeneration * aptraj_
Definition: mrmplanner.h:43
adore::params::APVehicle * apvehicle_
Definition: mrmplanner.h:44
void setAMin(double value)
Definition: mrmplanner.h:55
MRMPlanner(adore::view::ALane *lfv, adore::params::APLateralPlanner *aplat, adore::params::APVehicle *apvehicle, adore::params::APTrajectoryGeneration *aptrajectory)
Definition: mrmplanner.h:59
void t_long_brake_trapezoidal(double v0, double a0, double amin, double jmin, double &t1, double &t2, double &t3) const
times required for ramp down, constant and ramp up during long brake
Definition: mrmplanner.h:101
TPostProcessConstraints::TInformationSet & getInformationSet()
Definition: mrmplanner.h:78
bool longitudinal_plan_valid_
Definition: mrmplanner.h:50
double jmax_
Definition: mrmplanner.h:45
void setTStall(double value)
Definition: mrmplanner.h:53
InformationSetPostProcessing< 4, 2 > TPostProcessConstraints
Definition: mrmplanner.h:37
adore::mad::LLinearPiecewiseFunctionM< double, N+R > TPartialPlan
Definition: mrmplanner.h:36
void t_short_brake_trapezoidal(double v0, double a0, double jmin, double t3)
times required for ramp up during short brake
Definition: mrmplanner.h:89
static const int N
Definition: mrmplanner.h:34
virtual double getCPUTime() const
Definition: mrmplanner.h:280
double tstall_
Definition: mrmplanner.h:46
TPostProcessConstraints postproc_
Definition: mrmplanner.h:41
double j_brake_trapezoidal(double t, double jmin, double t1, double t2, double t3)
Definition: mrmplanner.h:155
virtual void compute(const VehicleMotionState9d &initial_state)
Definition: mrmplanner.h:175
void setJMax(double value)
Definition: mrmplanner.h:52
LateralPlanner< K, P > & getOffsetSolver()
Definition: mrmplanner.h:259
double amin_medium_brake_trapezoidal(double v0, double a0, double jmin) const
minimum acceleration that can be achieved before inverting jerk to end with v=0 and a=0
Definition: mrmplanner.h:84
TPartialPlan & getLateralPlan()
Definition: mrmplanner.h:252
TPartialPlan longitudinal_plan_
Definition: mrmplanner.h:40
bool second_attempt_
Definition: mrmplanner.h:49
int brake_case_trapezoidal(double v0, double a0, double amin, double jmin) const
Definition: mrmplanner.h:110
void setAStall(double value)
Definition: mrmplanner.h:54
void setSecondAttempt(bool value)
Definition: mrmplanner.h:56
virtual bool hasValidPlan() const
Definition: mrmplanner.h:266
TPartialPlan & getLongitudinalPlan()
Definition: mrmplanner.h:248
double astall_
Definition: mrmplanner.h:47
Definition: roadcoordinates.h:46
RoadCoordinates toRoadCoordinates(const PlanarVehicleState10d &x, bool log=false)
Definition: roadcoordinates.h:156
bool isValid()
Definition: roadcoordinates.h:128
Definition: setpointrequest.h:35
adoreMatrix< T, n+1, 0 > & getData()
Definition: llinearpiecewisefunction.h:147
abstract class containing parameters related to configuring the lateral planner
Definition: ap_lateral_planner.h:26
abstract class containing parameters to configure the behaviour of trajectory generation
Definition: ap_trajectory_generation.h:26
abstract class for vehicle configuration related paremeters
Definition: ap_vehicle.h:29
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
adoreMatrix< T, N, M > max(adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
Definition: adoremath.h:686
Definition: areaofeffectconverter.h:20
This struct holds the motion state of the vehicle in 9d.
Definition: vehiclemotionstate9d.h:39
double getTime() const
Get the time.
Definition: vehiclemotionstate9d.h:48
double s0
Definition: roadcoordinates.h:37