Repository navigation
无人车温度调节系统 - #3711
Merged
Merged
无人车温度调节系统#3711
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.
修改概述:
无人车温度调节系统,给无人车安装一个,可测量零下50度到50度温度计,温度在零下50度到25度,系统显示“温度过低,是否需要打开空调?”这一段双引号里面的话,并且这一段话要用蓝色显示。温度为26度时,系统显示“温度适宜”四个绿色的字。温度为26度到50度,系统显示“温度过高,是否需要打开空调?”这一段双引号里面的话,并且这一段话要用红色显示
修改的详细描述
1.温度模拟:由于 CARLA 本身没有内置温度传感器,我们通过随机数或手动设置的方式模拟 -50℃ ~ 50℃ 的温度数据。
2.逻辑判断:根据温度区间划分 3 种状态,对应不同的文本和颜色。
3.可视化显示:使用 CARLA 的 debug.draw_string() 接口在无人车上方绘制彩色文本。
经过了什么样的测试?
启动 CARLA 模拟器:打开终端,进入 CARLA 安装目录,执行
1.bash运行./CarlaUE4.sh
2.运行 Python 脚本:确保已安装carla包(pip install carla),执行代码。
3.观察效果:在 CARLA 可视化窗口中,无人车车顶会显示对应温度的彩色文本。
运行效果
动图、视频、截图等
2025-12-18.194059.mp4