Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tello Video Stream #2

Open
imsuneaik opened this issue Apr 9, 2020 · 2 comments
Open

Tello Video Stream #2

imsuneaik opened this issue Apr 9, 2020 · 2 comments

Comments

@imsuneaik
Copy link

imsuneaik commented Apr 9, 2020

Hi Dennis, I am currently following ur steps provided on youtube to create drone swarming for the TelloEdu drones.

I have drones connected to an external router as access point and the respective addresses are 192.168.0.101 and 102. However I was trying to enable the opencv module to display video streaming capabilities for one drone first before moving on to another. But it just wouldnt show any stream or response.

`import cv2
#telloVideo = cv2.VideoCapture("udp://@0.0.0.0:11111)" #
#telloVideo = cv2.VideoCapture("udp://@192.168.0.101:8889")

wait for frame

ret = False

scale down

scale = 3
while(True):
# Capture frame-by-framestreamon
ret, frame = telloVideo.read()
if(ret):
# Our operations on the frame come here
height , width , layers = frame.shape
new_h=int(height/scale)
new_w=int(width/scale)
resize = cv2.resize(frame, (new_w, new_h)) # <- resize for improved performance
# Display the resulting frame
cv2.imshow('Tello',resize)

if cv2.waitKey(1) & 0xFF == ord('s'):
    cv2.imwrite("test.jpg",resize) # writes image test.bmp to disk
    print("Take Picture")

if cv2.waitKey(1) & 0xFF == ord('q'):
    break

When everything done, release the capture

telloVideo.release()
cv2.destroyAllWindows()`

@dbaldwin
Copy link
Owner

dbaldwin commented Apr 9, 2020

Hi, we looked into this in the past and kept running into dead ends. From my understanding it's not possible when Tello is in "station" mode. This post talks about it some more:

https://tellopilots.com/threads/station-mode-and-sockets.2668/

If the Raspberry Pi option (one Pi per drone) let me know. We could certainly help you get up and running that way.

@imsuneaik
Copy link
Author

Thanks dbladwin, I will look into reading the link as you have provided. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants