<img src="https://github.com/AtsushiSakai/PythonRobotics/raw/master/icon.png?raw=true" align="right" width="300" alt="header pic"/>
# PythonRobotics
![GitHub_Action_Linux_CI](https://github.com/AtsushiSakai/PythonRobotics/workflows/Linux_CI/badge.svg)
![GitHub_Action_MacOS_CI](https://github.com/AtsushiSakai/PythonRobotics/workflows/MacOS_CI/badge.svg)
![GitHub_Action_Windows_CI](https://github.com/AtsushiSakai/PythonRobotics/workflows/Windows_CI/badge.svg)
[![Build status](https://ci.appveyor.com/api/projects/status/sb279kxuv1be391g?svg=true)](https://ci.appveyor.com/project/AtsushiSakai/pythonrobotics)
[![codecov](https://codecov.io/gh/AtsushiSakai/PythonRobotics/branch/master/graph/badge.svg)](https://codecov.io/gh/AtsushiSakai/PythonRobotics)
Python codes for robotics algorithm.
# Table of Contents
* [What is this?](#what-is-this)
* [Requirements](#requirements)
* [Documentation](#documentation)
* [How to use](#how-to-use)
* [Localization](#localization)
* [Extended Kalman Filter localization](#extended-kalman-filter-localization)
* [Particle filter localization](#particle-filter-localization)
* [Histogram filter localization](#histogram-filter-localization)
* [Mapping](#mapping)
* [Gaussian grid map](#gaussian-grid-map)
* [Ray casting grid map](#ray-casting-grid-map)
* [Lidar to grid map](#lidar-to-grid-map)
* [k-means object clustering](#k-means-object-clustering)
* [Rectangle fitting](#rectangle-fitting)
* [SLAM](#slam)
* [Iterative Closest Point (ICP) Matching](#iterative-closest-point-icp-matching)
* [FastSLAM 1.0](#fastslam-10)
* [Path Planning](#path-planning)
* [Dynamic Window Approach](#dynamic-window-approach)
* [Grid based search](#grid-based-search)
* [Dijkstra algorithm](#dijkstra-algorithm)
* [A* algorithm](#a-algorithm)
* [D* algorithm](#d-algorithm)
* [D* Lite algorithm](#d-lite-algorithm)
* [Potential Field algorithm](#potential-field-algorithm)
* [Grid based coverage path planning](#grid-based-coverage-path-planning)
* [State Lattice Planning](#state-lattice-planning)
* [Biased polar sampling](#biased-polar-sampling)
* [Lane sampling](#lane-sampling)
* [Probabilistic Road-Map (PRM) planning](#probabilistic-road-map-prm-planning)
* [Rapidly-Exploring Random Trees (RRT)](#rapidly-exploring-random-trees-rrt)
* [RRT*](#rrt)
* [RRT* with reeds-shepp path](#rrt-with-reeds-shepp-path)
* [LQR-RRT*](#lqr-rrt)
* [Quintic polynomials planning](#quintic-polynomials-planning)
* [Reeds Shepp planning](#reeds-shepp-planning)
* [LQR based path planning](#lqr-based-path-planning)
* [Optimal Trajectory in a Frenet Frame](#optimal-trajectory-in-a-frenet-frame)
* [Path Tracking](#path-tracking)
* [move to a pose control](#move-to-a-pose-control)
* [Stanley control](#stanley-control)
* [Rear wheel feedback control](#rear-wheel-feedback-control)
* [Linear–quadratic regulator (LQR) speed and steering control](#linearquadratic-regulator-lqr-speed-and-steering-control)
* [Model predictive speed and steering control](#model-predictive-speed-and-steering-control)
* [Nonlinear Model predictive control with C-GMRES](#nonlinear-model-predictive-control-with-c-gmres)
* [Arm Navigation](#arm-navigation)
* [N joint arm to point control](#n-joint-arm-to-point-control)
* [Arm navigation with obstacle avoidance](#arm-navigation-with-obstacle-avoidance)
* [Aerial Navigation](#aerial-navigation)
* [drone 3d trajectory following](#drone-3d-trajectory-following)
* [rocket powered landing](#rocket-powered-landing)
* [Bipedal](#bipedal)
* [bipedal planner with inverted pendulum](#bipedal-planner-with-inverted-pendulum)
* [License](#license)
* [Use-case](#use-case)
* [Contribution](#contribution)
* [Citing](#citing)
* [Support](#support)
* [Sponsors](#sponsors)
* [JetBrains](#JetBrains)
* [1Password](#1password)
* [Authors](#authors)
# What is this?
This is a Python code collection of robotics algorithms.
Features:
1. Easy to read for understanding each algorithm's basic idea.
2. Widely used and practical algorithms are selected.
3. Minimum dependency.
See this paper for more details:
- [\[1808\.10703\] PythonRobotics: a Python code collection of robotics algorithms](https://arxiv.org/abs/1808.10703) ([BibTeX](https://github.com/AtsushiSakai/PythonRoboticsPaper/blob/master/python_robotics.bib))
# Requirements
For running each sample code:
- [Python 3.12.x](https://www.python.org/)
- [NumPy](https://numpy.org/)
- [SciPy](https://scipy.org/)
- [Matplotlib](https://matplotlib.org/)
- [cvxpy](https://www.cvxpy.org/)
For development:
- [pytest](https://pytest.org/) (for unit tests)
- [pytest-xdist](https://pypi.org/project/pytest-xdist/) (for parallel unit tests)
- [mypy](http://mypy-lang.org/) (for type check)
- [sphinx](https://www.sphinx-doc.org/) (for document generation)
- [pycodestyle](https://pypi.org/project/pycodestyle/) (for code style check)
# Documentation
This README only shows some examples of this project.
If you are interested in other examples or mathematical backgrounds of each algorithm,
You can check the full documentation online: [Welcome to PythonRobotics’s documentation\! — PythonRobotics documentation](https://atsushisakai.github.io/PythonRobotics/index.html)
All animation gifs are stored here: [AtsushiSakai/PythonRoboticsGifs: Animation gifs of PythonRobotics](https://github.com/AtsushiSakai/PythonRoboticsGifs)
# How to use
1. Clone this repo.
```terminal
git clone https://github.com/AtsushiSakai/PythonRobotics.git
```
2. Install the required libraries.
- using conda :
```terminal
conda env create -f requirements/environment.yml
```
- using pip :
```terminal
pip install -r requirements/requirements.txt
```
3. Execute python script in each directory.
4. Add star to this repo if you like it :smiley:.
# Localization
## Extended Kalman Filter localization
<img src="https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Localization/extended_kalman_filter/animation.gif" width="640" alt="EKF pic">
Ref:
- [documentation](https://atsushisakai.github.io/PythonRobotics/modules/localization/extended_kalman_filter_localization_files/extended_kalman_filter_localization.html)
## Particle filter localization
![2](https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Localization/particle_filter/animation.gif)
This is a sensor fusion localization with Particle Filter(PF).
The blue line is true trajectory, the black line is dead reckoning trajectory,
and the red line is an estimated trajectory with PF.
It is assumed that the robot can measure a distance from landmarks (RFID).
These measurements are used for PF localization.
Ref:
- [PROBABILISTIC ROBOTICS](http://www.probabilistic-robotics.org/)
## Histogram filter localization
![3](https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Localization/histogram_filter/animation.gif)
This is a 2D localization example with Histogram filter.
The red cross is true position, black points are RFID positions.
The blue grid shows a position probability of histogram filter.
In this simulation, x,y are unknown, yaw is known.
The filter integrates speed input and range observations from RFID for localization.
Initial position is not needed.
Ref:
- [PROBABILISTIC ROBOTICS](http://www.probabilistic-robotics.org/)
# Mapping
## Gaussian grid map
This is a 2D Gaussian grid mapping example.
![2](https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Mapping/gaussian_grid_map/animation.gif)
## Ray casting grid map
This is a 2D ray casting grid mapping example.
![2](https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Mapping/raycasting_gr
没有合适的资源?快使用搜索试试~ 我知道了~
机器人算法的 Python 示例代码源码大全
共452个文件
py:228个
png:106个
rst:78个
需积分: 5 2 下载量 46 浏览量
2024-05-17
16:12:15
上传
评论 1
收藏 11.42MB ZIP 举报
温馨提示
机器人算法在现代科技领域中发挥着重要作用,而Python作为一种灵活且易于学习的编程语言,被广泛用于机器人领域的算法开发。以下是关于机器人算法的Python示例代码源码大全的资源描述: 源码内容: 1. **运动规划算法**:包括常见的路径规划算法,如A*、Dijkstra、RRT等,以及运动轨迹规划算法,如贝塞尔曲线、样条曲线等。 2. **感知和定位算法**:包括机器人的感知和定位算法,如SLAM(Simultaneous Localization and Mapping)、KF(Kalman Filter)等。 3. **机器人控制算法**:包括机器人的运动控制和姿态控制算法,如PID控制器、模型预测控制(MPC)等。 4. **机器学习和深度学习算法**:包括在机器人领域中常用的机器学习和深度学习算法,如神经网络、强化学习、卷积神经网络(CNN)等。 5. **仿真和模拟算法**:包括机器人仿真和模拟的相关算法和工具,如ROS(Robot Operating System)、Gazebo等。
资源推荐
资源详情
资源评论
收起资源包目录
机器人算法的 Python 示例代码源码大全 (452个子文件)
make.bat 818B
custom.css 520B
lookup_table.csv 9KB
lidar01.csv 4KB
input_INTEL.g2o 211KB
Graph_SLAM_optimization.gif 112KB
.gitignore 850B
.gitkeep 0B
layout.html 541B
mypy.ini 36B
dubins_path.jpg 22KB
RSR.jpg 10KB
RLR.jpg 10KB
LICENSE 1KB
Makefile 611B
README.md 23KB
users_comments.md 13KB
CODE_OF_CONDUCT.md 3KB
CONTRIBUTING.md 787B
pull_request_template.md 743B
bug_report.md 506B
README.md 460B
SECURITY.md 309B
Kalmanfilter_basics_2_5_0.png 1.04MB
step2.png 777KB
step3.png 773KB
icon.png 528KB
LR_LR.png 373KB
grid_map_example.png 372KB
LSR90_L.png 332KB
L_R90SL90_R.png 328KB
L_RL_R.png 315KB
step0.png 315KB
L_R90SL.png 309KB
LSL90xR.png 295KB
L_R90SR.png 285KB
step1.png 283KB
ransac_normal_vector_estimation.png 276KB
LR_L.png 273KB
L_RL.png 271KB
L_R_L.png 265KB
Figure_1.png 259KB
poisson_disk_sampling.png 259KB
LSR.png 251KB
farthest_point_sampling.png 247KB
voxel_point_sampling.png 245KB
figure_1.png 240KB
LSL.png 234KB
2.png 193KB
lidar_to_grid_map_tutorial_5_0.png 119KB
rrt_star_1_0.png 117KB
ekf_slam_1_0.png 111KB
extended_kalman_filter_localization_1_0.png 110KB
3.png 97KB
normal_vector_calc.png 94KB
basis_functions.png 69KB
figure_1.png 60KB
Figure_4.png 59KB
Figure_2.png 58KB
1.png 56KB
Figure_3.png 52KB
graphSLAM_SE2_example_4_0.png 51KB
doc_ci.png 51KB
4.png 50KB
graphSLAM_SE2_example_9_0.png 48KB
spline_continuity.png 47KB
FastSLAM1_1_0.png 43KB
approx_and_curvature.png 43KB
lookup_table.png 41KB
ekf_with_velocity_correction_1_0.png 39KB
Kalmanfilter_basics_22_0.png 38KB
interp_and_curvature.png 36KB
bspline_path_planning.png 34KB
cgmres_nmpc_2_0.png 33KB
Figure_1.png 32KB
curvature_plot.png 32KB
grid_clustering.png 32KB
graphSLAM_SE2_example_13_0.png 32KB
Figure_5.png 32KB
Figure_2.png 31KB
Figure_5.png 31KB
graphSLAM_SE2_example_8_0.png 30KB
cgmres_nmpc_3_0.png 30KB
graphSLAM_SE2_example_15_0.png 29KB
graphSLAM_SE2_example_16_0.png 29KB
approximation1.png 28KB
cubic_spline_2d_path.png 28KB
interpolation1.png 27KB
Figure_4.png 26KB
Figure_3.png 26KB
Figure_6.png 25KB
cubic_spline_2d_yaw.png 25KB
cgmres_nmpc_4_0.png 25KB
cubic_spline_1d.png 25KB
ndt_map1.png 23KB
spline.png 22KB
ndt_map2.png 21KB
Figure_1.png 21KB
cubic_spline_2d_curvature.png 21KB
cgmres_nmpc_1_0.png 19KB
共 452 条
- 1
- 2
- 3
- 4
- 5
资源评论
编程资源宝库
- 粉丝: 4028
- 资源: 2545
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 脉冲注入法,持续注入,启动低速运行过程中注入,电感法,ipd,力矩保持,无霍尔无感方案,媲美有霍尔效果 bldc控制器方案,无刷电机 提供源码,原理图
- Matlab Simulink#直驱永磁风电机组并网仿真模型 基于永磁直驱式风机并网仿真模型 采用背靠背双PWM变流器,先整流,再逆变 不仅实现电机侧的有功、无功功率的解耦控制和转速调节,而且能实
- 157389节奏盒子地狱模式第三阶段7.apk
- 操作系统实验ucore lab3
- DG储能选址定容模型matlab 程序采用改进粒子群算法,考虑时序性得到分布式和储能的选址定容模型,程序运行可靠 这段程序是一个改进的粒子群算法,主要用于解决电力系统中的优化问题 下面我将对程序进行详
- final_work_job1(1).sql
- 区块链与联邦学习结合:FedChain项目详细复现指南
- 西门子S7 和 S7 Plus 协议开发示例
- 模块化多电平变流器 MMC 的VSG控制 同步发电机控制 MATLAB–Simulink仿真模型 5电平三相MMC,采用VSG控制 受端接可编辑三相交流源,直流侧接无穷大电源提供调频能量 设置频率
- 基于小程序的智慧校园管理系统源代码(java+小程序+mysql+LW).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功