Repository navigation
无人车预防碰撞系统 - #3716
Merged
Merged
无人车预防碰撞系统#3716
Conversation
donghaiwang
approved these changes
Dec 18, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
修改概述:
人车预防碰撞系统。给无人车安装一个距离识别器,识别器可以测量无人车前面200米障碍物的距离。障碍物距离100到200米,系统显示距离安全,四个绿色的字。障碍物距离50到99米,系统显示“前方有障碍物,谨慎驾驶!”,这几个字用黄色的字表示。障碍物距离10到49米,系统显示请减速注意安全,几个红色的字。距离零到十米,系统显示请刹车三个红色的字
修改的详细描述
1.距离检测:使用 CARLA 的 Lidar 或 Camera + 目标检测,这里选择 Lidar(激光雷达),精度更高、适合测距场景。
2.阈值判断:根据检测到的最近障碍物距离,划分 4 个区间,匹配对应的提示信息和颜色。
3.可视化显示:通过 CARLA 的 DebugHelper 在仿真界面绘制文字,或结合 PyGame 做独立 UI 显示。
经过了什么样的测试?
1.CARLA 0.9.13 及以上版本
2.Python 3.7~3.9
3.carla Python 包(通过 pip install carla 安装)
运行效果
动图、视频、截图等
2025-12-18.195023.mp4