Repository navigation
carla静态文本数据面板替换为实时动态折线统计图 - #4382
Merged
Merged
Conversation
donghaiwang
approved these changes
Dec 22, 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.
修改概述:
修改的详细描述
定义MAX_HISTORY = 50,只保存最近 50 帧的帧数、车辆数量、最大距离数据,避免数据过多导致图表卡顿。
每帧更新后截断缓存,保持固定长度,保证图表的实时性。
双折线展示:绿色折线代表实时车辆数量,红色折线代表最大距离。
坐标归一化:将数据映射到图表的像素坐标,适配不同的数值范围。
视觉优化:添加网格、数据点、图例、当前数值标注,让图表更易读。
标题和标注:显示图表名称、当前车辆数量和最大距离,信息更完整。
经过了什么样的测试?
运行效果
动图、视频、截图等


面板具体情况