python-motion-planning 2.0.dev1__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/PKG-INFO +71 -29
  2. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/README.md +66 -28
  3. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/pyproject.toml +6 -2
  4. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/__init__.py +1 -1
  5. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/map/base_map.py +2 -8
  6. python_motion_planning-2.0.1/src/python_motion_planning/common/env/map/grid.py +827 -0
  7. python_motion_planning-2.0.1/src/python_motion_planning/common/utils/__init__.py +3 -0
  8. python_motion_planning-2.0.1/src/python_motion_planning/common/utils/child_tree.py +22 -0
  9. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/utils/geometry.py +18 -29
  10. python_motion_planning-2.0.1/src/python_motion_planning/common/visualizer/__init__.py +3 -0
  11. python_motion_planning-2.0.1/src/python_motion_planning/common/visualizer/base_visualizer.py +165 -0
  12. python_motion_planning-2.0.dev1/src/python_motion_planning/common/visualizer/visualizer.py → python_motion_planning-2.0.1/src/python_motion_planning/common/visualizer/visualizer_2d.py +97 -220
  13. python_motion_planning-2.0.1/src/python_motion_planning/common/visualizer/visualizer_3d.py +242 -0
  14. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/base_controller.py +37 -4
  15. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/path_tracker/__init__.py +2 -1
  16. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/path_tracker/apf.py +22 -23
  17. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/path_tracker/dwa.py +14 -17
  18. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/path_tracker/path_tracker.py +4 -1
  19. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/path_tracker/pid.py +7 -1
  20. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/path_tracker/pure_pursuit.py +7 -1
  21. python_motion_planning-2.0.1/src/python_motion_planning/controller/path_tracker/rpp.py +111 -0
  22. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/path_planner/__init__.py +2 -1
  23. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/path_planner/base_path_planner.py +45 -11
  24. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/graph_search/__init__.py +6 -0
  25. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/path_planner/graph_search/a_star.py +12 -14
  26. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/graph_search/dijkstra.py +97 -0
  27. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/graph_search/gbfs.py +100 -0
  28. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/graph_search/jps.py +199 -0
  29. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/graph_search/lazy_theta_star.py +113 -0
  30. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/path_planner/graph_search/theta_star.py +17 -19
  31. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/hybrid_search/__init__.py +1 -0
  32. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/hybrid_search/voronoi_planner.py +204 -0
  33. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/sample_search/__init__.py +3 -0
  34. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/path_planner/sample_search/rrt.py +73 -31
  35. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/sample_search/rrt_connect.py +237 -0
  36. python_motion_planning-2.0.1/src/python_motion_planning/path_planner/sample_search/rrt_star.py +279 -0
  37. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/__init__.py +2 -0
  38. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/base_curve_generator.py +53 -0
  39. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/__init__.py +2 -0
  40. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/point_based/__init__.py +2 -0
  41. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/point_based/bspline.py +256 -0
  42. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/point_based/cubic_spline.py +115 -0
  43. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/pose_based/__init__.py +4 -0
  44. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/pose_based/bezier.py +121 -0
  45. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/pose_based/dubins.py +355 -0
  46. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/pose_based/polynomial.py +197 -0
  47. python_motion_planning-2.0.1/src/python_motion_planning/traj_optimizer/curve_generator/pose_based/reeds_shepp.py +606 -0
  48. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning.egg-info/PKG-INFO +71 -29
  49. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning.egg-info/SOURCES.txt +23 -12
  50. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning.egg-info/requires.txt +4 -0
  51. python_motion_planning-2.0.dev1/src/python_motion_planning/common/env/map/grid.py +0 -569
  52. python_motion_planning-2.0.dev1/src/python_motion_planning/common/env/robot/tmp.py +0 -404
  53. python_motion_planning-2.0.dev1/src/python_motion_planning/common/utils/__init__.py +0 -2
  54. python_motion_planning-2.0.dev1/src/python_motion_planning/common/visualizer/__init__.py +0 -1
  55. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/__init__.py +0 -9
  56. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/bezier_curve.py +0 -131
  57. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/bspline_curve.py +0 -271
  58. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/cubic_spline.py +0 -128
  59. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/curve.py +0 -64
  60. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/dubins_curve.py +0 -348
  61. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/fem_pos_smooth.py +0 -114
  62. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/polynomial_curve.py +0 -226
  63. python_motion_planning-2.0.dev1/src/python_motion_planning/curve_generator/reeds_shepp.py +0 -736
  64. python_motion_planning-2.0.dev1/src/python_motion_planning/path_planner/graph_search/__init__.py +0 -3
  65. python_motion_planning-2.0.dev1/src/python_motion_planning/path_planner/graph_search/dijkstra.py +0 -97
  66. python_motion_planning-2.0.dev1/src/python_motion_planning/path_planner/sample_search/__init__.py +0 -2
  67. python_motion_planning-2.0.dev1/src/python_motion_planning/path_planner/sample_search/rrt_star.py +0 -209
  68. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/LICENSE +0 -0
  69. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/setup.cfg +0 -0
  70. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/__init__.py +0 -0
  71. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/__init__.py +0 -0
  72. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/map/__init__.py +0 -0
  73. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/node.py +0 -0
  74. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/robot/__init__.py +0 -0
  75. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/robot/base_robot.py +0 -0
  76. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/robot/circular_robot.py +0 -0
  77. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/robot/diff_drive_robot.py +0 -0
  78. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/types.py +0 -0
  79. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/world/__init__.py +0 -0
  80. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/world/base_world.py +0 -0
  81. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/env/world/toy_simulator.py +0 -0
  82. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/common/utils/frame_transformer.py +0 -0
  83. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/__init__.py +0 -0
  84. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning/controller/random_controller.py +0 -0
  85. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning.egg-info/dependency_links.txt +0 -0
  86. {python_motion_planning-2.0.dev1 → python_motion_planning-2.0.1}/src/python_motion_planning.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-motion-planning
