百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

Automatic-Parking

> 编程语言
开源

Python 在虚拟环境中实现自动并列停车系统,包括路径规划、路径跟踪和并列停车

389 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

Python 在虚拟环境中实现自动并列停车系统,包括路径规划、路径跟踪和并列停车

Automatic Parallel Parking: Path Planning, Path Tracking & Control

This repository contains a python implementation of an automatic parallel parking system in a virtual environment that includes path planning, path tracking, and parallel parking. The agent navigates its route through the environment and is directed to the assigned park location by the MPC controller. You can find the article on Towards Data Science.

Envroinment

The first step to develop an auto park system is to design and develop an environment capable of giving visual render using OpenCV library. The environment is implemented in environment.py as a class and receives obstacles at the beginning env = Environment(obs). The agent can be placed using env.render(x,y,angle). A sample of the environment is displayed below. You can choose the parking spot from 1 to 24.

Path Planning

A* Algorithm

The agent will find a path from start to its goal using A*. This implementation of A* from PythonRobotics considers parameters like obstacles and robot radius.

Interpolating Path With B-spline

After finding a path in a discrete 100*100 space, the path is smoothed and scaled to 1000*1000 space of environment using b-spline. The result is a set of points to guide our agent!

Path Tracking

The kinematic model of the car is:

math
\left\{\begin{matrix}
\dot{x} = v . cos(ψ)\\
\dot{y} = v . sin(ψ)\\
\dot{v} = a\\
\dot{ψ} = v . tan(δ)/L
\end{matrix}\right.

a: acceleration, δ: steering angle, ψ: yaw angle, L: wheelbase, x: x-position, y: y-position, v: velocity

The state vector is:

math
z=[x,y,v,ψ]

x: x-position, y: y-position, v: velocity, ψ: yaw angle

The input vector is:

math
u=[a,δ]

a: acceleration, δ: steering angle

Control

The MPC controller controls vehicle speed and steering based on the model and the car is directed through the path. There is an option for using the linearized model for MPC. In this case MPC linearizes the kinematic model around the operating point and then does the optimization.

Parallel Parking

This part consists of 4 rules that the agent must choose according to parking position. At first, the agent will find a path to park position then it will compute the arriving angle. Based on the arriving angle, the agent chooses a coordinate as ensure1. After that, the parking path is planned from ensure1 to ensure2 using 2 circle equations as mentioned below. MPC controls the agent and car parks in ensure2 coordinate.

Inference

Run the code using this command:

$ python main_autopark.py --x_start 0 --y_start 90 --psi_start 0 --parking 7

Citation

About Us

We as Team Pandas won 1st place in the National Rahneshan competition 2020-2021 for autonomous vehicles. This contest has been one of the most competitive and challenging contests in the Rahneshan tournaments with more than 15 teams competing from top universities in Iran.

Contact

Feel free to contact us via email or connect with us on linkedin.

  • Amirhossein Heydarian --- Linkedin, Github, Email
  • Aida Mohammadshahi --- Linkedin, Github, Email
  • Milad Soltany --- Linkedin, Github , Email
  • Omid Omidi --- Linkedin, Github, Email
  • Amirhossein Kazerooni --- Linkedin, Github, Email

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python2d-environmentautomatic-parkingautonomous-drivingautonomous-parking

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言