Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
apollo::planning::PiecewiseJerkSpeedProblem Class Reference

#include <piecewise_jerk_speed_problem.h>

Inheritance diagram for apollo::planning::PiecewiseJerkSpeedProblem:
Inheritance graph
Collaboration diagram for apollo::planning::PiecewiseJerkSpeedProblem:
Collaboration graph

Public Member Functions

 PiecewiseJerkSpeedProblem (const size_t num_of_knots, const double delta_s, const std::array< double, 3 > &x_init)
 
virtual ~PiecewiseJerkSpeedProblem ()=default
 
void set_dx_ref (const double weight_dx_ref, const double dx_ref)
 
void set_penalty_dx (std::vector< double > penalty_dx)
 
- Public Member Functions inherited from apollo::planning::PiecewiseJerkProblem
 PiecewiseJerkProblem (const size_t num_of_knots, const double delta_s, const std::array< double, 3 > &x_init)
 
virtual ~PiecewiseJerkProblem ()=default
 
void set_x_bounds (std::vector< std::pair< double, double >> x_bounds)
 
void set_x_bounds (const double x_lower_bound, const double x_upper_bound)
 
void set_dx_bounds (std::vector< std::pair< double, double >> dx_bounds)
 
void set_dx_bounds (const double dx_lower_bound, const double dx_upper_bound)
 
void set_ddx_bounds (std::vector< std::pair< double, double >> ddx_bounds)
 
void set_ddx_bounds (const double ddx_lower_bound, const double ddx_upper_bound)
 
void set_dddx_bound (const double dddx_bound)
 
void set_dddx_bound (const double dddx_lower_bound, const double dddx_upper_bound)
 
void set_weight_x (const double weight_x)
 
void set_weight_dx (const double weight_dx)
 
void set_weight_ddx (const double weight_ddx)
 
void set_weight_dddx (const double weight_dddx)
 
void set_scale_factor (const std::array< double, 3 > &scale_factor)
 
void set_x_ref (const double weight_x_ref, std::vector< double > x_ref)
 Set the x ref object and the uniform x_ref weighting. More...
 
void set_x_ref (std::vector< double > weight_x_ref_vec, std::vector< double > x_ref)
 Set the x ref object and piecewised x_ref weightings. More...
 
void set_end_state_ref (const std::array< double, 3 > &weight_end_state, const std::array< double, 3 > &end_state_ref)
 
virtual bool Optimize (const int max_iter=4000)
 
const std::vector< double > & opt_x () const
 
const std::vector< double > & opt_dx () const
 
const std::vector< double > & opt_ddx () const
 

Protected Member Functions

void CalculateKernel (std::vector< c_float > *P_data, std::vector< c_int > *P_indices, std::vector< c_int > *P_indptr) override
 
void CalculateOffset (std::vector< c_float > *q) override
 
OSQPSettings * SolverDefaultSettings () override
 
- Protected Member Functions inherited from apollo::planning::PiecewiseJerkProblem
virtual void CalculateAffineConstraint (std::vector< c_float > *A_data, std::vector< c_int > *A_indices, std::vector< c_int > *A_indptr, std::vector< c_float > *lower_bounds, std::vector< c_float > *upper_bounds)
 
OSQPData * FormulateProblem ()
 
void FreeData (OSQPData *data)
 
template<typename T >
T * CopyData (const std::vector< T > &vec)
 

Protected Attributes

bool has_dx_ref_ = false
 
double weight_dx_ref_ = 0.0
 
double dx_ref_ = 0.0
 
std::vector< double > penalty_dx_
 
- Protected Attributes inherited from apollo::planning::PiecewiseJerkProblem
size_t num_of_knots_ = 0
 
std::vector< double > x_
 
std::vector< double > dx_
 
std::vector< double > ddx_
 
std::array< double, 3 > x_init_
 
std::array< double, 3 > scale_factor_ = {{1.0, 1.0, 1.0}}
 
std::vector< std::pair< double, double > > x_bounds_
 
std::vector< std::pair< double, double > > dx_bounds_
 
std::vector< std::pair< double, double > > ddx_bounds_
 
std::pair< double, double > dddx_bound_
 
double weight_x_ = 0.0
 
double weight_dx_ = 0.0
 
double weight_ddx_ = 0.0
 
double weight_dddx_ = 0.0
 
double delta_s_ = 1.0
 
bool has_x_ref_ = false
 
double weight_x_ref_ = 0.0
 
std::vector< double > x_ref_
 
std::vector< double > weight_x_ref_vec_
 
bool has_end_state_ref_ = false
 
std::array< double, 3 > weight_end_state_ = {{0.0, 0.0, 0.0}}
 
std::array< double, 3 > end_state_ref_
 

Constructor & Destructor Documentation

◆ PiecewiseJerkSpeedProblem()

apollo::planning::PiecewiseJerkSpeedProblem::PiecewiseJerkSpeedProblem ( const size_t  num_of_knots,
const double  delta_s,
const std::array< double, 3 > &  x_init 
)

◆ ~PiecewiseJerkSpeedProblem()

virtual apollo::planning::PiecewiseJerkSpeedProblem::~PiecewiseJerkSpeedProblem ( )
virtualdefault

Member Function Documentation

◆ CalculateKernel()

void apollo::planning::PiecewiseJerkSpeedProblem::CalculateKernel ( std::vector< c_float > *  P_data,
std::vector< c_int > *  P_indices,
std::vector< c_int > *  P_indptr 
)
overrideprotectedvirtual

◆ CalculateOffset()

void apollo::planning::PiecewiseJerkSpeedProblem::CalculateOffset ( std::vector< c_float > *  q)
overrideprotectedvirtual

◆ set_dx_ref()

void apollo::planning::PiecewiseJerkSpeedProblem::set_dx_ref ( const double  weight_dx_ref,
const double  dx_ref 
)

◆ set_penalty_dx()

void apollo::planning::PiecewiseJerkSpeedProblem::set_penalty_dx ( std::vector< double >  penalty_dx)

◆ SolverDefaultSettings()

OSQPSettings* apollo::planning::PiecewiseJerkSpeedProblem::SolverDefaultSettings ( )
overrideprotectedvirtual

Member Data Documentation

◆ dx_ref_

double apollo::planning::PiecewiseJerkSpeedProblem::dx_ref_ = 0.0
protected

◆ has_dx_ref_

bool apollo::planning::PiecewiseJerkSpeedProblem::has_dx_ref_ = false
protected

◆ penalty_dx_

std::vector<double> apollo::planning::PiecewiseJerkSpeedProblem::penalty_dx_
protected

◆ weight_dx_ref_

double apollo::planning::PiecewiseJerkSpeedProblem::weight_dx_ref_ = 0.0
protected

The documentation for this class was generated from the following file: