How to setup Navio+ Raspberry Pi flight controller to be controlled both from rc transmitter and python code via RPi

Hi a want to make a quadcopter which make decisions based computer vision, and control it via RPi, while still being able to control it with RC.

I looking any kind of flight controller software, like OpenPilot has, may be APM also suitable, or any custom basic flight control software. I need to make any kind of API with commands

goLeft(v), goRight(v), goBack, and so on, to be able to control quad from RPI,

Any one have any directions? Does APM provide me with any kind of out of the box, or is it possible to implement something like this
https://ghowen.me/build-your-own-quadcopter-autopilot/ but with Navio+

Thanks

2 Likes

You should be able to achieve this with APM, OpenCV and a bit of MAVLink messaging, something like this:

  1. APM is set to Auto flight mode, with a default waypoint, hovering in the air for example.
  2. Your background program/service runs as a normal OpenCV program in the background (doesn’t know anything about quadcopters) until it makes a decision to move.
  3. The move command is sent via MAVLink as an instruction to fly to a waypoint or if you want directional commands or even simulated RC input. Waypoints are probably the best and provide good feedback, as they also pop-up in Mission Planner at the ground station.
  4. I presume you can already override Auto mode with RC control, like I know you can with Loiter and Altitude Hold fight modes. But if not it shouldn’t be too hard to write some kind of watcher which looks for any significant RC input then switches the mode back to loiter, or perhaps even an RC special function depending on your transmitter capabilities.
2 Likes

Thanks for this answer!
How can I override Auto mode with derect RPi commands (without any ground station) Can you give me some advices? Is it possible to send flight commands from RPi to ardupilot without connection to ground control?

2 Likes