3
- Version: 2.0.dev1
3
+ Version: 2.0.1
4
4
  Summary: Motion planning algorithms for Python
5
5
  Maintainer-email: Wu Maojia <omige@mail.nwpu.edu.cn>, Yang Haodong <913982779@qq.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -685,15 +685,21 @@ Requires-Python: >=3.6
685
685
  Description-Content-Type: text/markdown
686
686
  License-File: LICENSE
687
687
  Requires-Dist: numpy
688
+ Requires-Dist: numba
688
689
  Requires-Dist: scipy
689
690
  Requires-Dist: matplotlib
690
691
  Requires-Dist: osqp
691
692
  Requires-Dist: gymnasium
693
+ Requires-Dist: faiss-cpu
694
+ Requires-Dist: pyvista
695
+ Requires-Dist: pyvistaqt
692
696
  Dynamic: license-file
693
697
 
694
698
 
695
699
  # Introduction
696
700
 
701
+ `Python Motion Planning` repository provides the implementations of common `Motion planning` algorithms, including path planners on N-D grid, controllers for path-tracking, trajectory optimizers, a visualizer based on matplotlib and a toy physical simulator to test controllers.
702
+
697
703
  `Motion planning` plans the state sequence of the robot without conflict between the start and goal.
698
704
 
699
705
  `Motion planning` mainly includes `Path planning` and `Trajectory planning`.
