Skip to main content

Introduction

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

Planner 2D Grid 3D Grid
Dijkstra dijkstra_2d.svg dijkstra_3d.png
GBFS gbfs_2d.svg gbfs_3d.png
A* a_star_2d.svg a_star_3d.png
JPS jps_2d.svg jps_3d.png
Theta* theta_star_2d.svg theta_star_3d.png
Lazy Theta* lazy_theta_star_2d.svg lazy_theta_star_3d.png
D* Implemented in V1.1.1, not migrated Not implemented
LPA* Implemented in V1.1.1, not migrated Not implemented
D* Lite Implemented in V1.1.1, not migrated Not implemented
Anya Not implemented Not implemented
Planner 2D Grid 3D Grid
RRT rrt_2d.svg rrt_3d.png
RRT* rrt_star_2d.svg rrt_star_3d.png
RRT-Connect rrt_connect_2d.svg rrt_connect_3d.png
Informed RRT Implemented in V1.1.1, not migrated Not implemented
PRM Not implemented Not implemented
Planner 2D Grid 3D Grid
ACO Implemented in V1.1.1, not migrated Not implemented
GA Implemented in V1.1.1, not migrated Not implemented
PSO Implemented in V1.1.1, not migrated Not implemented
Planner 2D Grid 3D Grid
Voronoi Planner voronoi_planner_2d.svg voronoi_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.

Controller 2D 3D
Path Trakcer path_tracker_2d.gif Not implemented
Pure Pursuit pure_pursuit_2d.gif Not implemented
PID pid_2d.gif Not implemented
APF apf_2d.gif Not implemented
DWA dwa_2d.gif Not implemented
RPP rpp_2d.gif Not implemented
LQR Implemented in V1.1.1, not migrated Not implemented
MPC Implemented in V1.1.1, not migrated Not implemented
MPPI Not implemented Not implemented
TEB Not implemented Not implemented
Lattice Not implemented Not implemented
DQN Not implemented Not implemented
DDPG Implemented in V1.0, not migrated Not implemented

Trajectory Optimizer

Curve Generator

Point-based

Generator 2D 3D
Cubic Spline cubic_spline_2d.svg Not implemented
BSpline bspline_2d.svg Not implemented

Pose-based

Generator 2D 3D
Polynomia polynomial_2d.svg Not implemented
Bezier bezier_2d.svg Not implemented
Dubins dubins_2d.svg Not implemented
Reeds-Shepp reeds_shepp_2d.svg Not 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.

Release files for python-motion-planning 2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-motion-planning 2.1
File Size Uploaded
python_motion_planning-2.1.tar.gz 100.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-motion-planning 2.1
File Interpreter ABI Platform
python_motion_planning-2.1-py3-none-any.whl Python 3 none any Details

Total release size: 219.3 kB

Release files / python_motion_planning-2.1.tar.gz

Download URL python_motion_planning-2.1.tar.gz
Size 100.6 kB
Tags Source
SHA-256 checksum
How to use checksums
41820af41d77af956d17d65a02fea640793f87d33d23762af26afaaec03d0ca0
BLAKE2b-256 checksum
How to use checksums
ecc02a7530139e16d4aee62f3730bd6dcd476cbae2b7101d0b57bff214fdb816
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.15

Release files / python_motion_planning-2.1-py3-none-any.whl

Download URL python_motion_planning-2.1-py3-none-any.whl
Size 118.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da35417665aabcf5b4360664b546c901a4f274bebd2076b29068c4d655435e41
BLAKE2b-256 checksum
How to use checksums
ad88e48c7f9cb03080f2fa3a3097ecc8e3ea5a4cd53ff9ddcc7df36310de3f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.15

Release history Release notifications | RSS feed

This release

2.1 This release

2 release files

2.0.1

2 release files

2.0

2 release files

1.1.1

2 release files

1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page