Controlling pitch,yaw and roll for object tracking

Hi. We have an apm 2.8 flight controller.

With the help of opencv mobilenet and raspberry pi 3, we need to design a drone for object tracking as a senior project to graduate(We’re focused on a car at the moment.)

We will write python scripts including a pid controller. We need to control drone’s directional elements (roll,pitch etc). using python.

How shall we do it?

Mavlink’s commands seem to a little bit complex for me. If there is a python library, that would be perfect.

Dronekit can control velocity but it controls directions parallel to north-south and west-east directions, not drone’s direction.

Mission planner’s python scripting commands (Script.sendrc, cs.yaw etc) are perfect but we need to run in a terminal which is outside of mission planner software

Do you have any suggestions?

Thanks.

Pymavlink seems quite useful. Are there any detailed documentations for pymavlink library?

Just use dronekit-python. It already does what you want. But you do need to recompile it from source.

Hello. We decided to use mavlink local ned. It is easier for us to control drone’s position with this way. Thanks for the answers.