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 –


  • 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.


Chris Anderson liked Zara Mae Pickering's profile
May 21
Azjeg liked Azjeg's profile
Apr 27
Benewake LiDAR liked Benewake LiDAR's profile
Apr 12
Gremsy liked Gremsy's profile
Mar 12