PythonRobotics is a comprehensive Python code collection and accompanying textbook focused on implementing robotics algorithms with an emphasis on clarity and practical applicability. The repository serves as both an educational resource and a reference implementation for students and practitioners working in robotics, autonomous navigation, and control systems. The project is maintained primarily by AtsushiSakai, who has logged 89 tracked events, with additional contributions from Aglargil and musabkas. The repository has attracted interest from developers working on related projects in scientific computing and machine learning, as evidenced by overlapping contributors with scipy, pytorch/ignite, and pytorch/pytorch repositories.
The codebase implements algorithms across six major robotics domains. Localization algorithms include Extended Kalman Filter localization, Particle Filter localization for sensor fusion, and Histogram Filter localization for 2D position estimation. The mapping section covers Gaussian grid mapping, ray casting grid mapping, LIDAR to grid map conversion, k-means object clustering, and rectangle fitting for vehicle detection. SLAM implementations include Iterative Closest Point matching using singular value decomposition and FastSLAM 1.0 for feature-based simultaneous localization and mapping.
Path planning represents the most extensive section, featuring Dynamic Window Approach for 2D navigation, grid-based search methods including Dijkstra and A* algorithms, D* and D* Lite algorithms for dynamic replanning, Potential Field algorithms, grid-based coverage path planning, Particle Swarm Optimization, State Lattice Planning with biased polar and lane sampling variants, Probabilistic Road-Map planning, multiple RRT variants including RRT*, RRT* with Reeds-Shepp paths, and LQR-RRT*, along with quintic polynomial planning, Reeds Shepp planning, LQR-based path planning, and optimal trajectory planning in Frenet frames.
Path tracking algorithms include move-to-pose control, Stanley control, rear wheel feedback control, Linear-Quadratic Regulator speed and steering control, Model Predictive Control, and Nonlinear Model Predictive Control with C-GMRES. The repository also covers specialized domains including N-joint arm control to point targets with obstacle avoidance, drone 3D trajectory following, rocket-powered landing, and bipedal locomotion planning with inverted pendulum models.
The project maintains strict dependencies on core scientific Python libraries: NumPy, SciPy, Matplotlib, and cvxpy. Development infrastructure includes pytest for unit testing, mypy for type checking, sphinx for documentation generation, and pycodestyle for code style enforcement. The repository runs continuous integration across Linux, macOS, and Windows platforms.
Community engagement shows a median issue and pull request response latency of 99.8 hours with a mean of 1240.2 hours across 50 tracked items. The most frequently used issue label is help wanted with 11 instances, followed by enhancement requests with 3 instances. The project emphasizes educational accessibility by designing code for easy comprehension of algorithmic fundamentals while selecting widely-used and practical algorithms. A comprehensive online textbook and animation GIF repository provide mathematical background and visual demonstrations of each algorithm's behavior.