Code Monkey home page Code Monkey logo

obstacle_avoidance_mpc_controller_a_star_planning's Introduction

Obstacle avoidance simulation (A* + potential fields + MPC)

To Run the Main Program File with A* Planning

Open MPC_MAIN_navigation.py and run.

Tunable options for user:

  1. Set save_simulation=True if you want to save simulation
  2. set feasible start point and goal point (default (10,2) and (20,47))
  3. Horizon length (default=6) [Describe a little more]
  4. desired_speed (default=5)
  5. cost function weights W1, W2, W3
  6. default: W1 = np.array([0.01, 0.01]) # input weightage
  7. W2 = np.array([5.0, 5.0, 0.5, 5]) # state error weightage
  8. W3 = np.array([0.01, 1.0]) # rate of input change weightage
  9. To add more obstacles in path use lines 486 to 493 as an example and repeat the procedure.

To Test Navigation through Moving Obstacles using Potential Fields and MPC

Run mpc_test.py set run_code=1

Tunable options for user:

  1. Set save_simulation=True if you want to save simulation
  2. Set start point and goal point (default (0,-5) and (50,30))
  3. orizon length (default=5)
  4. desired_speed (default=5)
  5. cost function weights W1, W2, W3
  6. default: W1 = np.array([0.01, 0.01]) # input weightage
  7. W2 = np.array([2.0, 2.0, 0.5, 0.5]) # state error weightage
  8. W3 = np.array([0.01, 0.1]) # rate of input change weightage *NUM_OF_OBSTACLES (default = 12)

To Test only Path Following Using MPC

Run mpc_test.py set run_code=2

Tunable options for user:

  1. Set save_simulation=True if you want to save simulation
  2. set start point (default (0,-5))
  3. Horizon length (default=5)
  4. desired_speed (default=5)
  5. cost function weights W1, W2, W3
  6. 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

To change path uncomment any one of the paths given on lines 521 to 523

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)

To Test only Potential Field

set run_code=3

Tunable options for user:

  1. Set save_simulation=True if you want to save simulation
  2. set start point and goal point (default (0,-5) and (50,30))
  3. NUM_OF_OBSTACLES (default = 12)

obstacle_avoidance_mpc_controller_a_star_planning's People

Contributors

shubhranshu153 avatar samarth-kalluraya avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.