Easy Programming of Tello Drone | Python OpenCV Object Tracking
Vložit
- čas přidán 16. 07. 2024
- In this video, we will learn how to program a drone to move around using python. We will also learn how to get the camera feed from this drone and run OpenCV functions on it. As an example, we will detect an object and make the drone follow it around.
🚀🚀 My Urdu/Hindi AI CZcams Channel 🚀🚀
/ @murtazahassan01
Code & Text Based Version:
www.computervision.zone/cours...
Face Tracking with Tello Drone:
• Drone Face Tracking PID
Videos Mentioned in the Video:
Joining Images: • Joining Multiple Image...
Color Detection: • Realtime Color Detecti...
Contours: • Real time Shape Detect...
Premium Courses:
✔️ Computer Vision Game Development Course:
bit.ly/3ttLZ2s
✔️ Computer Vision with Arduino Course:
bit.ly/3wzLB4m
✔️ Advanced Drone Programming Course:
bit.ly/3qs3v5g
✔️ Learn to Build Computer Vision Mobile Apps:
bit.ly/3uioY1J
✔️ Jetson Nano Premium Course:
bit.ly/3L8uIlF
⚙️⚙️⚙️--My Gear - ⚙️⚙️⚙️
👉 Complete Gear 💈: www.computervision.zone/tech-...
👉 My PC Specs 🖥️: www.computervision.zone/tech-...
👉 My Video Shooting Gear📽️ : www.computervision.zone/tech-...
👉 My Laptops 💻: www.computervision.zone/tech-...
👉 Educational Products🧑🎓: www.computervision.zone/tech-...
👉 CZcams Starter Kit 🔴: www.computervision.zone/tech-...
Follow Me:
TikTok: bit.ly/3Vo76OQ
Facebook Group: bit.ly/3irDcb7
Discord: bit.ly/3JvyxAM
Facebook Page: bit.ly/3IvpU7W
Instagram : bit.ly/3NdGME3
Website: bit.ly/3ICFTS0
Github: bit.ly/3woU6PS
#ComputerVision
#OpenCV
#CVZone
Thank You for sharing you intellect with us!
This is awesome! I needed to see this video. I am teaching some boys I mentor this very thing. Thanks for sharing.
I am glad i could help .
Great content! Three questions: If I attach the object which is being tracked to my body, would the drone follow me or just pan around? What would be necessary to make the drone follow me without being dependent on a laptop nearby? For example if I want the drone to follow me for 50 or 100 meters?
thanks for sharing, your projects are awesome!
Glad you like them!
Hi Murtaza, awesome video! What do you suggest OpenCV can do when it comes to collision detection/avoidance, can object detection be extended to long objects like walls or should I be looking at wall detection with contours?
Awesome project, congrats! Quick question ... do you happen to know if you can access the live feed from the camera in the mobile app and in the laptop simultaneously?
Thanks!
Great Video! Thanks!
Awesome !!!
thankyou sir it is really helpful.
perfect!!!
Amazing sample ! I pick up part of your code and build a face follower drone :D
Nice!
Please share it with us too!!
Does anyone know where I can find the cv2 file
@@vaishaldeva7246 pip install opencv-python or pip3 install opencv-python
Hi, I have a quick newbie question.
If I have a surface like a table and I want to mark an object on it like a sticker using a camera above the table and give my drone coordinates to that location and ask it to hover directly on top of it, how accurate would the drone be? Can it stay at that spot for a couple seconds without problem or would it sway a bit?
It's a closed room with no wind or anything
its so easy to understand that i can click 1000 likes for you.the way u describe it is awesome and anyone in the world can understand it.
Thank you for your kind words. I am glad it helped.
Nice descriptive video!! But I have some doubts regarding dialation and blur. Why do we use that, we can detect our object without that too right?
Interesting Video, keep the good work Friend
Thank you . Appreciate your support
I just finished this project and it would’ve been nice to have seen this video before 😭
if you found the solution your self then that is the best way to learn
Hello Murtaza; thanks for your amazing job.
I wanted to ask you if i can have this program and other program like face recognition at the same time in my drone?
Thanks from france
Hello Murtaza, It was damn gud, and so as all other vids too, just a small doubt is the wheel image given as an input? and the drone follows wherever the wheel is being moved if could you plz tell me how the wheel is given as an input? please
Wow.........
Excellent..!! Can u do open CV code for quadrapod spider robot
I like it
Ty
Is there any way, ports or stuff, to add additional component? like extra servo etc? Or even maybe a communication protocol port so that we can add rpi zero to communicate with it, while adding extra component to the rpi. Is it possible?
Hello Murtaza, thanks for the masterclass!
Can this tutorial be applied to DJI Mini 2? I mean the part related with the wifi connetion, SDK, libraries and code, etc... of course not counting with the speed, time and those parameters. Thank you
The DJI mini 2 is a cinematic drone, and can’t be programmed via python. The Tello is basically a toy education drone which is mainly for purposes like this
@@SirensAndAlarmsOfNorthernIL There is no python sdk, but there should be iOS SDK czcams.com/video/QxjI22hnHBs/video.html
Do I need to get a Tello EDU edition or can you run python on either version?
hey Murtaza.
this video ist very helpful
thank you
Thank you . Appreciate your support
can you help me apply object detection on some videos
hi do you have a tutorial for things like.. how do you setup and communicate with the drone to begin with.. here you are already in code view.
Great job sir, really clear and professional. Is it possible to send data from Tello drone to an online database ?
Thanks again for video. Subbed
This would be a little tricky since the tello is connected to pc via wifi.
Is it possible to move the dron based on GPS latitude longitude as the destination?
Hey, great video, very useful! I just have one question. What if I want to move the drone not using the velocity commands? Are the others commands the followings: m.move_right(x), m.move_up(x), m.move_down(x), m.move_forward(x), m.move_backward(x), m.rotate_counterclockwise(x)?
I hope you answer, thanks a lot!
yes you can use those too.
How hard would it be to code a drone to run besides a row of lights and count them/ check if they are lit up?
I never thought that i can make this
great work buddy! That's what I've been looking for. I have already subscribed, because I believe I will be a frequent guest on your channel
I was actually planning to buy a tello drone, but I was having hard time deciding which one should I buy - standard Tello drone or Tello EDU. Everyone says that in order to program it with python (as I want to), I would need to have Tello EDU, but in your video I can see that you are using standard Tello drone (correct me if I'm wrong).
I only found out, that Tello EDU has newer SDK, mission pads and supports swarm flying, but I don't really care for those. I only want to write some code in python, that Tello can understand. Can it be done with plain Tello drone?
Welcome aboard. Regarding tello i have been using tello standard and it seems to be enough for most cases.
can you help me apply object detection on some videos
hi, I am doing this tutorial and am having issues with the basic flight commands after the start counter, the drone takes off but just hovers or fly's off in one direction and on the command line I see the error "error Not Joystick" can't seem to find a solution if you have one let me know, thanks. as a side note I am getting a pink flashing light and can't seem to find a light code for it or seen anyone else with it if you know what it means?
Thanks for your channel. Where may I find some tutorials on tello edu programming with Python?
hi i am customizing my own drone can somebody tell me which sensor is used to communicate the drone with open cv?how drone is recognizig the gestures and reacting?which sensor is used?please help
Hi, thank you for the excellent video really liked it and I have doubt about the Tello drone do we have to install the separate pkg for connecting it through the internet?
you just connect the pc wifi to tello and run the rest.
Hi! I followed your tutorial but I have encountered a problem. You see, I get error while decoding MB bytestream when reading frames from the camera. Do you have any idea how I could fix this problem? thank you very much
Any idea how this could be done using the Mavic Air drone? Would it just be a variation of me = Tello(), such as me = Air(), i cant find code like this anywhere
Wats the difference between ryzen and edu series? I would like to program using python n thinking of getting a ryzen. Pls advise. Thx
Good afternoon. Is this dji ryze tello? Is there a difference between dji tello and dji tello edu?
How Can we make a Tensorflow Obstacle Avoiding Car?
hey , i have a question.....can we use this program to program a diy drone? or what should a drone have to properly run this code?
4:46 pls help bro...it says b'unknown Command!' For both streamon and streamoff
you probably need to update your firmware.
those commands were added in newer versions.
Hi Murtaza, what shall i do if i dont want delay on my videostream?
Does anyone know where I can download the cv2 file?
this drone can transport the light product??
Which software where and how to use complete tutorial in drone and swan drone
hi, may i know the block diagram of this tello line follower ?
Existe alguna diferencia entre un dijo Tello y un dji Tello edu ?
Hello pls help will the code work on any drones ?
thanks much but ı have a some problem when ı copy the code, like AttributeError: 'NoneType' object has no attribute 'copy', ı use ubuntu and python3
You need to enlarge print size to 20 and change mouse size to large and change to bright color.
Hi Sir, I am planning to purchase DJI Tello Nano Drone. Will this works with your open CV code. Kindly suggest
do you have any videos on streaming live with drone camera to your LAPTOP please ? What WIFI module is more suitable for live streaming to LAPTOP- ( note no IOS platforms such as iPhone or tablet ) it is pure only laptop streaming .
hello sir i have a question about Color Detection code i take and error line 126, in
imgContour = img.copy()
AttributeError: 'NoneType' object has no attribute 'copy' i want to make same thing with my laptop s own camera and write VideoCapture(0) what should i do pls help me
so great!!!!
hi murtaza.
i have one question.
i have a team. we want to coding a tello drone. but
I don't use scratch programs and I don't know if I should code.
so
There is one question here.... just Need another program to grab Wi-Fi and put code? we find to coding method.
i am not sure if i understood your question . If you are asking about the hardware. Only tello is required along with a pc or laptop. The laptop and Tello will be connected together with wifi. No external wifi required
Hi - I am getting the following error: objc[80110]: Class RunLoopModeTracker is implemented in both /Users/me/opt/anaconda3/lib/python3.7/site-packages/cv2/.dylibs/QtCore (0x1079527f0) and /Users/me/opt/anaconda3/lib/libQt5Core.5.9.7.dylib (0x11b86ba80). One of the two will be used. Which one is undefined.
Seems there is a clash between an anaconda file and a cv2 file. Have tried uninstalling cv2 but no luck. Any idea how to solve this?
Hi Murtaza, is it possible to get the GPS position of the Tellodrone via a command?
The drone have no GPS. So it is probably not possible to get GPS coordinates.
How to upload that in drone
Thanks for the video! Is it possible to have the drone on standby, and when it sees the object it flies and starts tracking it? All the best.
It should be possible. The limitation is just the battery of the drone. The computer or must be turned on and connected to the drone. The drone must be also turned on.
Can I use any drone for this?
hi i'm from Argentina ,has it the course in spanish?
Hello thank you for the great video. I can’t get video feed when I run the code. There is the battery reading though. Do you have to install the h264 decoder? Thank you
I assume you do after reading dji-sdk tello-python on GitHub
Hi Murtaza I am getting error:
non-existing PPS 0 referenced. Windows and iOs
The code sttoped in "img = frame_read = me.get_frame_read()"
Why it happen?
The same happen here :(
me too
I had the same problem
Yes, I have the same problem
Help us pleaseee
Pro
this can apply any drone?
is it normal Tello? or Tello EDU?
You think this drone can be used for collision avoidance( using AI and cameras ) on a controlled environent ?
Almost certainly, yes.
Though it's certainly not the best for this, since it's only monocular vision
Hi I have a question, can this be used to track object and stream video real time? Thank you!
Yes
Traceback (most recent call last):
File "C:/Users/muril/PycharmProjects/OpenCVtest/test.py", line 30, in
img = cv2.resize(myFrame, (width, height))
cv2.error: OpenCV(4.3.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-uytdgzj9\opencv\modules\imgproc\src
esize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
it appears to me after a while, and the program exits right after
the same error ocurred on mine
Me too
The same happen here ooooooww
Help us please!!
Some one kwnow how to resolve this problem?
great ! can we use a router to connect computer and tello ? instead of direct wifi
The router must have client mode.
SIR regarding the connecting my Tello to wifi, i didn't see connected its just saying like open.. Or I'm going to see connected? But when i used mobile phone its easily connected but with my laptop I'm still having problem in connecting with TELLO... Please i need your help
nice job
I would like to know how to add the djitello library to the python
thanks ♥
just import it form the setting - project interpreter
My tello drone keeps moving to the left even though I'm not commanding it to do anything. How can I stop this?
Where can i get the code
Hey, Murtaza's! Love your show, man, it's awesome! But hey, I got a question for you. So, here's the thing: when I load the camera with PyCharm, we end up looking like Smurfs, you know what I mean? Like, the pink color turns all bluish, just like those little blue guys. Can you help me out with this issue? I'd really appreciate it, dude. Thanks a ton!
can ANYBODY help me apply object detection on some videos
Hi Murtaza, is there a way i can reach you personally? I would like to ask some questions about a project i'm working on or should i just type my questions here? I hope you see this
you can contact me on my fb page or send a message through the website.
hi, I'm doing a part of a project in which a drone flies along a certain route and I need it to fly straight along the line (because this is a building and it won't be good if it crashes). I have attached duct tape to the floor. tell me, please, how can I tell the drone to find this duct tape and fly exactly in the center, focusing on this line on the floor?
Hi. So I was new to programming a drone and had a problem after pasting the code into PyCharm. It says it can't find the model 1 "Tello". Can someone help me?
you can share the screen shot of the error on my fb page and i can have a look .
So I am trying to do this, but my video just takes one frame and then the program stops responding. Any idea of what could be happening?
Make sure you have the lastest firmware installed on the tello.
Where is the source code from the video?
Thanks for the tutorial.
Can we apply it to the DJI Mini 2? Will the library also work with it?
Thank you
No, there is probably only SDK for iOS.
what software are you using? open cv?
That was pycharm
Thanks for the great video. I'm trying to run the test and am getting this error: OpenCV: Couldn't read video stream from file "udp://@0.0.0.0:11111". Do you know why this might be?
Make sure your computer wifi is connected to tello and your tello firmware is uptodate.
Check if your firewall from windows defender is on, turn it off and it should work. The firewall could block the udp packets from the drone.
Hi, I tried going through the comment s but could not get proper answer.
just writing the code will connect the drone device or do we need to do some other steps to connect it.
you need to connect to the drone using wifi before uploading the code.
@@murtazasworkshop Should we connect the drone to the app too? Or leave it unconnected?
excuse me.
whether by using parrot ar drone 2.0 elite edition can be run using Pycharm?
i have not tried it, but their is an sdk for it by the name python-ardrone, you can try that
@@murtazasworkshop
thank, but i have some error, when im tried to install SDK on unbuntu 16.04 32 bit
++++++++++++++++
thank's bro, i have some error, when i tried to install ARDrone SDK 2.0 om ubuntu 16.04 32 bit
Hi Thank you for the excelent video, i have a question about video, i have the latest firmware version but when i use:
frame_read = drone.get_frame_read()
img = frame_read.frame
frame = cv2.resize(img, (widthImg, heightImg))
i have this result:
Traceback (most recent call last):
File "telloControl.py", line 34, in
frame = cv2.resize(img, (widthImg, heightImg))
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src
esize.cpp:4045: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
thank you so much!
it seems your image is empty . Make sure ur wifi is connected properly . If it still persists try removing the resize line.
Sir i can connect my Tello with Phone but it cant be connect with my laptop and i sent you message already but you did not reply me
it's interesting. how to inject our code to tello ?
You can't actually inject code in your tello, the computer runs the code and send the proper parameters to tello at convenience.
Is the object detection running on the drone or on your desktop computer?
What's the operating system of system you are programmin on?
i use windows and sometimes macOS
Hey awesome video but somehow i cant get the drone to take off keeps saying b'error' what might i be doing wrong? im sure the error is on my end.
self.clientSocket.sendto(command.encode('utf-8'), self.address)
OSError: [Errno 101] Network is unreachable
Please note i am able to get a video from the drone though.
try updating the firmware on the tello app
Sir how to call you any number or multimedia
Where to import the CV2 and djitellopy library?
The steps are shown in this video czcams.com/video/P2wl3N2JW9c/video.html
@@murtazasworkshop thank u for this
Where may I find some tutorials on tello edu programming with Python
hello , can u plz send me full code of this project?
whenever I am starting "colorObjectTracking" it is showing this-
File "C:/Users/rishi/Downloads/Tello-Object-Tracking-master (1)/Tello-Object-Tracking-master/ColorObjectTracking.py", line 115, in
imgContour = img.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
Process finished with exit code 1
Please help fast