Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

Tello Drone Swarm

Wow....thank you!
Man I'm at a crux..
I've been playing with:

DroneBlocks/Scratch
GoBot
and now Python....

I think I gotta pick one and stick with a language! I'm leaning towards python.
On the bright side, it is exciting to see so much SDK development so quickly with this drone.
And my favorite language, Ruby, as well: blacktm/tello
 
Last edited:
Your code is very inspiring and enables multi-drone control. But I try to implement more complex functions, such as tracking moving objects, which requires obtaining recieving and processing onboard video from two tellos. But I always only get one at a time. I wonder if you are willing to share the correct code of this? Thanks.
 
A dumb question but I'm very much confused with what's the name of my Network interface. Need help I did type ipconfig/all and got a whole list of stuff but couldn't find the N/W interface name
Hello, I am also trying to connect to the tello drone in windows through the python code but I have not had any success. Could you tell me how to solve this project if you have solved it?
 
What i really don't understand is why have a fixed ip and not let you be able too configure your own.
 
Hello i plan to do a drone swarm with tello drones.

All tello drones have address (192.168.10.1, 8889), how can i change the second tello's to say 192.168.10.2 ?

Note: We are using multiple USB wifi adapters to connect to all the drones we have.

EDIT: It is possible to create a drone swarm using multiple Wifi usb adapters. Video:
Hi, nice project!
I am going to plan a swarm of 3 tello drones with 3 wifi adapters. i understand your code but my problem is how to connect to 3 tello? you said we need to be connected to all drones. i cant do that before running the python code!. actually when the first tello is connected to wifi adapter number 1, and then i try to connect to tello 2 with wifi adapter number 2, the first connection will be lost automatically. what should i do?
 
Hello i plan to do a drone swarm with tello drones.

All tello drones have address (192.168.10.1, 8889), how can i change the second tello's to say 192.168.10.2 ?

Note: We are using multiple USB wifi adapters to connect to all the drones we have.

EDIT: It is possible to create a drone swarm using multiple Wifi usb adapters. Video:
hello there
is there any way to do it using windows 10?
please contact me on [email protected]

or

+923072463387 whattsapp
 
I am also carrying out a mission using the Tello drone about drone swarm. Many people are developing on Linux, but we want to use it on Windows.
When Python has coded as mentioned above, it is difficult to set the name of the network devices.
How should I name my network devices in Windows?

Python:
# This example script demonstrates how use Python to create custom flight behaviors with Tello
# This script is part of our course on Tello drone programming
# https://learn.droneblocks.io/p/tello-drone-programming-with-python/

# Import the necessary modules
import socket
import threading
import time

# IP and port of Tello
tello_address1 = ('192.168.10.1', 8889)
tello_address2 = ('192.168.10.1', 8889)

# IP and port of local computer
local_address1 = ('', 9000)
local_address2 = ('', 9000)

# Create a UDP connection that we'll send the command to
sock1 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock1.setsockopt(socket.SOL_SOCKET, 25, 'wlan0')
sock2 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock2.setsockopt(socket.SOL_SOCKET, 25, 'wlp2s0')

# Bind to the local address and port
sock1.bind(local_address1)

# Send the message to Tello and allow for a delay in seconds
def send(message, delay):
  # Try to send the message otherwise print the exception
  try:
    sock1.sendto(message.encode(), tello_address1)
    sock2.sendto(message.encode(), tello_address2)
    print("Sending message: " + message)
  except Exception as e:
    print("Error sending: " + str(e))

  # Delay for a user-defined period of time
  time.sleep(delay)

# Receive the message from Tello
def receive():
  # Continuously loop and listen for incoming messages
  while True:
    # Try to receive the message otherwise print the exception
    try:
      response, ip_address1 = sock1.recvfrom(128)
      response, ip_address2 = sock2.recvfrom(128)
      print("Received message: " + response.decode(encoding='utf-8'))
    except Exception as e:
      # If there's an error close the socket and break out of the loop
      sock1.close()
      sock2.close()
      print("Error receiving: " + str(e))
      break

# Create and start a listening thread that runs in the background
# This utilizes our receive functions and will continuously monitor for incoming messages
receiveThread = threading.Thread(target=receive)
receiveThread.daemon = True
receiveThread.start()

def command():
  send("command", 3)
# Initiate command mode and takeoff
def takeoff():
  send("takeoff", 5)

# Land
def land():
  send("land", 5)

# Tello commands respond with an OK when sucessful. This means Tello recognizes
# the command, but the instruction hasn't completed. OK is Tello saying "I got
# the message" but not necessarily saying "I completed the command"
# This means we need to calculate how long the spin will take before we execute the next command.
# Based on our tests a single 360 rotation takes 7 seconds. We'll use this in our spin function to delay
# before the next command. Your rotation time may vary. You can calculate this by
# sending a "cw 360" or "ccw 360" command and measuring the rotation time.

# 7 seconds per rotation
rotationTime = 7

# Spin right or left X number of times
def spin(direction, times):
  # One rotation is 360 degrees
  oneRotation = 360

  # Convert the number of rotations to degrees
  rotations = oneRotation * times

  # Calculate the delay to let the spin function complete
  delay = rotationTime * times

  # Spin right (cw) or left (ccw)
  if (direction == "right"):
    send("cw " + str(rotations), delay)
  elif (direction == "left"):
    send("ccw " + str(rotations), delay)

# Use 20 cm/sec as vertical speed
verticalSpeed = 20.0

def bounce(distance, times):

  bounceDelay = distance/verticalSpeed

  for i in range(times):
    send("down " + str(distance), bounceDelay)
    send("up " + str(distance), bounceDelay)
   
command()
# Takeoff
takeoff()

# Spin right 2 times
#spin("right", 2)

# Bounce up and down 60 cm and repeat 3 times
#bounce(60, 3)

# Spin left 3 times
#spin("left", 3)

# Land
land()

# Close the socket
sock1.close()
sock2.close()
did this work?
 
Very intrresting indeed! Swarm with tegular Tellos and multiple WiFi networks like this:
Tello-1 <--- WiFi-1 <---\
| control center, issuing commands
Tello-N <--- WiFi-N <---/
Cn
Very intrresting indeed! Swarm with tegular Tellos and multiple WiFi networks like this:
Tello-1 <--- WiFi-1 <---\
| control center, issuing commands
Tello-N <--- WiFi-N <---/
Can you please guide me further from scratch like a tutorial video or any thing and can you please share your code on github
 
A dumb question but I'm very much confused with what's the name of my Network interface. Need help I did type ipconfig/all and got a whole list of stuff but couldn't find the N/W interface name
hey, did you figure out how to know which one is the N/W interface name?
 

Members online

Forum statistics

Threads
5,695
Messages
39,954
Members
17,052
Latest member
Madrid