Repository navigation
无人车油表,油表显示数字 - #3593
Merged
Merged
无人车油表,油表显示数字#3593
Conversation
donghaiwang
approved these changes
Dec 18, 2025
xiaoshiyuan888
pushed a commit
to xiaoshiyuan888/nn
that referenced
this pull request
Dec 18, 2025
* 554455 * 554455 * 554455 * 554455
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.
修改概述:
无人车油表,油表显示数字,有一百个数字,油量七十到一百油表的数字显示为绿色,二十到六十九数字显示为黄色,三到十九数字显示为红色,零到2显示油量不足四个字
修改的详细描述
2.油表逻辑设计:
油量范围:0-100(数字显示)
颜色区间:70-100 绿色、20-69 黄色、3-19 红色
特殊提示:0-2 显示 “油量不足”
3.可视化界面:绘制油表背景、数字 / 提示文本、油量进度条
经过了什么样的测试?
1.获取 Carla 车辆对象:通过world.get_actors()找到目标车辆
2.读取油量属性:车辆需设置fuel_level属性(可通过 Carla 蓝图添加自定义属性)
3.替换模拟数据函数:将get_carla_fuel_data中的随机数逻辑替换为实际的 Carla API 调用,获取车辆的实时油量数据
运行效果
动图、视频、截图等
。
2025-12-18.130438.mp4