Skip to content

Zero-order GP-MPC

The zero_order_gpmpc module implements a number of controllers, which can be defined by modifying the controller.yaml configuration file that is used to run the experiment, see this example config for a template.

controller.yaml configuration

The following configuration values are used to configure different controllers:

  • load_gp (true, false): Determines whether the GP model is loaded. Set to false for a nominal MPC controller.
  • cautious_gp (true, false): Determines whether GP covariances are updated in between SQP iterations (false) or only in between MPC sampling times (true). Note that both options are equivalent if num_rti_iter: 1 is selected.
  • load_data (true, false): Determines whether recorded data (inputs/outputs located at data/x_data.csv/data/y_data.csv, respectively) is used to train the GP. If set to false, the GP prior uncertainty is used to tighten the constraints.
  • inducing_gp (true, false): Determines whether an inducing-point GP approximation is used.
  • data_processing_mode (none, record, learn): Determines if a DataProcessingStrategy is applied to record data (record) or to update the GP model with incoming measurements (learn).
  • num_rti_iter (1, j): Determines the number j of SQP iterations run each time get_input is called.

The next table shows a few examples which controllers canbe implemented (with cautious_gp: false, inducing_gp: false, data_processing_mode: none):

Name Description load_gp load_data num_rti_iter
Nominal MPC Nominal MPC controller without uncertainties, using SQP-RTI false false 1
"Unconditioned" Zero-Order GP-MPC Zero-Order GP-MPC using the GP prior uncertainty for constraint tightening (no data), using SQP-RTI true false 1
Zero-Order GP-MPC Zero-Order GP-MPC using the GP conditioned on previously gathered training data located at data/x_data.csv/data/y_data.csv, using SQP-RTI true true 1
Zero-Order GP-MPC (converged) Zero-Order GP-MPC using the GP conditioned on previously gathered training data located at data/x_data.csv/data/y_data.csv, running max. 30 SQP iterations (if tolerance tol set in solver.yaml is not reached earlier) true true 30

solver.yaml configuration

See the comments in the solver.yaml file for defining important values for the controller.

Running pre-configured controllers

Name Description CRS_EXPERIMENT_NAME CRS_CLOCK_RATE
no_mm Nominal MPC with exact model gpmpc_experiments/SIM_00_pacejka_mpc_zogpmpc_no_mm 1.0
no_mm_conv Nominal MPC with exact model (converged) gpmpc_experiments/SIM_00_pacejka_mpc_zogpmpc_no_mm_converged 0.03
no_gp Nominal MPC with nominal (inexact) model gpmpc_experiments/SIM_01_pacejka_mpc_zogpmpc_no_gp 1.0
no_gp_conv Nominal MPC with nominal (inexact) model (converged) gpmpc_experiments/SIM_01_pacejka_mpc_zogpmpc_no_gp_converged 0.03
ours_uncond "Unconditioned" zero-order GP-MPC with no data gpmpc_experiments/SIM_02_pacejka_mpc_zogpmpc_uncond 1.0
ours_uncond_conv "Unconditioned" zero-order GP-MPC with no data (converged) gpmpc_experiments/SIM_02_pacejka_mpc_zogpmpc_uncond_converged 0.03
ours Zero-order GP-MPC with offline training data gpmpc_experiments/SIM_03_pacejka_mpc_zogpmpc_ours 1.0
ours_online Zero-order GP-MPC with online training data gpmpc_experiments/SIM_03_pacejka_mpc_zogpmpc_ours_online 1.0
zoro_converged Zero-order GP-MPC with offline training data (converged) gpmpc_experiments/SIM_04_pacejka_mpc_zogpmpc_zoro_converged 0.03

Execute the following command to run the controllers, with CRS_EXPERIMENT_NAME and CRS_CLOCK_RATE set accordingly:

roslaunch crs_launch sim_single_car.launch control_package:=rospy_controllers experiment_name:=$CRS_EXPERIMENT_NAME bypass_estimator:=true enable_sim_time:=true clock_rate:=$CRS_CLOCK_RATE