Repolode
AtsushiSakai

AtsushiSakai/PythonRobotics

A Python code collection and textbook of robotics algorithms covering localization, mapping, SLAM, path planning and control.

Stars
30,754
Forks
7,422
Open issues
64
Last commit
2 days ago

What is it?

PythonRobotics is a collection of Python sample implementations of widely used robotics algorithms, paired with an online textbook that explains the mathematical background of each one. The project is aimed at making the core ideas readable: each sample is kept simple so a reader can follow the basic logic of an algorithm rather than a production-grade implementation.

The code is organized by problem area. Localization includes Extended Kalman Filter, particle filter and histogram filter examples, while mapping covers grid maps, lidar-to-grid conversion and k-means clustering. Other sections include ICP matching and FastSLAM 1.0 for SLAM, many path planners such as A*, Dijkstra, RRT variants, PRM and Frenet-frame trajectories, and path tracking controllers like Stanley, LQR and model predictive control. Arm navigation, quadrotor trajectory following, rocket landing and a bipedal footstep planner are also included.

Each sample is a 2D or simplified simulation that produces an animation. The project requires Python 3.13 with NumPy, SciPy, Matplotlib and cvxpy, and can be installed with conda or pip.

Key features

  • 01Covers localization, mapping, SLAM, path planning, path tracking and control.
  • 02Includes EKF, particle filter, A*, Dijkstra, RRT, Stanley and MPC examples.
  • 03Each sample is written for readability and produces an animated simulation.
  • 04Accompanied by an online textbook explaining the math behind each algorithm.
  • 05Requires only a few common Python libraries such as NumPy, SciPy and Matplotlib.

Use cases

  • Learning how a robotics algorithm works before implementing it in a larger system.
  • Prototyping a path planner or path tracking controller in simulation.
  • Teaching undergraduate or graduate robotics courses with runnable examples.
  • Comparing the behavior of several localization or SLAM methods on the same scenario.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/AtsushiSakai/PythonRobotics.git
  2. 2

    Install the required libraries with pip

    pip install -r requirements/requirements.txt
  3. 3

    Run any Python sample script in its directory

Things to know

  • Requires Python 3.13.x for running the sample code.
  • Contains educational sample code rather than a packaged library or production-ready robotics stack.
  • License is listed as NOASSERTION, so check the repository's license file before reuse.

Topics

FAQ

What is PythonRobotics?
A Python code collection and textbook of robotics algorithms covering localization, mapping, SLAM, path planning and control. PythonRobotics is a collection of Python sample implementations of widely used robotics algorithms, paired with an online textbook that explains the mathematical background of each one. The project is aimed at making the core ideas readable: each sample is kept simple so a reader can follow the basic logic of an algorithm rather than a production-grade implementation.
Is PythonRobotics free to use? What license does it have?
PythonRobotics is open source under the Other license. Check the license terms before using it in commercial products.
Is PythonRobotics still maintained?
Actively maintained. The last commit to PythonRobotics was on Oct 19, 2026.
What can I use PythonRobotics for?
Learning how a robotics algorithm works before implementing it in a larger system. Prototyping a path planner or path tracking controller in simulation. Teaching undergraduate or graduate robotics courses with runnable examples. Comparing the behavior of several localization or SLAM methods on the same scenario.
How do I install PythonRobotics?
Clone the repository: git clone https://github.com/AtsushiSakai/PythonRobotics.git Install the required libraries with pip: pip install -r requirements/requirements.txt Run any Python sample script in its directory
Where can I get PythonRobotics?
The source code and installation instructions are on GitHub: https://github.com/AtsushiSakai/PythonRobotics

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects