johnwalicki / Node-RED-Tello-Control

Node-RED flows to control the Ryze Tello Drone
Apache License 2.0
126 stars 87 forks source link

Tutorial Step 5 Take pictures with the drone #12

Closed Opeiz closed 4 years ago

Opeiz commented 5 years ago

Hi, i imported the solution flow and in the dashboard i dont see anything. The Watson image panel actually show the direct image or i have to press "Take Picture" button and see the image?. I have to change something please help Thanks

johnwalicki commented 5 years ago

Hi @Opeiz - First, make certain that you have opened the ports in your firewall as described in the top of Part 5. To activate the picture mode, Power on the drone, click on the "TELLO_LOW_LEVEL_CONNECT" inject node in the flow. Then turn to the Node-RED Dashboard, click to turn on the pictures (the drone typically starts to take pictures of my shoes.) Enjoy!

Opeiz commented 5 years ago

Hi @johnwalicki , I so happy you answer me im very proud. I desactive the firewall in my pc so there no problem with that. Why i should press the "TELLO_LOW_LEVEL_PROTOCOL" i am kind of confused and the dashboard part i dont get it. Sorry if they are basic questions im new with Node-Red and the flows. If you can help i will be so happy. Thanks

johnwalicki commented 5 years ago

@Opeiz - I was a bit lazy and didn't wire the TELLO_LOW_LEVEL_PROTOCOL inject node into the Dashboard. I should have added a "Initialize Camera" button to the dashboard. You can add a dashboard button or press the inject node.

Opeiz commented 5 years ago

Hi John can we make any online and fast communication only if you can? Because I really can't make the dron take the picture and displaybit on the pc. Thanks so much

Opeiz commented 5 years ago

image I debug everything just to see what is happening and i really cant find the error. Thats my Picture Dash.

johnwalicki commented 5 years ago

Hi @Opeiz - Not certain what timezone you're in. We can do a quick Zoom or WebEx session and I can demonstrate the Camera flow to you. We possibly debug your issue. I am a Linux expert so might not be able to debug Windows firewall issues. Sent you a DM on Discourse with some contact details.

Opeiz commented 5 years ago

Hi John, so happy you able to help me. I'm in GMT-4 Santiago Chile, it will be perfect to a quick zoom or WebEx. Tell me an hour and I will be connect and where I can see your Detail to concrete the call. Thanks so much John

johnwalicki commented 5 years ago

I'm free at 1pm EDT today. Check your Discourse DMs for Zoom details.

johnwalicki commented 5 years ago

Its 1pm EDT now. I think that's the same as Chile TZ. I've opened my Zoom meeting room.

Opeiz commented 5 years ago

I'm entering my pc give me 5 please

johnwalicki commented 5 years ago

With some guidance, @Opeiz was able to use Watson Visual Recognition and Node-RED to take pictures while flying the drone and classify what the drone saw (all the Workshop Parts 7 / 8 / 9 )

Several findings from the discussion with @Opeiz

  1. The documentation should be improved with steps to a) Power on the Drone b) Connect the laptop to the Tello WiFi c) Do not fly the drone with other Node-RED tabs d) Press the TELLO_LOW_LEVEL_CONNECT before sending any SDK commands. This is the hidden trick that the documentation fails to mention. Put the Tello into Low Level API mode first so that it can start taking picture frames. Then you can also send SDK commands to fly the Tello - TakeOff / Up / Down / etc. (Low level and SDK commands can be mixed together - only if the first command to the Tello after power up is the low level init) [One way to fix this so that it will always work (without the manual step) would be to modify ALL the flows to initialize the drone in low level mode first, then initialize the SDK mode]

2) My version of the Part 9 flow worked. The version of the flow available for download in GitHub didn't. Will need to compare.

mgavazzi commented 5 years ago

Hello. Can someone kindly post the node-red file to import addressing this issue? I tried to follow the instructions posted johnwalicki to no success. I must be missing something but just couldn't figure it out after a lot of troubleshooting.

Thanks in advance

Opeiz commented 5 years ago

Hi Marcelo, the node-red file is correct the problem is in the order. Focus on part C) on the last comment of @johnwalicki here in the same issue. First Low level protocol and then SDK Mode

mgavazzi commented 5 years ago

Thank you!

On Mon, Aug 26, 2019 at 4:10 PM Opeiz notifications@github.com wrote:

Hi Marcelo, the node-red file is correct the problem is in the order. Focus on part C) on the last comment of @johnwalicki https://github.com/johnwalicki here in the same issue. First Low level protocol and then SDK Mode

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/johnwalicki/Node-RED-Tello-Control/issues/12?email_source=notifications&email_token=AAL7W6RHZU6HNUNBVHW7OZTQGQ2D3A5CNFSM4H7KEPUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5FQ3IQ#issuecomment-525012386, or mute the thread https://github.com/notifications/unsubscribe-auth/AAL7W6TWBHQYIF3PFH77GTLQGQ2D3ANCNFSM4H7KEPUA .

grul0005 commented 4 years ago

...confirming that following @johnwalicki 's step 1 notes from 24 July worked for me. I was able to take pictures with both a Tello and a Tello EDU. Thanks for your work John and @Opeiz .

Meera-AB commented 4 years ago

Hello, I'm a beginner with node-red and just try to go through the tutorial step by step it is interesting and helpful. but, I face the same problem with the picture and try to solve it with the steps mentioned here but still not solved. I need help @johnwalicki

Opeiz commented 4 years ago

Hi Meera, tell me what you have done and what's your problem and I will try to help you :)

Meera-AB commented 4 years ago

Hi, I'm able to control the drone but I can't view and take the picture. already I tried to follow up the steps mentioned (Press the TELLO_LOW_LEVEL_CONNECT before sending any SDK commands) but still there is no result

Meera-AB commented 4 years ago

التقاط

and I found this error, I don't know if it is related

Opeiz commented 4 years ago

Send a picture of your nodes or is the same that John provide us? To see where is the debugger

Meera-AB commented 4 years ago

It is the the same

Meera-AB commented 4 years ago
Capture
ivoandreev commented 4 years ago

@Meera-AB , I have been struggling with this for a while and after some debugging isolated the problem to Tello Send CMD node. Open it and find the following code: "bb.writeUInt8(data[i], [9+i]);" Remove the brackets, so that it looks like bb.writeUInt8(data[i], 9+i); After this I managed to get a picture. However now I could not make a picture while the drone is flying. Working on this now.

theman162 commented 4 years ago

@Meera-AB , I have been struggling with this for a while and after some debugging isolated the problem to Tello Send CMD node. Open it and find the following code: "bb.writeUInt8(data[i], [9+i]);" Remove the brackets, so that it looks like bb.writeUInt8(data[i], 9+i); After this I managed to get a picture. However now I could not make a picture while the drone is flying. Working on this now.

Hi,were you able to solve the issue of taking the picture while flying

ivoandreev commented 4 years ago

@Meera-AB , I have been struggling with this for a while and after some debugging isolated the problem to Tello Send CMD node. Open it and find the following code: "bb.writeUInt8(data[i], [9+i]);" Remove the brackets, so that it looks like bb.writeUInt8(data[i], 9+i); After this I managed to get a picture. However now I could not make a picture while the drone is flying. Working on this now.

Hi,were you able to solve the issue of taking the picture while flying

Yes, managed to do this at last. Just remember to initialize low level API before you start flying. I have also a solution with Cognitive services. Also implemented predefined mission path, but it has wait between each step in order not to send multiple commands, before executed. SOMETIMES, after taking photoes, the execution of flight mission commands stop and the drone just hovers. I dirty fixed it by starting the flow 2 times, but it is not as it should be. I can share flow if you tell me where. Tried to contact John Walicki miltiple times, on different channels, but no luck.

theman162 commented 4 years ago

@Meera-AB , I have been struggling with this for a while and after some debugging isolated the problem to Tello Send CMD node. Open it and find the following code: "bb.writeUInt8(data[i], [9+i]);" Remove the brackets, so that it looks like bb.writeUInt8(data[i], 9+i); After this I managed to get a picture. However now I could not make a picture while the drone is flying. Working on this now.

Hi,were you able to solve the issue of taking the picture while flying

Yes, managed to do this at last. Just remember to initialize low level API before you start flying. I have also a solution with Cognitive services. Also implemented predefined mission path, but it has wait between each step in order not to send multiple commands, before executed. SOMETIMES, after taking photoes, the execution of flight mission commands stop and the drone just hovers. I dirty fixed it by starting the flow 2 times, but it is not as it should be. I can share flow if you tell me where. Tried to contact John Walicki miltiple times, on different channels, but no luck. Hi,could u share the flow to my email easwer123456@gmail.com if u have the time available

axdonlee commented 4 years ago

Hi John, so happy you able to help me. I'm in GMT-4 Santiago Chile, it will be perfect to a quick zoom or WebEx. Tell me an hour and I will be connect and where I can see your Detail to concrete the call. Thanks so much John

Opeiz are you able to share the files

axdonlee commented 4 years ago

Anyone can share the files for photo taking and video streaming. I can’t solved the issue

axdonlee commented 4 years ago

anyone able to stream the video of the tello real time using node red

johnwalicki commented 4 years ago

I'm going to close this GitHub Issue. If anyone still needs assistance, open a new ticket. Typically the underlying problem is opening firewall ports correctly so that the Tello photo chunks can be received by your laptop.

lukzluthor commented 4 years ago

I am able to stream video without any issues. If I try to take a photo it fails. I dug in the other night and looked into the install of the modules. If you look it shows installing the modules using the command line npm. I noticed it was missing some modules to get it installed properly. I tried with 8.x and 9.x. Still I am not able to get the photos to shoot. Also messing around with the API for Watson I noticed the API has been updated. So I am not sure it this is causing an issue. I did use the code for the Video viewer and that works great. I am still unable to take photos. I am on a PI4, I also noticed an issue with fsevent as it is a mac only feature. I am wondering if this is what is causing the issue. Also I have a question about the URL for the image recognition with Watson, I put my API in, Am I also supposed to put my URL in from Watson Studio or use the gateway that in in the flow?

johnwalicki commented 4 years ago

@lukzluthor Let's split this into separate threads. Good to hear that video streaming is working. That tells me that UDP port 11111 in your firewall is open.

Before we send photos to the IBM Cloud, lets just receive them and put them in a window. Does Part 7 work for you?

The Watson Visual Recognition service changes and the latest node-red-node-watson introduce v4 API changes. The Tello flow uses the v3 API and is still valid. Pick the Service endpoint that is valid for your service instance. It might change for different regions.

johnwalicki commented 4 years ago

@lukzluthor - I have tested these flows successfully using Node v8, Node v10 and Node v12

johnwalicki commented 4 years ago

@lukzluthor - You can safely ignore npm warnings about optional fsevent components. I run these flows on a Red Hat Linux system and see the warning too. The Node-RED flows do not require fsevent

lukzluthor commented 4 years ago

Hi John, thanks for the reply. l looked into the step 7 again. I went back and tried to make sure the node version was correct without warnings. I understand that fsevent is OSX specific. Are there any specific parameters I may be missing that I need to enter in to the functions to get this to work? I went ahead and removed the other nodes. So I now have the original solutions imported. I re-imported solution 7 I am getting the same issue. I have the Nodes for Tello Telemetry, Tello Drone, Video Stream Dashboard and a new Tello Camera - solution 7 loaded up. I am running on Debian buster with Node-Red version 1.0.3 nodejs 10.15.2 Linux 4.19.0.6 amd64/x64 LE Dashboard version 2.19.3. Launched using user rather then root. I am using a non edu tello drone white. Tello Firmware v01.04.91.01. Tello App says I am running the latest. When I go to telemetry. I can click connect, I can fly the drone, If I enable to video feed I can also view the video feed. When I click the take photo button the light on the tello goes red. If I am flying and I do this it will go down. Once I launch the video server i have no problem streaming the video. Now if I go in and click take photo. It will do nothing but the red light on the tello does not come on? Thanks for your help.