Open-source project
AtsushiSakai/PythonRobotics avatar
AtsushiSakai/PythonRobotics

PythonRobotics: a teaching codebase for robotics algorithms, not a runtime library

Python sample codes and textbook for robotics algorithms.

30,518 stars7,407 forksPythonNOASSERTION

At a glance

What is it?
PythonRobotics is a collection of standalone Python sample scripts plus a companion online textbook, covering localization, mapping, SLAM, path planning, path tracking, arm, aerial and bipedal examples. Its value is pedagogical clarity under minimal dependencies; it is not packaged as an installable library with a stable API.
Who is it for?
Adopt PythonRobotics if you are learning a specific algorithm and want to read its implementation next to a textbook chapter, or if you need a reference implementation to port into your own stack. Do not adopt it if you need an installable package with a versioned API, since the README describes cloning the repository and running scripts inside each directory, and the repository lists no releases.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap PythonRobotics fills is comprehension, not deployment

Most robotics algorithm descriptions live in papers, and most production implementations live inside large frameworks where the algorithm is entangled with message passing, threading and hardware drivers. PythonRobotics takes the opposite position. The README states three features: the code is meant to be easy to read for understanding each algorithm's basic idea, widely used and practical algorithms are selected, and dependencies are kept to a minimum. The material supports that claim in a narrow sense. Each algorithm is a script under its own directory, and the README says to execute the Python script in each directory rather than import a package. The audience is therefore a student, a researcher, or an engineer who wants to see how an extended Kalman filter, an RRT variant or a Stanley controller is actually written in a few hundred lines of NumPy. It is a textbook with runnable figures, not a component you drop into a robot.

What the table of contents actually covers

The README's table of contents is the most useful specification of scope. Localization includes extended Kalman filter, particle filter and histogram filter localization. Mapping includes Gaussian grid map, ray casting grid map, lidar to grid map, k-means object clustering and rectangle fitting. SLAM includes iterative closest point matching and FastSLAM 1.0. Path planning is the largest group: dynamic window approach, Dijkstra, A*, D*, D* Lite, potential field, grid based coverage planning, particle swarm optimization, state lattice planning with biased polar and lane sampling, probabilistic road maps, RRT with RRT*, RRT* with reeds-shepp path and LQR-RRT*, quintic polynomials, reeds shepp planning, LQR based path planning, and optimal trajectory in a Frenet frame. Path tracking covers move to a pose, Stanley, rear wheel feedback, LQR and model predictive speed and steering control, plus nonlinear model predictive control with C-GMRES. Arm navigation, aerial navigation with drone 3D trajectory following and rocket powered landing, and a bipedal planner with inverted pendulum round out the list. Breadth is real, but depth per algorithm is deliberately limited to what fits a readable script.

How the code is organised and how data moves through a sample

The repository layout described in the material is flat and topic based: one directory per algorithm family, one script per algorithm, with the README's table of contents mirroring the directory names. The data flow implied by that structure is simple. A script constructs a simulated world (a map, a set of landmarks, a vehicle model), runs the algorithm over a fixed number of simulation steps, and renders the result with Matplotlib. Animation GIFs are not stored in this repository; the README points to a separate repository, AtsushiSakai/PythonRoboticsGifs, for all animation GIFs. That separation matters if you are browsing: the images embedded in the README are loaded from that second repository. There is no documented plugin interface, no configuration file format, and no declared public API. Each script is self contained, which is what makes it readable and also what makes it non-composable.

Getting a sample running, and the dependency set it pulls in

The README gives four steps. Clone the repository with git clone https://github.com/AtsushiSakai/PythonRobotics.git. Install the required libraries either with conda env create -f requirements/environment.yml or with pip install -r requirements/requirements.txt. Then execute the Python script in each directory. The runtime requirements listed are Python 3.13.x, NumPy, SciPy, Matplotlib and cvxpy. Development requirements are pytest, pytest-xdist for parallel unit tests, mypy for type checking, sphinx for document generation, and pycodestyle for code style checks. The presence of continuous integration badges for Linux, MacOS and Windows plus an AppVeyor badge indicates the samples are exercised on those platforms, though the README does not state what the CI jobs assert. Note that cvxpy is a convex optimisation modelling layer, so it is only relevant to the samples that formulate optimisation problems; installing the full requirements file brings it in regardless of which script you intend to read.

The limitation: scripts, not a library, and no releases

The single most important constraint is that PythonRobotics is not distributed as an importable package. The README instructs you to clone the repository and run scripts in place. There is no pip install command for the project itself in the material, and no retrieved releases, so there is no version number to pin against and no changelog to diff between upgrades. That has two consequences. First, if you copy an algorithm into your own codebase, you own it from that moment; upstream changes will not reach you and there is no deprecation path to warn you. Second, the scripts are written for demonstration, not for real time control loops. Simulation parameters, step counts and plotting calls are interleaved with the algorithm, so extracting a clean function usually means rewriting the surrounding scaffold. The README's own framing supports this reading: it describes the repository as Python codes and a textbook for robotics algorithm, and the documentation as the place to look for mathematical backgrounds.

Where a packaged alternative wins instead

If you need a maintained, installable implementation with a versioned API, the appropriate comparison is a robotics framework with released packages, such as ROS 2 navigation components or a dedicated planning library, rather than another teaching repository. The difference in approach is structural. PythonRobotics gives you one file per algorithm with simulated inputs and Matplotlib output, which is ideal for reading the mathematics in code. A framework gives you an algorithm behind an interface, with message types, parameters loaded from configuration, lifecycle management and tested integration with sensors, at the cost of the algorithm being harder to see. Neither substitutes for the other. A reasonable pattern is to read the PythonRobotics script to understand the method, then implement or configure the method inside the framework you actually deploy, using the script as a specification of the update equations rather than as code to ship.

Maintenance, licence and upgrade posture

The repository is not archived and the last push recorded in the metadata is 2026-09-07, so it is active. The primary language is Python, and the README lists Python 3.13.x as the runtime, which means following the project requires keeping pace with Python releases and with NumPy, SciPy, Matplotlib and cvxpy. Because there are no retrieved releases, upgrading means pulling the master branch and re-reading the scripts you depend on; there is no semantic versioning signal to tell you whether a change is breaking. The licence field reports NOASSERTION, which in practice means the automated classifier could not map the repository's licence file to a known identifier. That is not the same as having no licence, and it is not the same as a permissive licence. If you intend to copy code, read the LICENSE file at the repository root yourself and confirm the terms before you rely on them. This is a description of what the metadata says, not legal advice.

Who this is for, and the first thing to check

Use PythonRobotics when the goal is understanding. A course, a paper reproduction, a design review where you need to argue about how D* Lite backs up costs, or an interview preparation session on model predictive speed and steering control all fit. The companion textbook at atsushisakai.github.io/PythonRobotics is the intended entry point for the mathematics, and the paper at arXiv 1808.10703 is cited in the README for more detail. Skip it when the goal is shipping: there is no package to install, no release to pin, and no API contract to depend on. The first thing to verify before you commit to it is the licence file, because the metadata will not answer that question for you, and the second is whether the specific algorithm you need is in the table of contents at all, since the selection is described as widely used and practical rather than exhaustive.

Editorial conclusion

Adopt PythonRobotics if you are learning a specific algorithm and want to read its implementation next to a textbook chapter, or if you need a reference implementation to port into your own stack. Do not adopt it if you need an installable package with a versioned API, since the README describes cloning the repository and running scripts inside each directory, and the repository lists no releases. Before depending on any file, check the licence situation: the repository metadata reports NOASSERTION, so read the LICENSE file at the repository root yourself and confirm the terms with whoever owns the code you are copying.

Official sources

  1. AtsushiSakai/PythonRobotics on GitHub
  2. Issues
  3. Project website
  4. README
Community notes

Community notes