SAMPLING_TIME = 0.02 HORIZON = 20 COST_Q = np.diag([1, 1]) COST_P = np.diag([0, 0]) COST_R = np.diag([5 / 1000, 1]) if not TRACK_CONS: SUFFIX = 'NOCONS-' else: SUFFIX = '' ##################################################################### # load vehicle parameters params = ORCA(control='pwm') model = Dynamic(**params) ##################################################################### # load track TRACK_NAME = 'ETHZ' track = ETHZ(reference='optimal', longer=True) SIM_TIME = 8.5 ##################################################################### # load GP models with open('../gp/orca/vxgp.pickle', 'rb') as f: (vxmodel, vxxscaler, vxyscaler) = pickle.load(f) vxgp = loadGPModel('vx', vxmodel, vxxscaler, vxyscaler)
PLOT_RESULTS = False # whether to plot results SAVE_RESULTS = True # whether to save results N_WAYPOINTS = 100 # resampled waypoints SCALE = 0.95 # shrinking factor for track width # define indices for the nodes NODES = [ 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185 ] ##################################################################### # track specific data params = ORCA() track = ETHZ() track_width = track.track_width * SCALE theta = track.theta_track[NODES] N_DIMS = len(NODES) n_waypoints = N_DIMS rand_traj = randomTrajectory(track=track, n_waypoints=n_waypoints) bounds = torch.tensor( [[-track_width / 2] * N_DIMS, [track_width / 2] * N_DIMS], device=device, dtype=dtype)