Introduction

April 12, 2026 · View on GitHub

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.

Motion planning plans the state sequence of the robot without conflict between the start and goal.

Motion planning mainly includes Path planning and Trajectory planning.

  • 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.
  • Trajectory planning: It plans the motion state to approach the global path based on kinematics, dynamics constraints and path sequence.

The theory analysis can be found at motion-planning.

We also provide ROS C++ version and Matlab version.

Your stars and forks are welcome!

Quick Start

Overview

The source file structure is shown below

python_motion_planning
├─common
|   ├─env
|   |   ├─map
|   |   ├─robot
|   |   └─world
|   ├─utils
|   └─visualizer
├─controller
|   └─path_tracker
├─path_planner
|   ├─graph_search
|   ├─sample_search
|   └─hybrid_search
└─traj_optimizer
    └─curve_generator

Install

(Optional) The code was tested in python=3.10, though other similar versions should also work. We recommend using conda to install the dependencies.

conda create -n pmp python=3.10
conda activate pmp

To install the repository, please run the following command in shell.

pip install python-motion-planning

Run

Please refer to the Tutorials part of online documentation.

Demos

Path Planner

Planner2D Grid3D Grid
Dijkstradijkstra_2d.svgdijkstra_3d.png
GBFSgbfs_2d.svggbfs_3d.png
A*a_star_2d.svga_star_3d.png
JPSjps_2d.svgjps_3d.png
Theta*theta_star_2d.svgtheta_star_3d.png
Lazy Theta*lazy_theta_star_2d.svglazy_theta_star_3d.png
D*Implemented in V1.1.1, not migratedNot implemented
LPA*Implemented in V1.1.1, not migratedNot implemented
D* LiteImplemented in V1.1.1, not migratedNot implemented
AnyaNot implementedNot implemented
Planner2D Grid3D Grid
RRTrrt_2d.svgrrt_3d.png
RRT*rrt_star_2d.svgrrt_star_3d.png
RRT-Connectrrt_connect_2d.svgrrt_connect_3d.png
Informed RRTImplemented in V1.1.1, not migratedNot implemented
PRMNot implementedNot implemented
Planner2D Grid3D Grid
ACOImplemented in V1.1.1, not migratedNot implemented
GAImplemented in V1.1.1, not migratedNot implemented
PSOImplemented in V1.1.1, not migratedNot implemented
Planner2D Grid3D Grid
Voronoi Plannervoronoi_planner_2d.svgvoronoi_planner_3d.png

Controller

We provide a toy simulator with simple physical simulation to test controllers (path-trakcers). The toy simulator supports multi-agents/multi-robots. The available robots include CircularRobot (Omnidirectional) and DiffDriveRobot (Only support moving forward and backward). Currently only 2D simulator is provided. 3D simulator has not been implemented.

In the following demos, the blue robot 1 is the CircularRobot, and the orange robot 2 is the DiffDriveRobot.

Controller2D3D
Path Trakcerpath_tracker_2d.gifNot implemented
Pure Pursuitpure_pursuit_2d.gifNot implemented
PIDpid_2d.gifNot implemented
APFapf_2d.gifNot implemented
DWAdwa_2d.gifNot implemented
RPPrpp_2d.gifNot implemented
LQRImplemented in V1.1.1, not migratedNot implemented
MPCImplemented in V1.1.1, not migratedNot implemented
MPPINot implementedNot implemented
TEBNot implementedNot implemented
LatticeNot implementedNot implemented
DQNNot implementedNot implemented
DDPGImplemented in V1.0, not migratedNot implemented

Trajectory Optimizer

Curve Generator

Point-based

Generator2D3D
Cubic Splinecubic_spline_2d.svgNot implemented
BSplinebspline_2d.svgNot implemented

Pose-based

Generator2D3D
Polynomiapolynomial_2d.svgNot implemented
Bezierbezier_2d.svgNot implemented
Dubinsdubins_2d.svgNot implemented
Reeds-Sheppreeds_shepp_2d.svgNot implemented

Future Works

  • N-D controllers (path-trackers).

  • Path planning for robotic arms.

  • Path planning on topological map.

  • Sample search with Dubins or Reeds-Shepp curves.

  • Application on ROS2.

  • Application in mainstream robot simulation environments (e.g. Gazebo, Carla, Airsim, PyBullet, MuJoCo, Issac Sim).

  • More mainstream motion planning algorithms.

  • Performance optimization.

Contributors are welcome! For trivial modification, please directly contribute to dev branch. For big modification, please contact us before you contribute.

Contact

Long-term maintainers:

You can contact us via the information provided on our profile.