Open MPC_MAIN_navigation.py and run.
- Set save_simulation=True if you want to save simulation
- set feasible start point and goal point (default (10,2) and (20,47))
- Horizon length (default=6) [Describe a little more]
- desired_speed (default=5)
- cost function weights W1, W2, W3
- default: W1 = np.array([0.01, 0.01]) # input weightage
- W2 = np.array([5.0, 5.0, 0.5, 5]) # state error weightage
- W3 = np.array([0.01, 1.0]) # rate of input change weightage
- To add more obstacles in path use lines 486 to 493 as an example and repeat the procedure.
Run mpc_test.py set run_code=1
- Set save_simulation=True if you want to save simulation
- Set start point and goal point (default (0,-5) and (50,30))
- orizon length (default=5)
- desired_speed (default=5)
- cost function weights W1, W2, W3
- default: W1 = np.array([0.01, 0.01]) # input weightage
- W2 = np.array([2.0, 2.0, 0.5, 0.5]) # state error weightage
- W3 = np.array([0.01, 0.1]) # rate of input change weightage *NUM_OF_OBSTACLES (default = 12)
Run mpc_test.py set run_code=2
- Set save_simulation=True if you want to save simulation
- set start point (default (0,-5))
- Horizon length (default=5)
- desired_speed (default=5)
- cost function weights W1, W2, W3
- default:
- W1 = np.array([0.01, 0.01]) # input weightage
- W2 = np.array([2.0, 2.0, 0.5, 0.5]) # state error weightage
- W3 = np.array([0.01, 0.1]) # rate of input change weightage
521. path_x,path_y,path_yaw = get_right_turn(dist_step)
522. path_x,path_y,path_yaw = get_forward_course(dist_step)
523. path_x,path_y,path_yaw = get_straight_course(dist_step)
set run_code=3
- Set save_simulation=True if you want to save simulation
- set start point and goal point (default (0,-5) and (50,30))
- NUM_OF_OBSTACLES (default = 12)