RETAKE COPTER's CONTROL ON A PYTHON SCRIPTING FLIGHT

Hello 

I am working on a project which includes an autonomous mission of an hexacopter using PX4, Mission Planner and Python scripting. In this flight, the RC is not necessary and the hexacopter flies just via Python scripting and Mission Planner commands communicating with an RF telemetry link.

My main concern is how can i retake the copter's control via Remote Controller in a scenario where the auto mission is not working while the copter is in the air. Specifically, if for exampe there is a communication breakdown between copter and GCS while the copter is in the air , is it possible to control the copter from the radio controller so not to have my vehicle crashed?

I tried to retake copter's control by changing modes from RC while it executes the flight by it doesn't seems to work.

Any help please?

Thanks for your time

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Not really, beyond "I don't think it shouldn be doing that", which is why you should probably try asking at a PX4 specific forum. The one thing that's unclear is that you say "if for any reason the script is interrupted, the copter does not ''reply'' to the RC commands" but from your description it seems that if the script is running the copter does not reply to the RC commands, right? Anyway, whatever the correct description is, I suggest you try asking the PX4 group.

  • Thanks for your time Andreas.

    When the script runs, if i change mode through the script commands, for example from PosHold to Guided, it works fine. If i issue ''Stabilize'' (or any other mode) from the GCS it works fine too. But if i issue it via RC it doesn't work. So the GSC commands work fine while the RC commands get ignored. In other words, if for any reason the script is interrupted, the copter does not ''reply'' to the RC commands.

    Can you recommend any solution for this?

      

  • Not many, other than "it shouldn't behave like this". What happens if you run a super dumb script (the copter doesn't even have to be flying), like set mode to something, wait 5 seconds, set mode to something else, wait, repeat? Let's say, for example, with your script you alternate between pos hold and alt hold every five secods. What happens if you issue Stabilize from the GCS and what happens if you do it via the mode switch on the RC? Does the GCS command work while the RC command get ignored? If you then stop your script, does it respond to your RC mode changes? If you then start the script again, does the copter again stop listening to the RC?

  •  

    Thanks for your time Andreas (ΠΑΤΡΙΔΑ)

    First of all i know that i can stop the script manually via MP if needed but i would be more interested in doing this via RC.

    We have tried while the script is running to change the copter's mode through the ''ACTIONS'' tab of MP and it worked fine.

    Our concern is to retake the control of copter through the RC while it is in the air and the script for some reason has failed.

    When we try this, the copter does not response to RC commands.

    Have you any ideas?  

  • I 'm not familiar with PX4 but changing modes via RC should work, as long as it works properly in normal circumstances (to the best of my knowledge, scripting via MP is equivalent to commands being issued via MP, it's just that the commands are programmatic as opposed to manual).

    Could it be that your code changed the mode immediately after you changed via RC and you mistook this for a non response? Ideally, the python code should be monitoring the RC channels and doing something reasonable (i.e. stopping) if there is a change on the mode channel. I had mucked about with threads to make this work a long time ago but failed miserably. You can, of course, also manually stop the script from MP if needed but it's a lot safer to have the capability at the flick of a switch on the RC.

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars It's just something that's easy to track with chroma keying. I ended up using different colors on th…
10 hours ago
DIY Robocars via Twitter
10 hours ago
DIY Robocars via Twitter
RT @TinkerGen_: "The Tinkergen MARK ($199) is my new favorite starter robocar. It’s got everything — computer vision, deep learning, sensor…
Nov 23
DIY Robocars via Twitter
Nov 23
DIY Robocars via Twitter
RT @roboton_io: Join our FREE Sumo Competition 🤖🏆 👉 https://roboton.io/ranking/vsc2020 #sumo #robot #edtech #competition #games4ed https://t.co/WOx…
Nov 16
DIY Drones via Twitter
First impressions of Tinkergen MARK robocar https://ift.tt/36IeZHc
Nov 16
DIY Robocars via Twitter
Our review of the @TinkerGen_ MARK robocar, which is the best on the market right now https://diyrobocars.com/2020/11/15/first-impressions-of-tinkergen-mark-robocar/ https://t.co/ENIlU5SfZ2
Nov 15
DIY Robocars via Twitter
RT @Ingmar_Stapel: I have now explained the OpenBot project in great detail on my blog with 12 articles step by step. I hope you enjoy read…
Nov 15
DIY Robocars via Twitter
RT @DAVGtech: This is a must attend. Click the link, follow link to read the story, sign up. #chaos2020 #digitalconnection #digitalworld ht…
Nov 15
DIY Robocars via Twitter
RT @a1k0n: Got a new chassis for outdoor races (hobbyking Quantum Vandal) but I totally didn't expect that it might cause problems for my g…
Nov 11
DIY Drones via Twitter
First impressions of the Intel OpenBot https://ift.tt/36qkVV4
Nov 10
DIY Robocars via Twitter
Nov 9
DIY Robocars via Twitter
Excellent use of cardboard instead of 3D printing! https://twitter.com/Ingmar_Stapel/status/1324960595318333441
Nov 7
DIY Robocars via Twitter
RT @chr1sa: We've got a record 50 teams competing in this month's @DIYRobocars @donkey_car virtual AI car race. Starting today at 10:00am…
Nov 7
DIY Robocars via Twitter
Nov 6
DIY Robocars via Twitter
RT @a1k0n: Car's view, using a fisheye camera. The ceiling light tracking algorithm gave me some ideas to improve ConeSLAM, and having grou…
Nov 5
More…