{"id":21144590,"url":"https://github.com/ai-winter/python_motion_planning","last_synced_at":"2025-03-31T11:00:20.566Z","repository":{"id":73883444,"uuid":"598409114","full_name":"ai-winter/python_motion_planning","owner":"ai-winter","description":"Motion planning and Navigation of AGV/AMR：ROS planner plugin implementation of A*, JPS, D*, LPA*, D* Lite, (Lazy)Theta*, RRT, RRT*, RRT-Connect, Informed RRT*, ACO, Voronoi, PID, DWA, APF, LQR, MPC, Bezier, Dubins etc.","archived":false,"fork":false,"pushed_at":"2024-05-22T15:09:52.000Z","size":11858,"stargazers_count":247,"open_issues_count":4,"forks_count":39,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-22T16:31:58.575Z","etag":null,"topics":["a-star","ant-colony-optimization","artificial-potential-field","bezier-curve","d-star","d-star-lite","dijkstra","dubins-curve","informed-rrt-star","jump-point-search","lazy-theta-star","lpa-star","model-predictive-control","motion-planning","python","rrt","rrt-connect","rrt-star","theta-star","voronoi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ai-winter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-07T03:25:58.000Z","updated_at":"2024-05-22T16:31:59.318Z","dependencies_parsed_at":null,"dependency_job_id":"6c3b16c6-8831-4aaa-b971-c02036ed732d","html_url":"https://github.com/ai-winter/python_motion_planning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-winter%2Fpython_motion_planning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-winter%2Fpython_motion_planning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-winter%2Fpython_motion_planning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ai-winter%2Fpython_motion_planning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ai-winter","download_url":"https://codeload.github.com/ai-winter/python_motion_planning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246457967,"owners_count":20780676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a-star","ant-colony-optimization","artificial-potential-field","bezier-curve","d-star","d-star-lite","dijkstra","dubins-curve","informed-rrt-star","jump-point-search","lazy-theta-star","lpa-star","model-predictive-control","motion-planning","python","rrt","rrt-connect","rrt-star","theta-star","voronoi"],"created_at":"2024-11-20T08:19:52.545Z","updated_at":"2025-03-31T11:00:20.513Z","avatar_url":"https://github.com/ai-winter.png","language":"Python","funding_links":[],"categories":["[Libraries](#contents)"],"sub_categories":["[Motion Planning and Control](#contents)"],"readme":"\n# Introduction\n\n`Motion planning` plans the state sequence of the robot without conflict between the start and goal. \n\n`Motion planning` mainly includes `Path planning` and `Trajectory planning`.\n\n* `Path Planning`: It's based on path constraints (such as obstacles), planning the optimal path sequence for the robot to travel without conflict between the start and goal.\n* `Trajectory planning`: It plans the motion state to approach the global path based on kinematics, dynamics constraints and path sequence.\n\nThis repository provides the implementations of common `Motion planning` algorithms. **Your stars and forks are welcome**. Maintaining this repository requires a huge amount of work. **Therefore, you are also welcome to contribute to this repository by opening issues, submitting pull requests or joining our development team**.\n\nThe theory analysis can be found at [motion-planning](https://blog.csdn.net/frigidwinter/category_11410243.html).\n\nWe also provide [ROS C++](https://github.com/ai-winter/ros_motion_planning) version and [Matlab](https://github.com/ai-winter/matlab_motion_planning) version.\n\n# Quick Start\n\n## Overview\nThe source file structure is shown below\n\n```\npython_motion_planning\n├─global_planner\n|   ├─graph_search\n|   ├─sample_search\n|   └─evolutionary_search\n├─local_planner\n├─curve_generation\n└─utils\n    ├─agent\n    ├─environment\n    ├─helper\n    ├─planner\n    └─plot\n```\n\n* The global planning algorithm implementation is in the folder `global_planner` with `graph_search`, `sample_search` and `evolutionary search`.\n\n* The local planning algorithm implementation is in the folder `local_planner`.\n\n* The curve generation algorithm implementation is in the folder `curve_generation`.\n\n## Install\n*(Optional)* The code was tested in python=3.10. We recommend using `conda` to install the dependencies.\n\n```shell\nconda create -n pmp python=3.10\nconda activate pmp\n```\n\nTo install the repository, please run the following command in shell.\n\n```shell\npip install python-motion-planning\n```\n\n## Run\nBelow are some simple examples.\n\n1. Run planning and animation separately\n```python\nimport python_motion_planning as pmp\nplanner = pmp.AStar(start=(5, 5), goal=(45, 25), env=pmp.Grid(51, 31))\ncost, path, expand = planner.plan()\nplanner.plot.animation(path, str(planner), cost, expand)  # animation\n```\n\n2. Run planning and animation in one step\n```python\nimport python_motion_planning as pmp\nplanner = pmp.AStar(start=(5, 5), goal=(45, 25), env=pmp.Grid(51, 31))\nplanner.run()       # run both planning and animation\n```\n\n3. Create planner in factory mode\n```python\nimport python_motion_planning as pmp\nsearch_factory = pmp.SearchFactory()\nplanner = search_factory(\"a_star\", start=(5, 5), goal=(45, 25), env=pmp.Grid(51, 31))\nplanner.run()       # run both planning and animation\n```\n\nMore examples can be found in the folder `examples` in the repository.\n\n## Documentation\n\nFor more details, you can refer to [online documentation](https://ai-winter.github.io/python_motion_planning/).\n\nThe documentation is auto-generated using mkdocs. To do this, enter the root directory and run\n\n```shell\npython generate_mkdocs.py\nmkdocs serve\n```\n\nThen open the browser and go to [http://127.0.0.1:8000](http://127.0.0.1:8000). That is the generated documentation.\n\n# Version\n## Global Planner\n\nPlanner      | Version                                                                                                                                                                         | Animation\n------------ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| --------- \n**GBFS**              | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/gbfs.py)            | ![gbfs_python.png](assets/gbfs_python.png) \n**Dijkstra**                 | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/dijkstra.py)        | ![dijkstra_python.png](assets/dijkstra_python.png)\n**A***               | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/a_star.py)          |  ![a_star_python.png](assets/a_star_python.png) \n**JPS**                 | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/jps.py)             | ![jps_python.png](assets/jps_python.png)\n**D***                  | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/d_star.py)          | ![d_star_python.png](assets/d_star_python.png)\n**LPA***                 | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/lpa_star.py)        | ![lpa_star_python.png](assets/lpa_star_python.png) \n**D\\* Lite**                | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/d_star_lite.py)     | ![d_star_lite_python.png](assets/d_star_lite_python.png)\n**Theta\\***                | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/theta_star.py)      | ![theta_star_python.png](assets/theta_star_python.png)\n**Lazy Theta\\***                | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/lazy_theta_star.py) | ![lazy_theta_star_python.png](assets/lazy_theta_star_python.png)\n**S-Theta\\***                | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/s_theta_star.py)    | ![s_theta_star_python.png](assets/s_theta_star_python.png)\n**Anya**                | [![Status](https://img.shields.io/badge/develop-v1.0-red)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/anya.py)                 | ![Status](https://img.shields.io/badge/gif-none-yellow)\n**Voronoi**                | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/graph_search/voronoi.py)         | ![voronoi_python.png](assets/voronoi_python.png) \n**RRT**                 | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/sample_search/rrt.py)            | ![rrt_python.png](assets/rrt_python.png)\n**RRT***                 | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/sample_search/rrt_star.py)       | ![rrt_star_python.png](assets/rrt_star_python.png)\n**Informed RRT**                 | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/sample_search/informed_rrt.py)   | ![informed_rrt_python.png](assets/informed_rrt_python.png)\n**RRT-Connect**                | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/sample_search/rrt_connect.py)    | ![rrt_connect_python.png](assets/rrt_connect_python.png)\n| **ACO** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/evolutionary_search/aco.py)      | ![aco_python.png](assets/aco_python.png)\n| **GA**  | ![Status](https://img.shields.io/badge/develop-v1.0-red)                                                                                                                        | ![Status](https://img.shields.io/badge/gif-none-yellow) \n| **PSO**  | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/global_planner/evolutionary_search/pso.py)      | ![pso_python.png](assets/pso_python.svg) ![pso_python_cost.png](assets/pso_python_cost.svg) \n\n\n## Local Planner\n\n| Planner     | Version                                                                                                                                                | Animation                                     \n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------| -------------------------------------------------- \n| **PID**     | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/local_planner/pid.py)  | ![pid_python.svg](assets/pid_python.svg) \n| **APF**     | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/local_planner/apf.py)  | ![apf_python.svg](assets/apf_python.svg) \n| **DWA**     | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/local_planner/dwa.py)  | ![dwa_python.svg](assets/dwa_python.svg)\n| **RPP**     | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/local_planner/rpp.py)  | ![rpp_python.svg](assets/rpp_python.svg)\n| **LQR**     | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/local_planner/lqr.py)  | ![lqr_python.svg](assets/lqr_python.svg) \n| **TEB**     | ![Status](https://img.shields.io/badge/develop-v1.0-red)                                                                                               | ![Status](https://img.shields.io/badge/gif-none-yellow) \n| **MPC**     | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/local_planner/mpc.py)  | ![mpc_python.svg](assets/mpc_python.svg)\n| **MPPI**    | ![Status](https://img.shields.io/badge/develop-v1.0-red)                                                                                               |![Status](https://img.shields.io/badge/gif-none-yellow)\n| **Lattice** | ![Status](https://img.shields.io/badge/develop-v1.0-red)                                                                                               |![Status](https://img.shields.io/badge/gif-none-yellow)\n| **DQN**    | ![Status](https://img.shields.io/badge/develop-v1.0-red)                                                                                               |![Status](https://img.shields.io/badge/gif-none-yellow)\n| **DDPG**    | ![Status](https://img.shields.io/badge/develop-v1.0-red)                                                                                               |![Status](https://img.shields.io/badge/gif-none-yellow)\n\n## Curve Generation\n\n| Planner | Version   | Animation                                |\n| ------- | -------------------------------------------------------- | -------------------------------------------------------- \n| **Polynomia** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/polynomial_curve.py) | ![polynomial_curve_python.gif](assets/polynomial_curve_python.gif)\n| **Bezier** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/bezier_curve.py) | ![bezier_curve_python.png](assets/bezier_curve_python.png)\n| **Cubic Spline** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/cubic_spline.py) | ![cubic_spline_python.png](assets/cubic_spline_python.png)\n| **BSpline** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/bspline_curve.py) | ![bspline_curve_python.png](assets/bspline_curve_python.png)\n| **Dubins** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/dubins_curve.py) | ![dubins_curve_python.png](assets/dubins_curve_python.png)\n| **Reeds-Shepp** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/reeds_shepp.py) | ![reeds_shepp_python.png](assets/reeds_shepp_python.gif)\n| **Fem-Pos Smoother** | [![Status](https://img.shields.io/badge/done-v1.0-brightgreen)](https://github.com/ai-winter/python_motion_planning/blob/master/curve_generation/fem_pos_smooth.py) | ![fem_pos_smoother_python.png](assets/fem_pos_smoother_python.png)\n\n\n\n\n# Papers\n## Global Planning\n\n* [A*: ](https://ieeexplore.ieee.org/document/4082128) A Formal Basis for the heuristic Determination of Minimum Cost Paths\n* [JPS:](https://ojs.aaai.org/index.php/AAAI/article/view/7994) Online Graph Pruning for Pathfinding On Grid Maps\n* [Lifelong Planning A*: ](https://www.cs.cmu.edu/~maxim/files/aij04.pdf) Lifelong Planning A*\n* [D*: ](http://web.mit.edu/16.412j/www/html/papers/original_dstar_icra94.pdf) Optimal and Efficient Path Planning for Partially-Known Environments\n* [D* Lite: ](http://idm-lab.org/bib/abstracts/papers/aaai02b.pdf) D* Lite\n* [Theta*: ](https://www.jair.org/index.php/jair/article/view/10676) Theta*: Any-Angle Path Planning on Grids\n* [Lazy Theta*: ](https://ojs.aaai.org/index.php/AAAI/article/view/7566) Lazy Theta*: Any-Angle Path Planning and Path Length Analysis in 3D\n* [S-Theta*: ](https://link.springer.com/chapter/10.1007/978-1-4471-4739-8_8) S-Theta*: low steering path-planning algorithm\n* [Anya: ](http://www.grastien.net/ban/articles/hgoa-jair16.pdf) Optimal Any-Angle Pathfinding In Practice\n* [RRT: ](http://msl.cs.uiuc.edu/~lavalle/papers/Lav98c.pdf) Rapidly-Exploring Random Trees: A New Tool for Path Planning\n* [RRT-Connect: ](http://www-cgi.cs.cmu.edu/afs/cs/academic/class/15494-s12/readings/kuffner_icra2000.pdf) RRT-Connect: An Efficient Approach to Single-Query Path Planning\n* [RRT*: ](https://journals.sagepub.com/doi/abs/10.1177/0278364911406761) Sampling-based algorithms for optimal motion planning\n* [Informed RRT*: ](https://arxiv.org/abs/1404.2334) Optimal Sampling-based Path Planning Focused via Direct Sampling of an Admissible Ellipsoidal heuristic\n* [ACO: ](http://www.cs.yale.edu/homes/lans/readings/routing/dorigo-ants-1999.pdf) Ant Colony Optimization: A New Meta-Heuristic\n\n## Local Planning\n\n* [DWA: ](https://www.ri.cmu.edu/pub_files/pub1/fox_dieter_1997_1/fox_dieter_1997_1.pdf) The Dynamic Window Approach to Collision Avoidance\n* [APF: ](https://ieeexplore.ieee.org/document/1087247) Real-time obstacle avoidance for manipulators and mobile robots\n* [RPP: ](https://arxiv.org/pdf/2305.20026.pdf) Regulated Pure Pursuit for Robot Path Tracking\n* [DDPG: ](https://arxiv.org/abs/1509.02971) Continuous control with deep reinforcement learning\n\n## Curve Generation\n\n* [Dubins: ]() On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents\n\n# Acknowledgment\n\n* Our visualization and animation framework of Python Version refers to [https://github.com/zhm-real/PathPlanning](https://github.com/zhm-real/PathPlanning). Thanks sincerely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-winter%2Fpython_motion_planning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fai-winter%2Fpython_motion_planning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fai-winter%2Fpython_motion_planning/lists"}