Dji Tello EDU |视频群

问题描述

我是新手,我想在群中控制 2 个 Tello EDU。我尝试了几件事情,这些东西不是在 swarm 中工作的,而是在 swarm 中崩溃了(我认为我做了一些不好的事情)并且我无法弄清楚 swarm 中的 Video Stream。 我将不胜感激。

我正在使用来自 GitHub 的 DJITelloPy 库。 我从这个 YouTube tutorial 控制了一架无人机。我也在 DJITelloPy 的例子中尝试过控制,但也不起作用。

from djitellopy import TelloSwarm
import cv2

swarm = TelloSwarm.fromIps([
    "10.0.0.125","10.0.0.126"
])

swarm.connect()
for tello in swarm:
        print(tello.get_battery())

swarm.streamon()

while True:
    img = {}
    for tello in swarm:
        img[i] = tello.get_frame_read().frame

    
    for i in img:
        img[i] = cv2.resize(img[i],(360,240))
        cv2.imshow("Image",img[i])
        cv2.waitKey(1)

这应该只是在网络上连接到他们(通过他们的 IP)并运行图像捕获。我不认为这是正确的方法。有人能帮我吗?我的想法快用完了。

解决方法

不幸的是,这行不通。

在使用 ap ssid pass 将每个 Tello 设置为电台模式后,无法再进行图像和视频捕获。

这是我们都希望有一天能解决 Tello 的技术限制。

请参阅https://github.com/dji-sdk/Tello-Python/issues/25

,

Tello AP 模式默认不能以 swarm 方式运行。 Tello Station模式只允许您控制无人机位置,图像馈送均在11111端口崩溃,因此在这种情况下图像不可用。

如果您尝试使用基于计算机视觉 (CV) 的方法控制多架无人机,答案是具有 IPforwarding/Prerouting 的 AP 模式。它稍微复杂一些,需要大量的动手试错。

我和我的学生使它如 youtube 频道所示那样工作。 https://www.youtube.com/watch?v=24dJXXGyvAI&ab_channel=JiaNingSoh

enter image description here enter image description here

您可以参考这份技术报告了解详情。 https://github.com/snakehaihai/Tello_formation_and_visual_control/blob/master/Technical%20Report.pdf。 关键命令和说明都在附录部分

enter image description here 示例应用程序 enter image description here 示例命令

我的 FYP 学生已经布局了大部分关键工作,例如通过 DJI 内部位置控制使所有这些工作以集中的集群方式运行。我负责大部分 CV 和 SLAM 部分

我仍在努力将代码和说明放在同一个 GitHub 空间中,以方便人们使用。但我也有很多其他的项目工作。教学只是工作的一小部分。所以,可能需要更长的时间:) 欢呼

问候

博士袁盛海