@@ -705,7 +711,7 @@ The theory analysis can be found at [motion-planning](https://blog.csdn.net/frig
705
711
 
706
712
  We also provide [ROS C++](https://github.com/ai-winter/ros_motion_planning) version and [Matlab](https://github.com/ai-winter/matlab_motion_planning) version.
707
713
 
708
- This repository provides the implementations of common `Motion planning` algorithms. **Your stars and forks are welcome**. Submitting pull requests or joining our development team are also welcome. For trivial modification, please directly contribute to `dev` branch. For big modification, please [contact](#contact) us before you contribute.
714
+ **Your stars and forks are welcome!**
709
715
 
710
716
  # Quick Start
711
717
 
@@ -725,8 +731,10 @@ python_motion_planning
725
731
  | └─path_tracker
726
732
  ├─path_planner
727
733
  | ├─graph_search
728
- | └─sample_search
729
- └─curve_generation
734
+ | ├─sample_search
735
+ | └─hybrid_search
736
+ └─traj_optimizer
737
+ └─curve_generator
730
738
  ```
731
739
 
732
740
  ## Install
@@ -740,7 +748,7 @@ conda activate pmp
740
748
  To install the repository, please run the following command in shell.
741
749
 
742
750
  ```shell
743
- pip install python-motion-planning==2.0.dev1
751
+ pip install python-motion-planning
744
752
  ```
745
753
 
746
754
  ## Run
@@ -749,29 +757,40 @@ Please refer to the Tutorials part of [online documentation](https://ai-winter.g
749
757
 
750
758
  # Demos
751
759
  ## Path Planner
752
-
760
+ ### Graph Search
753
761
  |Planner|2D Grid|3D Grid
754
762
  |-------|-------|-------
755
- **GBFS**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
756
- **Dijkstra**|![dijkstra_2d.svg](assets/dijkstra_2d.svg)|![dijkstra_3d.svg](assets/dijkstra_3d.svg)
757
- **A\***|![a_star_2d.svg](assets/a_star_2d.svg)|![a_star_3d.svg](assets/a_star_3d.svg)
758
- **JPS**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
763
+ **Dijkstra**|![dijkstra_2d.svg](assets/dijkstra_2d.svg)|![dijkstra_3d.png](assets/dijkstra_3d.png)
764
+ **GBFS**|![gbfs_2d.svg](assets/gbfs_2d.svg)|![gbfs_3d.png](assets/gbfs_3d.png)
765
+ **A\***|![a_star_2d.svg](assets/a_star_2d.svg)|![a_star_3d.png](assets/a_star_3d.png)
766
+ **JPS**|![jps_2d.svg](assets/jps_2d.svg)|![jps_3d.png](assets/jps_3d.png)
767
+ **Theta\***|![theta_star_2d.svg](assets/theta_star_2d.svg)|![theta_star_3d.png](assets/theta_star_3d.png)
768
+ **Lazy Theta\***|![lazy_theta_star_2d.svg](assets/lazy_theta_star_2d.svg)|![lazy_theta_star_3d.png](assets/lazy_theta_star_3d.png)
759
769
  **D\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
760
770
  **LPA\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
761
771
  **D\* Lite**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
762
- **Theta\***|![theta_star_2d.svg](assets/theta_star_2d.svg)|![theta_star_3d.svg](assets/theta_star_3d.svg)
763
- **Lazy Theta\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
764
- **S-Theta\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
765
772
  **Anya**|Not implemented|Not implemented
766
- **Voronoi**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
767
- **RRT**|![rrt_2d.svg](assets/rrt_2d.svg)|![rrt_3d.svg](assets/rrt_3d.svg)
768
- **RRT\***|![rrt_star_2d.svg](assets/rrt_star_2d.svg)|![rrt_star_3d.svg](assets/rrt_star_3d.svg)
773
+
774
+ ### Sample Search
775
+ |Planner|2D Grid|3D Grid
776
+ |-------|-------|-------
777
+ **RRT**|![rrt_2d.svg](assets/rrt_2d.svg)|![rrt_3d.png](assets/rrt_3d.png)
778
+ **RRT\***|![rrt_star_2d.svg](assets/rrt_star_2d.svg)|![rrt_star_3d.png](assets/rrt_star_3d.png)
779
+ **RRT-Connect**|![rrt_connect_2d.svg](assets/rrt_connect_2d.svg)|![rrt_connect_3d.png](assets/rrt_connect_3d.png)
769
780
  **Informed RRT**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
770
- **RRT-Connect**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
781
+ **PRM**|Not implemented|Not implemented
782
+
783
+ ### Evolutionary Search
784
+ |Planner|2D Grid|3D Grid
785
+ |-------|-------|-------
771
786
  | **ACO** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
772
787
  | **GA** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
773
788
  | **PSO** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
774
789
 
790
+ ### Hybrid Search
791
+ |Planner|2D Grid|3D Grid
792
+ |-------|-------|-------
793
+ **Voronoi Planner**|![voronoi_planner_2d.svg](assets/voronoi_planner_2d.svg)|![voronoi_planner_3d.png](assets/voronoi_planner_3d.png)
775
794
 
776
795
  ## Controller
777
796
 
@@ -779,14 +798,14 @@ We provide a toy simulator with simple physical simulation to test controllers (
779
798
 
780
799
  In the following demos, the blue robot 1 is the `CircularRobot`, and the orange robot 2 is the `DiffDriveRobot`.
781
800
 
782
- |Planner|2D|3D
801
+ |Controller|2D|3D
783
802
  |-------|-------|-------
784
803
  |**Path Trakcer**|![path_tracker_2d.gif](assets/path_tracker_2d.gif)|Not implemented
785
804
  | **Pure Pursuit** |![pure_pursuit_2d.gif](assets/pure_pursuit_2d.gif)|Not implemented
786
805
  | **PID** |![pid_2d.gif](assets/pid_2d.gif)|Not implemented
787
806
  | **APF** |![apf_2d.gif](assets/apf_2d.gif)|Not implemented
788
807
  | **DWA** |![dwa_2d.gif](assets/dwa_2d.gif)|Not implemented
789
- | **RPP** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
808
+ | **RPP** |![rpp_2d.gif](assets/rpp_2d.gif)|Not implemented
790
809
  | **LQR** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
791
810
  | **MPC** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
792
811
  | **MPPI** |Not implemented|Not implemented
@@ -795,19 +814,42 @@ In the following demos, the blue robot 1 is the `CircularRobot`, and the orange
795
814
  | **DQN** |Not implemented|Not implemented
796
815
  | **DDPG** |Implemented in [V1.0](https://github.com/ai-winter/python_motion_planning/tree/v1.0), not migrated|Not implemented
797
816
 
798
- ## Curve Generator
817
+ ## Trajectory Optimizer
818
+ ### Curve Generator
819
+ #### Point-based
799
820
 
800
- The visualization of the curve generators has not been implemented in current version. They can be visualized in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1).
821
+ |Generator|2D|3D|
822
+ | ------- | -------------------------------------------------------- | --------------------------------------------------------
823
+ | **Cubic Spline** |![cubic_spline_2d.svg](assets/cubic_spline_2d.svg)|Not implemented
824
+ | **BSpline** |![bspline_2d.svg](assets/bspline_2d.svg)|Not implemented
801
825
 
802
- | Planner |2D|3D|
826
+ #### Pose-based
827
+ |Generator|2D|3D|
803
828
  | ------- | -------------------------------------------------------- | --------------------------------------------------------
804
- | **Polynomia** | ![polynomial_curve_python.gif](assets/polynomial_curve_python.gif)|Not implemented
805
- | **Bezier** |![bezier_curve_python.png](assets/bezier_curve_python.png)|Not implemented
806
- | **Cubic Spline** |![cubic_spline_python.png](assets/cubic_spline_python.png)|Not implemented
807
- | **BSpline** |![bspline_curve_python.png](assets/bspline_curve_python.png)|Not implemented
808
- | **Dubins** |![dubins_curve_python.png](assets/dubins_curve_python.png)|Not implemented
809
- | **Reeds-Shepp** |![reeds_shepp_python.png](assets/reeds_shepp_python.gif)|Not implemented
810
- | **Fem-Pos Smoother** |![fem_pos_smoother_python.png](assets/fem_pos_smoother_python.png)|Not implemented
829
+ | **Polynomia** | ![polynomial_2d.svg](assets/polynomial_2d.svg)|Not implemented
830
+ | **Bezier** |![bezier_2d.svg](assets/bezier_2d.svg)|Not implemented
831
+ | **Dubins** |![dubins_2d.svg](assets/dubins_2d.svg)|Not implemented
832
+ | **Reeds-Shepp** |![reeds_shepp_2d.svg](assets/reeds_shepp_2d.svg)|Not implemented
833
+
834
+ # Future Works
835
+
836
+ * N-D controllers (path-trackers).
837
+
838
+ * Path planning for robotic arms.
839
+
840
+ * Path planning on topological map.
841
+
842
+ * Sample search with Dubins or Reeds-Shepp curves.
843
+
844
+ * Application on ROS2.
845
+
846
+ * Application in mainstream robot simulation environments (e.g. Gazebo, Carla, Airsim, PyBullet, MuJoCo, Issac Sim).
847
+
848
+ * More mainstream motion planning algorithms.
849
+
850
+ * Performance optimization.
851
+
852
+ Contributors are welcome! For trivial modification, please directly contribute to `dev` branch. For big modification, please [contact](#contact) us before you contribute.
811
853
 
812
854
  # Contact
813
855
 
@@ -1,6 +1,8 @@
1
1
 
2
2
  # Introduction
3
3
 
4
+ `Python Motion Planning` repository provides the implementations of common `Motion planning` algorithms, including path planners on N-D grid, controllers for path-tracking, trajectory optimizers, a visualizer based on matplotlib and a toy physical simulator to test controllers.
5
+
4
6
  `Motion planning` plans the state sequence of the robot without conflict between the start and goal.
5
7
 
6
8
  `Motion planning` mainly includes `Path planning` and `Trajectory planning`.
@@ -12,7 +14,7 @@ The theory analysis can be found at [motion-planning](https://blog.csdn.net/frig
12
14
 
13
15
  We also provide [ROS C++](https://github.com/ai-winter/ros_motion_planning) version and [Matlab](https://github.com/ai-winter/matlab_motion_planning) version.
14
16
 
15
- This repository provides the implementations of common `Motion planning` algorithms. **Your stars and forks are welcome**. Submitting pull requests or joining our development team are also welcome. For trivial modification, please directly contribute to `dev` branch. For big modification, please [contact](#contact) us before you contribute.
17
+ **Your stars and forks are welcome!**
16
18
 
17
19
  # Quick Start
18
20
 
@@ -32,8 +34,10 @@ python_motion_planning
32
34
  | └─path_tracker
33
35
  ├─path_planner
34
36
  | ├─graph_search
35
- | └─sample_search
36
- └─curve_generation
37
+ | ├─sample_search
38
+ | └─hybrid_search
39
+ └─traj_optimizer
40
+ └─curve_generator
37
41
  ```
38
42
 
39
43
  ## Install
@@ -47,7 +51,7 @@ conda activate pmp
47
51
  To install the repository, please run the following command in shell.
48
52
 
49
53
  ```shell
50
- pip install python-motion-planning==2.0.dev1
54
+ pip install python-motion-planning
51
55
  ```
52
56
 
53
57
  ## Run
@@ -56,29 +60,40 @@ Please refer to the Tutorials part of [online documentation](https://ai-winter.g
56
60
 
57
61
  # Demos
58
62
  ## Path Planner
59
-
63
+ ### Graph Search
60
64
  |Planner|2D Grid|3D Grid
61
65
  |-------|-------|-------
62
- **GBFS**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
63
- **Dijkstra**|![dijkstra_2d.svg](assets/dijkstra_2d.svg)|![dijkstra_3d.svg](assets/dijkstra_3d.svg)
64
- **A\***|![a_star_2d.svg](assets/a_star_2d.svg)|![a_star_3d.svg](assets/a_star_3d.svg)
65
- **JPS**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
66
+ **Dijkstra**|![dijkstra_2d.svg](assets/dijkstra_2d.svg)|![dijkstra_3d.png](assets/dijkstra_3d.png)
67
+ **GBFS**|![gbfs_2d.svg](assets/gbfs_2d.svg)|![gbfs_3d.png](assets/gbfs_3d.png)
68
+ **A\***|![a_star_2d.svg](assets/a_star_2d.svg)|![a_star_3d.png](assets/a_star_3d.png)
69
+ **JPS**|![jps_2d.svg](assets/jps_2d.svg)|![jps_3d.png](assets/jps_3d.png)
70
+ **Theta\***|![theta_star_2d.svg](assets/theta_star_2d.svg)|![theta_star_3d.png](assets/theta_star_3d.png)
71
+ **Lazy Theta\***|![lazy_theta_star_2d.svg](assets/lazy_theta_star_2d.svg)|![lazy_theta_star_3d.png](assets/lazy_theta_star_3d.png)
66
72
  **D\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
67
73
  **LPA\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
68
74
  **D\* Lite**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
69
- **Theta\***|![theta_star_2d.svg](assets/theta_star_2d.svg)|![theta_star_3d.svg](assets/theta_star_3d.svg)
70
- **Lazy Theta\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
71
- **S-Theta\***|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
72
75
  **Anya**|Not implemented|Not implemented
73
- **Voronoi**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
74
- **RRT**|![rrt_2d.svg](assets/rrt_2d.svg)|![rrt_3d.svg](assets/rrt_3d.svg)
75
- **RRT\***|![rrt_star_2d.svg](assets/rrt_star_2d.svg)|![rrt_star_3d.svg](assets/rrt_star_3d.svg)
76
+
77
+ ### Sample Search
78
+ |Planner|2D Grid|3D Grid
79
+ |-------|-------|-------
80
+ **RRT**|![rrt_2d.svg](assets/rrt_2d.svg)|![rrt_3d.png](assets/rrt_3d.png)
81
+ **RRT\***|![rrt_star_2d.svg](assets/rrt_star_2d.svg)|![rrt_star_3d.png](assets/rrt_star_3d.png)
82
+ **RRT-Connect**|![rrt_connect_2d.svg](assets/rrt_connect_2d.svg)|![rrt_connect_3d.png](assets/rrt_connect_3d.png)
76
83
  **Informed RRT**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
77
- **RRT-Connect**|Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
84
+ **PRM**|Not implemented|Not implemented
85
+
86
+ ### Evolutionary Search
87
+ |Planner|2D Grid|3D Grid
88
+ |-------|-------|-------
78
89
  | **ACO** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
79
90
  | **GA** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
80
91
  | **PSO** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
81
92
 
93
+ ### Hybrid Search
94
+ |Planner|2D Grid|3D Grid
95
+ |-------|-------|-------
96
+ **Voronoi Planner**|![voronoi_planner_2d.svg](assets/voronoi_planner_2d.svg)|![voronoi_planner_3d.png](assets/voronoi_planner_3d.png)
82
97
 
83
98
  ## Controller
84
99
 
@@ -86,14 +101,14 @@ We provide a toy simulator with simple physical simulation to test controllers (
86
101
 
87
102
  In the following demos, the blue robot 1 is the `CircularRobot`, and the orange robot 2 is the `DiffDriveRobot`.
88
103
 
89
- |Planner|2D|3D
104
+ |Controller|2D|3D
90
105
  |-------|-------|-------
91
106
  |**Path Trakcer**|![path_tracker_2d.gif](assets/path_tracker_2d.gif)|Not implemented
92
107
  | **Pure Pursuit** |![pure_pursuit_2d.gif](assets/pure_pursuit_2d.gif)|Not implemented
93
108
  | **PID** |![pid_2d.gif](assets/pid_2d.gif)|Not implemented
94
109
  | **APF** |![apf_2d.gif](assets/apf_2d.gif)|Not implemented
95
110
  | **DWA** |![dwa_2d.gif](assets/dwa_2d.gif)|Not implemented
96
- | **RPP** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
111
+ | **RPP** |![rpp_2d.gif](assets/rpp_2d.gif)|Not implemented
97
112
  | **LQR** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
98
113
  | **MPC** |Implemented in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1), not migrated|Not implemented
99
114
  | **MPPI** |Not implemented|Not implemented
@@ -102,19 +117,42 @@ In the following demos, the blue robot 1 is the `CircularRobot`, and the orange
102
117
  | **DQN** |Not implemented|Not implemented
103
118
  | **DDPG** |Implemented in [V1.0](https://github.com/ai-winter/python_motion_planning/tree/v1.0), not migrated|Not implemented
104
119
 
105
- ## Curve Generator
120
+ ## Trajectory Optimizer
121
+ ### Curve Generator
122
+ #### Point-based
106
123
 
107
- The visualization of the curve generators has not been implemented in current version. They can be visualized in [V1.1.1](https://github.com/ai-winter/python_motion_planning/tree/v1.1.1).
124
+ |Generator|2D|3D|
125
+ | ------- | -------------------------------------------------------- | --------------------------------------------------------
126
+ | **Cubic Spline** |![cubic_spline_2d.svg](assets/cubic_spline_2d.svg)|Not implemented
127
+ | **BSpline** |![bspline_2d.svg](assets/bspline_2d.svg)|Not implemented
108
128
 
109
- | Planner |2D|3D|
129
+ #### Pose-based
130
+ |Generator|2D|3D|
110
131
  | ------- | -------------------------------------------------------- | --------------------------------------------------------
111
- | **Polynomia** | ![polynomial_curve_python.gif](assets/polynomial_curve_python.gif)|Not implemented
112
- | **Bezier** |![bezier_curve_python.png](assets/bezier_curve_python.png)|Not implemented
113
- | **Cubic Spline** |![cubic_spline_python.png](assets/cubic_spline_python.png)|Not implemented
114
- | **BSpline** |![bspline_curve_python.png](assets/bspline_curve_python.png)|Not implemented
115
- | **Dubins** |![dubins_curve_python.png](assets/dubins_curve_python.png)|Not implemented
116
- | **Reeds-Shepp** |![reeds_shepp_python.png](assets/reeds_shepp_python.gif)|Not implemented
117
- | **Fem-Pos Smoother** |![fem_pos_smoother_python.png](assets/fem_pos_smoother_python.png)|Not implemented
132
+ | **Polynomia** | ![polynomial_2d.svg](assets/polynomial_2d.svg)|Not implemented
133
+ | **Bezier** |![bezier_2d.svg](assets/bezier_2d.svg)|Not implemented
134
+ | **Dubins** |![dubins_2d.svg](assets/dubins_2d.svg)|Not implemented
135
+ | **Reeds-Shepp** |![reeds_shepp_2d.svg](assets/reeds_shepp_2d.svg)|Not implemented
136
+
137
+ # Future Works
138
+
139
+ * N-D controllers (path-trackers).
140
+
141
+ * Path planning for robotic arms.
142
+
143
+ * Path planning on topological map.
144
+
145
+ * Sample search with Dubins or Reeds-Shepp curves.
146
+
147
+ * Application on ROS2.
148
+
149
+ * Application in mainstream robot simulation environments (e.g. Gazebo, Carla, Airsim, PyBullet, MuJoCo, Issac Sim).
150
+
151
+ * More mainstream motion planning algorithms.
152
+
153
+ * Performance optimization.
154
+
155
+ Contributors are welcome! For trivial modification, please directly contribute to `dev` branch. For big modification, please [contact](#contact) us before you contribute.
118
156
 
119
157
  # Contact
120
158
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python-motion-planning"
7
- version = "2.0.dev1"
7
+ version = "2.0.1"
8
8
  description = "Motion planning algorithms for Python"
9
9
  maintainers = [
10
10
  {name = "Wu Maojia", email = "omige@mail.nwpu.edu.cn"},
@@ -15,10 +15,14 @@ license = {file = "LICENSE"}
15
15
  requires-python = ">=3.6"
16
16
  dependencies = [
17
17
  "numpy",
18
+ "numba",
18
19
  "scipy",
19
20
  "matplotlib",
20
21
  "osqp",
21
- "gymnasium"
22
+ "gymnasium",
23
+ "faiss-cpu",
24
+ "pyvista",
25
+ "pyvistaqt"
22
26
  ]
23
27
  classifiers = [
24
28
  "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
@@ -1,4 +1,4 @@
1
1
  from .common import *
2
2
  from .path_planner import *
3
3
  from .controller import *
4
- from .curve_generator import *
4
+ from .traj_optimizer import *
@@ -1,7 +1,7 @@
1
1
  """
2
2
  @file: map.py
3
3
  @author: Wu Maojia
4
- @update: 2025.10.3
4
+ @update: 2025.11.25
5
5
  """
6
6
  from typing import Iterable, Union
7
7
  from abc import ABC, abstractmethod
@@ -17,12 +17,10 @@ class BaseMap(ABC):
17
17
 
18
18
  Args:
19
19
  bounds: The size of map in the world (shape: (n, 2) (n>=2)). bounds[i, 0] means the lower bound of the world in the i-th dimension. bounds[i, 1] means the upper bound of the world in the i-th dimension.
20
- dtype: data type of coordinates
21
20
  """
22
- def __init__(self, bounds: Iterable, dtype: np.dtype) -> None:
21
+ def __init__(self, bounds: Iterable) -> None:
23
22
  super().__init__()
24
23
  self._bounds = np.asarray(bounds, dtype=float)
25
- self._dtype = dtype
26
24
 
27
25
  if len(self._bounds.shape) != 2 or self._bounds.shape[0] <= 1 or self._bounds.shape[1] != 2:
28
26
  raise ValueError(f"The shape of bounds must be (n, 2) (n>=2) instead of {self._bounds.shape}")
@@ -39,10 +37,6 @@ class BaseMap(ABC):
39
37
  def dim(self) -> int:
40
38
  return self._bounds.shape[0]
41
39
 
42
- @property
43
- def dtype(self) -> np.dtype:
44
- return self._dtype
45
-
46
40
  @abstractmethod
47
41
  def map_to_world(self, point: tuple) -> tuple:
48
42
  """