30#include "modules/common_msgs/config_msgs/vehicle_config.pb.h"
31#include "modules/control/controllers/mpc_controller/proto/mpc_controller.pb.h"
105 std::string
Name()
const override;
115 const double linear_v,
const double angular_v,
116 const double linear_a,
124 const double preview_time,
const double ts,
The DigitalFilter class is used to pass signals with a frequency lower than a certain cutoff frequenc...
The MeanFilter class is used to smoothen a series of noisy numbers, such as sensor data or the output...
A general class to denote the return status of an API call.
A lead/lag controller for speed and steering using defualt integral hold
MPCController, combined lateral and longitudinal controllers
PIDController acceleration_lookup_pid_controller_
TrajectoryAnalyzer trajectory_analyzer_
void FeedforwardUpdate(SimpleMPCDebug *debug)
common::Status ComputeControlCommand(const localization::LocalizationEstimate *localization, const canbus::Chassis *chassis, const planning::ADCTrajectory *trajectory, ControlCommand *cmd) override
compute steering target and throttle/ brake based on current vehicle status and target trajectory
Eigen::MatrixXd matrix_state_
void LoadMPCGainScheduler()
Eigen::MatrixXd matrix_bd_
double max_acceleration_when_stopped_
void GetPathRemain(const planning::ADCTrajectory *planning_published_trajectory, SimpleMPCDebug *debug)
double lookback_station_high_speed_
double max_abs_speed_when_stopped_
MPCController()
constructor
Eigen::MatrixXd matrix_b_
void ProcessLogs(const SimpleMPCDebug *debug, const canbus::Chassis *chassis)
double standstill_acceleration_
void ComputeLateralErrors(const double x, const double y, const double theta, const double linear_v, const double angular_v, const double linear_a, const TrajectoryAnalyzer &trajectory_analyzer, SimpleMPCDebug *debug)
void UpdateMatrix(SimpleMPCDebug *debug)
bool enable_look_ahead_back_control_
MPCControllerConf control_conf_
std::unique_ptr< Interpolation1D > heading_err_interpolation_
double previous_ref_heading_acceleration_
double previous_heading_error_
Eigen::MatrixXd matrix_q_
LeadlagController leadlag_controller_
common::MeanFilter lateral_error_filter_
void InitControlCalibrationTable()
double previous_heading_acceleration_
std::unique_ptr< Interpolation1D > feedforwardterm_interpolation_
double lookback_station_low_speed_
Eigen::MatrixXd matrix_ad_
double previous_acceleration_vrf_
double lateral_error_feedback
std::unique_ptr< Interpolation2D > control_interpolation_
Eigen::MatrixXd matrix_r_updated_
void Stop() override
stop MPC controller
std::unique_ptr< Interpolation1D > lat_err_interpolation_
double previous_lateral_error_
double previous_lateral_acceleration_
common::DigitalFilter digital_filter_pitch_angle_
Eigen::MatrixXd matrix_cd_
bool enable_mpc_feedforward_compensation_
std::ofstream mpc_log_file_
double minimum_speed_protection_
double previous_heading_rate_
const int basic_state_size_
std::unique_ptr< Interpolation1D > steer_weight_interpolation_
double previous_acceleration_
double lookahead_station_high_speed_
calibration_table calibration_table_
double lookahead_station_low_speed_
bool use_pitch_angle_filter_
double Wheel2SteerPct(const double wheel_angle)
Eigen::MatrixXd matrix_r_
double steer_angle_feedforwardterm_updated_
double wheel_single_direction_max_degree_
bool use_lqr_curvature_feedforward_
common::VehicleParam vehicle_param_
Eigen::MatrixXd matrix_k_
common::MeanFilter heading_error_filter_
common::Status Reset() override
reset MPC Controller
double heading_error_feedback
double throttle_lowerbound_
Eigen::MatrixXd matrix_a_
double previous_acceleration_reference_
std::shared_ptr< DependencyInjector > injector_
std::string Name() const override
MPC controller name
double previous_ref_heading_rate_
double steer_single_direction_max_degree_
virtual ~MPCController()
destructor
double steer_angle_feedforwardterm_
Eigen::MatrixXd matrix_c_
common::Status Init(std::shared_ptr< DependencyInjector > injector) override
initialize MPC Controller
common::DigitalFilter digital_filter_
Eigen::MatrixXd matrix_q_updated_
Eigen::MatrixXd matrix_a_coeff_
double unconstrained_control_diff_limit_
void UpdateState(SimpleMPCDebug *debug)
void ComputeLongitudinalErrors(const TrajectoryAnalyzer *trajectory, SimpleMPCDebug *debug)
A proportional-integral-derivative controller for speed and steering using defualt integral hold
process point query and conversion related to trajectory
Defines the Controller base class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
Defines the DigitalFilter class.
Functions to generate coefficients for digital filter.
Defines the MeanFilter class.
Defines the PIDBCController class.
Defines the TrajectoryAnalyzer class.