Repository navigation
完成基于 CarlaAir 与 ROS 的无人机视觉自主巡航防撞系统闭环 (#59)Drone imitation learning - #69
Merged
donghaiwang merged 1 commit intoSep 21, 2026
Merged
Conversation
donghaiwang
requested changes
Sep 20, 2026
tianyutu981
force-pushed
the
drone-imitation-learning
branch
from
September 20, 2026 08:44
bfa5b04 to
484f2c7
Compare
donghaiwang
approved these changes
Sep 21, 2026
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.
修改概述:
关联 Issue #59。基于 CarlaAir (UE4 + AirSim) 仿真环境与 ROS 架构,构建端到端视觉行为克隆(Imitation Learning)无人机自主巡航与防撞闭环。重构了通信桥接与推理控制直通管线,消除死锁门控,并引入线程锁根除底层并发崩溃,实现平稳巡航。
修改的详细描述
drone_ros_node.py):剔除冗余复杂的状态机与轮询逻辑,恢复轻量无状态直通;引入threading.Lock互斥锁,严格串行化前置相机图像抓取(simGetImages)与飞控速度下发(moveByVelocityAsync),根除底层 TCP 管道并发争抢导致的BufferError崩溃。drone_autonomous_node.py):剥离多层状态机、多余定时器与时间戳门禁,打通“图像输入 -> Tensor 预处理 -> 卷积网络推理 -> 速度即时发布”的极简闭环,实现单帧约 30ms 的高频低延迟反应式控制。docs/目录下同步添加实机自主巡航验证动图,并在说明文档中补充测试与部署流程。经过了什么样的测试?
python -m py_compile语法校验。/drone/front_camera/image_raw(10 Hz 推流)与/drone/cmd_vel控制指令收发畅通。运行效果(动图、视频、图片、链接等)
修改所对应的前后效果(代码/网页):
BufferError崩溃闪退;自主节点内多层状态标志位死锁,导致模型推理正常但速度无法下发,真机悬停僵死。所使用具体的大模型声明: Claude Code/Deepseek-flash