ai-winter/python_motion_planning

Motion planning(Path Planning and Trajectory Planning/Tracking) of AGV/AMR:python implementation of Dijkstra, A*, JPS, D*, LPA*, D* Lite, (Lazy)Theta*, RRT, RRT*, RRT-Connect, Informed RRT*, Voronoi, PID, DWA, APF, LQR, MPC, RPP, Bezier, Dubins etc.

What it solves

This project tackles robot motion planning: computing a safe, conflict-free path from start to goal, then turning that path into a trajectory that respects the robot's kinematics and dynamics. It provides a suite of well-known algorithms for both path planning and trajectory optimization, plus controllers that keep a robot on the planned path.

How it works

The codebase is organized into modules: path_planner (graph search, sample search, hybrid search), controller (path trackers), traj_optimizer (curve generators), common (environment, robot, utilities, visualizer). It uses a grid-based world representation (2D and some 3D) and simulates robots. The visualizer is based on matplotlib. Controllers are tested with a toy physical simulator that supports two robot types: a circular omnidirectional robot and a differential-drive robot.

Who it's for

Robotics students, researchers, and hobbyists who want to experiment with classic motion planning algorithms, compare their behavior, and test controllers in a lightweight simulation environment. It's also useful as a reference implementation for algorithm details, and its ROS C++ and MATLAB counterparts make it a cross-language learning tool.

Highlights

  • Implements popular graph search planners (Dijkstra, A*, JPS, Theta*, Lazy Theta*), sample-based planners (RRT, RRT*, RRT-Connect), and a Voronoi hybrid planner
  • Provides path-tracking controllers (Pure Pursuit, PID, APF, DWA, RPP) with a 2D simulator
  • Includes trajectory optimizers (cubic spline, BSpline, polynomial, Bezier, Dubins, Reeds-Shepp)
  • Easy installation via pip install python-motion-planning and an online documentation with tutorials
  • Actively developed, with future plans for N-D controllers, robotic arm planning, and ROS2 support

Related

  • Project
  • Project
  • Project
  • Project