Repository navigation
给无人机测试脚本添加可视化窗口 - #3786
Merged
Merged
给无人机测试脚本添加可视化窗口#3786
Conversation
donghaiwang
approved these changes
Dec 19, 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.
修改概述:
修正物理仿真时钟同步 针对无人机“原地抽搐”和“出生即撞毁”的问题,将仿真环境的时钟速度强制锁定为 1.0。这一修改消除了因物理计算步长与渲染帧率不匹配导致的物理穿模现象,确保了碰撞检测的准确性,使无人机能够正常生成并悬停。
校准动作空间映射逻辑 为了防止未来的控制错乱,对推理脚本中的动作解码部分进行了逻辑核查。重点排查神经网络输出向量 [x, y, z, w] 与底层飞控指令 [Roll, Pitch, Yaw, Throttle] 之间的对应关系,确保推理阶段的通道顺序与训练阶段完全一致,防止将前进/后退的指令错误映射为旋转指令。
规范推理循环的时间步进 在推理主循环中引入了与仿真环境同步的步进控制。确保每次 model.predict() 后,脚本会等待仿真环境完成物理演算并返回新的状态,而不是以超高频向无人机发送重复指令,从而保证飞行姿态的平滑过渡,避免因指令堆积造成的机身抖动。
经过了什么样的测试?
运行效果
动图、视频、截图等
55.mp4