11<h1 align =" center " >
2- Automated driving algorithms
2+ 自动驾驶算法
33</h1 >
44<p align =" center " >
5- Python codes for automated driving algorithms.
5+ 自动驾驶相关算法代码仓库, Python 语言版。
66</p >
77<p align =" center " >
8- English | <a href =" README_zh .md" >简体中文 </a >
8+ 简体中文 | <a href =" README_en .md" >English </a >
99</p >
1010
11- ## How to use
11+ [ ![ GitHub Repo stars] ( https://img.shields.io/github/stars/muziing/PythonAutomatedDriving )] ( https://github.com/muziing/PythonAutomatedDriving )
12+ ![ License] ( https://img.shields.io/github/license/muziing/PythonAutomatedDriving )
1213
13- ### 1. Get source code
14+ [ ![ Poetry] ( https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json )] ( https://python-poetry.org/ )
15+ [ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
16+ [ ![ Ruff] ( https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json )] ( https://github.com/astral-sh/ruff )
17+ [ ![ Checked with mypy] ( https://www.mypy-lang.org/static/mypy_badge.svg )] ( https://mypy-lang.org/ )
18+ [ ![ pre-commit.ci status] ( https://results.pre-commit.ci/badge/github/muziing/PythonAutomatedDriving/main.svg )] ( https://results.pre-commit.ci/latest/github/muziing/PythonAutomatedDriving/main )
1419
15- 1 . Add star to this repo if you like it :smiley :
16- 2 . Get source code by one of the following methods
17- - [ Download code zip] ( https://github.com/muziing/PythonAutomatedDriving/archive/refs/heads/main.zip )
18- - (For development only) clone repo ` git clone https://github.com/muziing/PythonAutomatedDriving.git `
19- 3 . Go to the project directory ` cd /your/path/to/PythonAutomatedDriving `
20+ ## 简介
2021
21- ### 2. Creating Virtual Environment and Install requirements
22+ 本代码仓库收录若干关于「自动驾驶-规划与控制算法」相关的代码,全部由 Python 语言实现。希望能为其他 PnC 算法学习者提供一批接口清晰统一、可直接复用的代码段,避免减少重复造轮子。
2223
23- ** Option A ** : venv & pip
24+ ## 如何使用
2425
25- 1 . Ensure that the Python version matches the one required in [ pyproject.toml] ( ./pyproject.toml ) .
26- 2 . Create virtual environment
26+ ### 一、获取源码
27+
28+ 1 . Star 本仓库 :smiley :
29+ 2 . 通过以下方式之一获取源码:
30+ - 下载代码压缩包:< https://github.com/muziing/PythonAutomatedDriving/archive/refs/heads/main.zip >
31+ - (仅需要参与开发时)克隆仓库 ` git clone https://github.com/muziing/PythonAutomatedDriving.git `
32+ 3 . 进入项目目录 ` cd /your/path/to/PythonAutomatedDriving `
33+
34+ ### 二、配置虚拟环境与安装依赖
35+
36+ ** 方式 A** : venv 与 pip
37+
38+ 1 . 确保 Python 版本与 [ pyproject.toml] ( ./pyproject.toml ) 中要求的一致
39+ 2 . 创建虚拟环境
2740 - Windows: ` python -m venv --upgrade-deps venv `
2841 - Linux/macOS: ` python3 -m venv --upgrade-deps venv `
29- 3 . Activate virtual environment
42+ 3 . 激活虚拟环境
3043 - Windows: ` venv\Scripts\activate `
3144 - Linux/macOS: ` . venv/bin/activate `
32- 4 . Install the requirements ` pip install -r requirements.txt `
45+ 4 . 安装依赖 ` pip install -r requirements.txt `
46+
47+ ** 方式 B** :[ Poetry] ( https://python-poetry.org )
3348
34- ** Option B** : [ Poetry] ( https://python-poetry.org )
49+ 1 . 确保 Python 版本与 [ pyproject.toml] ( ./pyproject.toml ) 中要求的一致
50+ 2 . 按[ 官方文档] ( https://python-poetry.org/docs/#installation ) 指示安装 Poetry
51+ 3 . 创建虚拟环境:` poetry env use /full/path/to/python ` (注意替换路径,使用符合版本要求的解释器)
52+ 4 . 安装依赖:` poetry install --no-dev `
53+ 5 . 使用该虚拟环境: ` poetry shell ` (或在 PyCharm 等 IDE 中配置)
3554
36- 1 . Make sure the Python version is the same as required in [ pyproject.toml] ( ./pyproject.toml ) .
37- 2 . Install Poetry as instructed in the [ official documentation] ( https://python-poetry.org/docs/#installation ) .
38- 3 . Create a virtual environment: ` poetry env use /full/path/to/python `
39- 4 . Install dependencies: ` poetry install --no-dev `
40- 5 . Use the virtual environment: ` poetry shell ` (or configure it in an IDE like PyCharm).
55+ ** 方式 C** :[ Anaconda] ( https://www.anaconda.com/ )
4156
42- ** Option C ** : [ Anaconda ] ( https://www.anaconda. com/ )
57+ 由于主要开发与测试工作仅在 Poetry 环境中进行,conda 环境可能出现意料之外的错误。请 [ 提交 issue ] ( https://github. com/muziing/PythonAutomatedDriving/issues ) 帮助我发现和解决这些问题。
4358
4459```` shell
4560conda env create -f environment.yml
4661````
4762
48- ### 3. Run!
63+ ### 三、运行!
4964
50- Execute Python script in each directory.
65+ 在每个子项目目录中运行 Python 脚本。
5166
52- ## Table of Contents
67+ ## 目录
5368
54- ### [ AuxiliaryFunctions ] ( AuxiliaryFunctions )
69+ ### [ utilities ] ( src/utilities ) 辅助函数
5570
56- - [ curvature] ( AuxiliaryFunctions/curvature.py ) calculate curvature
71+ - [ coordinate_transformation] ( src/utilities/coordinate_transformation.py ) - 坐标变换
72+ - [ discrete_curve_funcs] ( src/utilities/discrete_curve_funcs.py ) - 处理二维离散曲线的函数
73+ - [ numpy_additional_funcs] ( src/utilities/numpy_additional_funcs.py ) - 一些补充numpy功能的自实现函数
5774
58- ### [ LocalPathPlanning] ( LocalPathPlanning )
75+ ### [ LocalPathPlanning] ( src/ LocalPathPlanning) - 局部路径规划
5976
60- - [ FSAE Path Planning] ( LocalPathPlanning/FSAE_PathPlanning ) 适用于 FSAE 无人赛车高速循迹项目的路径规划算法
77+ - [ FSAE Path Planning] ( src/ LocalPathPlanning/FSAE_PathPlanning) - 一种适用于 FSAE 无人赛车高速循迹项目的路径规划算法
6178
62- ## License
79+ ## 许可协议
6380
6481```` text
6582Copyright 2022-2023 muzing
@@ -68,7 +85,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
6885you may not use this file except in compliance with the License.
6986You may obtain a copy of the License at
7087
71- http ://www.apache.org/licenses/LICENSE-2.0
88+ https ://www.apache.org/licenses/LICENSE-2.0
7289
7390Unless required by applicable law or agreed to in writing, software
7491distributed under the License is distributed on an "AS IS" BASIS,
0 commit comments