31K ·GitHub
What is this?
PythonRobotics is a Python code collection and textbook of classic robotics algorithms, covering localization, mapping, SLAM, path planning, path tracking, arm navigation, aerial navigation, and bipedal control.
Is it a library I import, or a collection of standalone sample scripts?
It's a collection of standalone, runnable sample scripts organized by topic (one script per algorithm), not a pip-installable library.
How do I get it running?
Clone the repo, install the required libraries with conda or pip, then run the Python script in whichever algorithm's directory you want.
What do I need installed to run the examples?
Python 3.13.x plus NumPy, SciPy, Matplotlib, and cvxpy; extra dev tools like pytest, mypy, and sphinx are only needed for contributing.
Is this meant for production robots, or just for learning?
It's explicitly a minimal, easy-to-read teaching collection of widely used algorithms, not a production-grade robotics stack.
Where can I learn the math behind each algorithm, not just the code?
There is a full online textbook/documentation site covering mathematical backgrounds, plus a published paper and a YouTube overview video.
Do the examples produce visualizations?
Yes, most scripts generate animated matplotlib plots (e.g. robot trajectories, grid maps, search nodes), and animation GIFs are collected in a separate PythonRoboticsGifs repo.
What kind of path planning algorithms are included?
Dijkstra, A*, D*, D* Lite, Potential Field, RRT/RRT*, PRM, state lattice planning, Frenet frame optimal trajectories, and particle swarm optimization, among others.
Can I use this code for academic work?
Yes, the authors encourage citing their associated paper if you use the code in academic research.
What are similar projects?
openpilot, carla, apollo, autoware, Embodied-AI-Guide, Qwen-Drive-1.0, wuji-ego-mint, AirSim
Which topics is it in?
autonomous-driving, mapping, autonomous-vehicles, robot, algorithm, localization, robotics, computer-vision, animation, tutorial, hacktoberfest, education