/DecisionPlanning

The repository implements some decision-making and contingency planning (contingency model predictive control) methods.

Primary LanguagePython

DecisionPlanning

The repository implements some decision-making and contingency planning methods.

If you find this work useful or interesting, please kindly give me a star ⭐, thanks!😀

Requirements

  • System: Ubuntu 20.04 (Tested on Win11 WSL2 )
  • Python 3.8.10: numpy == 1.24.4 matplotlib == 3.7.4 casadi == 3.6.5

Contingency MPC / Contingency Planning

How to run

  • Navigate to the root folder

  • Uncomment the corresponding code block of settings in ContingencyMPC/CMPC.py (enable CMPC - obstacle pops out as follows)

    # CMPC - obstacle pops out
    obs_pop = True
    Pc = 0.25        # Cost weight for contingency control
    
    # # CMPC - obstacle does not pop out
    # obs_pop = False
    # Pc = 1e-2       # for unique minimum solution
    
    # # RMPC
    # obs_pop = False
    # Pc = 1.0 - 1e-2   
  • Run the script python3 ContingencyMPC/CMPC.py

  • The anime and figures are saved in ContingencyMPC/log/

Results

  • CMPC - obstacle pops out (at k = 4)
    • at k = 5, the nominal planner observes this movement and recognizes the contingency has occurred

  • CMPC - obstacle pops out (at k=4)

  • RMPC
    • assumes the worst case evolution of the scene (follow the contingency planner, the red triangles), even though the obstacle never pops out

Reference

Game-Theoretic Motion Planning

How to run

  • Uncomment the corresponding code block of settings in Game-Theoretic Motion Planning/Game.py

    KF = 0.01
    KL = 1 - KF
    # distF = 20    # collision ditance (conservative)
    distF = 10    # collision ditance (agressive)
    distL = 15
    Kinfluence = 0
    
    # KF = 0.5
    # KL = 1 - KF
    # distF = 20    # collision ditance
    # distL = 20
    # Kinfluence = 1 # add Jinfluence
  • Run the script python3 Game-Theoretic Motion Planning/Game.py

  • The anime and figures are saved in Game-Theoretic Motion Planning/log/

Results

  • Aggressive follower: Leader (automated vehicles) performs an aggressive lane change

Game_animation

  • Conservative follower: Leader accelerates before performing lane change (also the Fig 4. of [Burger, 2022])

Game_animation

Reference

Game-Theoretic CMPC

How to run

  • Uncomment the corresponding code block of settings in Game-Theoretic Motion Planning/CMPCGame.py

    # scenario
    
    decel = True        # whether follower will decelarate
    # decel = False
  • Run the script python3 Game-Theoretic Motion Planning/CMPCGame.py

  • The anime and figures are saved in Game-Theoretic Motion Planning/log/

Results

  • Follower decelerate

CMPCGame_animation

  • Follower does not decelerate

CMPCGame_animation

Reference