Repository navigation
根据现有函数代码更新REDME文件 #4491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
根据现有函数代码更新REDME文件 #4491
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
20e276a
更新代码
183899 91bf847
Merge branch 'OpenHUTB:main' into main
183899 08bccf0
Merge branch 'OpenHUTB:main' into main
183899 4a2ccc8
将原模块名更改为更加详细的名字
183899 da1e375
Merge branch 'OpenHUTB:main' into main
183899 1678aeb
Merge branch 'OpenHUTB:main' into main
183899 2b3e4b2
更新了控制器功能,增添了速度显示效果
183899 10f7798
Merge branch 'OpenHUTB:main' into main
183899 1f64807
补充并在原有的 drawer.py 中添加了 draw_point 方法
183899 b21c1f2
Merge branch 'OpenHUTB:main' into main
183899 cebf093
Merge branch 'OpenHUTB:main' into main
183899 417561d
添加新的转弯感知模块,修改main函数实现转弯时自主检测刹车
183899 ebbb588
Merge branch 'OpenHUTB:main' into main
183899 532b4ab
新增预测功能,提前预测转弯效果
183899 85832ac
更新了REDME.py文件
183899 05fd4e2
Merge branch 'OpenHUTB:main' into main
183899 26c0d0f
Merge branch 'OpenHUTB:main' into main
183899 94c1049
修改了config.py,解决了原先小车转弯半径过小导致的撞墙情况。
183899 3c2716d
Merge branch 'OpenHUTB:main' into main
183899 c9d9d49
新增测评功能,将车辆状态实时显示。
183899 94c1f2e
Merge branch 'OpenHUTB:main' into main
183899 57d483a
修改了函数代码,添加了航点导航功能
183899 9074aff
Merge branch 'OpenHUTB:main' into main
183899 17d53a4
根据现有代码修改REDME文件。
183899 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,110 @@ | ||
| 这是一个基于CARLA模拟器的主动式车道保持辅助系统项目,它就像一个虚拟的智能驾驶员,能够通过摄像头观察道路情况,自动控制方向盘使车辆稳定行驶在车道中心。 | ||
| readme.py - 项目说明文档 | ||
|
|
||
| 整个系统的运作始于一个摄像头,它安装在虚拟车辆的前方,持续捕捉前方的道路图像。这些彩色图像被送入一个视觉处理程序,首先将图像从常见的RGB色彩空间转换到HLS空间,这是因为车道线在这种色彩模式下更容易被识别。程序会过滤出白色和黄色的像素,这些能就是车道线。接着,通过一种叫做透视变换的技术,把图像转换成鸟瞰图,仿佛我们从天空俯视道路一样,这样能更准确地判断车道线的弯曲程度和车辆的位置。然后,系统采用滑动窗口的方法,从图像底部开始,像爬楼梯一样一层层向上寻找属于车道线的像素点,再用一条光滑的曲线去拟合这些点,从而得到两条清晰的车道边界。最后,计算出车辆中心点与这两条边界中心线的横向距离,这个距离就是车辆偏离车道中心的误差。 | ||
| 运行此文件查看完整项目说明 | ||
|
|
||
| 环境安装:python -m venv venv | ||
| README\_TEXT = """ | ||
|
|
||
| . venv/bin/activate | ||
| 一、项目概述 | ||
|
|
||
| pip install --upgrade pip | ||
| 这是一个基于Carla仿真平台和MPC控制器的自动驾驶系统,包含完整的驾驶评估 | ||
|
|
||
| pip install -r requirements.txt | ||
| 和导航功能。 | ||
|
|
||
| 结果:生成一辆小车,按照预定轨迹提前改变路径,实现控制预测与转弯。 | ||
| 二、主要功能 | ||
|
|
||
| 1\. MPC路径跟踪控制 | ||
|
|
||
| 2\. 智能速度控制(自动加速/刹车) | ||
|
|
||
| 3\. 驾驶评分系统(5个维度实时评分) | ||
|
|
||
| 4\. 碰撞预警系统 | ||
|
|
||
| 5\. 航点导航系统 | ||
|
|
||
| 6\. 完整的可视化界面 | ||
|
|
||
| 三、新增功能说明 | ||
|
|
||
| 1\. 航点导航系统 | ||
|
|
||
| - 实时跟踪车辆航点进度 | ||
|
|
||
| - 显示当前航点序号和距离 | ||
|
|
||
| - 航点进度条可视化 | ||
|
|
||
| - 屏幕顶部航点状态指示器 | ||
|
|
||
| 2\. 驾驶评分系统 | ||
|
|
||
| - 综合评分(0-100分,A/B/C/D等级) | ||
|
|
||
| - 五个评分维度:速度稳定性、转向平滑度、刹车使用、路径跟踪、安全性 | ||
|
|
||
| - 评分趋势图表 | ||
|
|
||
| 3\. 其他显示功能 | ||
|
|
||
| - 速度显示(带颜色编码) | ||
|
|
||
| - 刹车状态显示 | ||
|
|
||
| - 转向角度显示 | ||
|
|
||
| - 油门/刹车输入显示 | ||
|
|
||
| - 碰撞警告显示 | ||
|
|
||
| - 帧率信息显示 | ||
|
|
||
| 四、文件结构 | ||
|
|
||
| ├── config.py # 配置文件 | ||
|
|
||
| ├── main.py # 主程序(包含所有控制逻辑) | ||
|
|
||
| ├── drawer.py # 绘图显示模块 | ||
|
|
||
| ├── mpc.py # MPC控制器 | ||
|
|
||
| ├── readme.py # 项目说明文档 | ||
|
|
||
| └── requirements.txt # 依赖包列表 | ||
|
|
||
| 五、运行方法 | ||
|
|
||
| 1\. 启动Carla服务器:./CarlaUE4.sh | ||
|
|
||
| 2\. 运行项目:python main.py | ||
|
|
||
| 3\. 查看说明:python readme.py | ||
|
|
||
| 六、配置说明 | ||
|
|
||
| 在config.py中可以修改: | ||
|
|
||
| \- 服务器地址和地图 | ||
|
|
||
| \- 屏幕分辨率和帧率 | ||
|
|
||
| \- 相机视野角度 | ||
|
|
||
| 七、依赖包 | ||
|
|
||
| \- carla | ||
|
|
||
| \- pygame | ||
|
|
||
| \- numpy | ||
|
|
||
| \- scipy | ||
|
|
||
| """ | ||
|
|
||
|
|
||
|
|
||
| if \_\_name\_\_ == "\_\_main\_\_": | ||
|
|
||
| print(README\_TEXT) | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要渲染出来检查下是否显示正常