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

Liam left a comment on Agricultural UAVs
"Hi
I'm Liam from T-MOTOR. I would like to reach out to see if there is any possibility for us to work together.
We are a propulsion system manufacturer who offers motors, propellers and ESCs for all kinds of drone applications which vary from secur…"
Jun 30
Richard Cox left a comment on Australia
"Anyone in the DIYDRONES Australian subgroup based in Alice Springs, NT?
I am experimenting with Ardupilot (standard Arduplane), Pixhawk 4 FC in a 4-ch
RC "AXN Floater Jet" foamy plane..."
Jun 29
Omar Sykes left a comment on Australia
"Hi everyone, I am looking for someone who is good at drone building, repair and software in Adelaide. Please give me a call on 0477 319 219."
Jun 29
More…