Mike
Mike

Reputation: 21

Dji Tello EDU | Swarm with Video

I'm new into this and i want to control 2 Tello EDUs in swarm. I tried couple of things that worked for one not in swarm but crashed in swarm (i think I did something in bad way) and I can't figure out Video Stream in swarm. I would be thankful for help with it.

I am using DJITelloPy library from GitHub. Controlling for one drone I did from this YouTube tutorial. I also tried control in example of DJITelloPy but also doesn't work.

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)

This should just connect to them on the network (by their IPs) and run Image capture. I don't think it is the right way. Can someone help me? I'm running out of ideas.

Upvotes: 1

Views: 2244

Answers (2)

Dr Yuan Shenghai
Dr Yuan Shenghai

Reputation: 1915

Tello AP mode by default can not run in a swarm manner. Tello Station mode only allows you to control drone position, the image feed are all crash at port 11111 which makes the image unavailable in this case.

If you are trying to control multiple drones with Computer vision (CV) based method, The answer is AP mode with IPforwarding / Prerouting. It's slightly more complicated and requires tons of hands-on trial and error.

Me and my student made it work as shown on the youtube channel. https://www.youtube.com/watch?v=24dJXXGyvAI&ab_channel=JiaNingSoh.

enter image description here enter image description here

You may refer to this technical report for details. https://github.com/snakehaihai/Tello_formation_and_visual_control/blob/master/Technical%20Report.pdf . The key command and instructions are all in the appendix section

enter image description here Sample applications enter image description here Sample commands

My FYP student has layout most of the key works such as making all of them running in a centralized swarm manner with DJI internal position control. I handle most of the CV and SLAM part

I`m still working on putting down the code and instructions in the same GitHub space to make it easy for people to use it. But I do also have many other project work. Teaching is only a small part of the job. So, it might take a little bit longer time :) cheers

Regards

Dr. Yuan Shenghai

Upvotes: 0

Tobias
Tobias

Reputation: 903

Unfortunately this won't work.

After setting every Tello in station mode with ap ssid pass there is no image and video capturing possible any more.

This is a technical limitation of the Tello we all hope will be resolved someday.

Please see https://github.com/dji-sdk/Tello-Python/issues/25

Upvotes: 2

Related Questions