dronekit / dronekit-python

DroneKit-Python library for communicating with Drones via MAVLink.
https://readthedocs.org/projects/dronekit-python/
Apache License 2.0
1.55k stars 1.43k forks source link

Controlling servos and ESCs using Raspberry Pi #971

Open kushal123478 opened 5 years ago

kushal123478 commented 5 years ago

I need to test a nonlinear controller for a fixed wing aircraft. I am using Pixhawk 4 with Raspberry Pi as my companion computer. Pi will run the control algorithm parallel with the pixhawk. I want to hand over the servo and ESC control to the Pi when I flip a RC channel switch. The plane will be controlled by the Pi temporarily while I log data for research purposes. Then it will hand over the control back to Pixhawk own controller.

I found the RC channel override option in DroneKit but the documentation says it is highly discommended. Can you suggest me a way in which I can control the RC PWMs directly using my python script running on the Pi.

I do not trust my nonlinear controller 100% and want to have a safety option of handing over the control to pixhawk if the Plane's attitude goes out of a certain operating bound.

selimyurekli commented 3 years ago

Anyone can work on that topic?