Autonomous Code Snippets

My team is working on an autonomous flight path for the AVR drone, but even after scouring the documentation none of us can find a way to control the propellers through the sandbox module. Is there a sample script available anywhere that we can reference? Even something simple like a file that just spins the propellers for a few seconds would do wonders for us.

Controlling the propellers directly is not really something you’re going to be able to do. PX4 is ultimately talking with the ESCs, and PX4 thinks more in terms of “where I am, and where do I want to go” rather than raw propeller speed.

The closest thing you’ll probably be able to do is quickly arm and disarm the drone on the ground to spin the propellers briefly.

That makes sense!

How would I tell the PX4 where to go? Is there a function to set the target location?

Through QGroundControl or the MQTT endpoints @bhanner-bell made for this year:

1 Like

This is amazing! Thank you so much