Uncategorized

ArduPilot VS PX4 | Which Is Better?

The open source drone movement has a few powerhouse software platforms. At the top of the mountain are ArduPilot and PX4. So what is the difference between the two, who wins in the ArduPilot vs PX4 matchup? 

Well really, it depends on what you want to optimize for. Let’s start with some history first. 

History of ArduPilot and PX4

The history of ArduPilot can be traced back to 2007, when a father (Chris Anderson) and his son attempted to build a drone together on the Arduino platform. The effort was a success Anderson went on to found the site DIYDRONES.com, where a centralized hub of drone enthusiasts could join together and build open source flight control software. 

However, the limitations of the vanilla arduino board were quickly reached. Around 2011, this led to the development of the APM flight control board. While it was still a limited 8-bit flight control board, it was still much more convenient to use. 

ArduPilot Board Timeline

Around 2013, the PX4 story ties into the ArduPilot one. Also trying to development a highly capable open source software platform for drones, the PX4 community was laser focused, and unleashed the Pixhawk flight controller. 

This Pixhawk flight controller was made to run the open source PX4 software stack, and even the hardware itself was open sourced. Eventually, ArduPilot was made to run on the Pixhawks as well, and all ArduPilot made boards were ceased, as the Pixhawks 32 bit platform was superior. 

So What’s The Difference? 

We will now begin analyzing each program in different dimensions.

Open Source or Closed Source

As mentioned before, both programs are open source and the code can be easily accessed and played with on GitHub

ArduPilot, PX4

Licenses

PX4 operates under the BSD license, so any changes made to the code does not need to be pushed to the main branch. While ArduPilot operates under the GPL license, where any changes made to the source code are required to be pushed back to the master branch. 

This makes PX4 sometimes more favorable to businesses, who have their IP in the flight control code itself. 

It should be noted that most company IP will not exist in the flight control code, and will rather exist on companion computers. This companion computer based code is NOT required to be pushed into ArduPilot, so any IP there is still protected. 

Vehicle Types

Both platforms support a wide array of vehicle types, not just drones. 

For example, ArduPilot can run on Planes, VTOLs, Rovers, MultiRotors, Boats, Submarines, and even Blimps. 

PX4 works on all of these vehicle types as well. Differences in vehicle capabilities won’t be seen for most beginners. 

SDK

These programs both use MAVLink, which is a middleware protocol that can send commands to the flight control code. 

Through this protocol, both programs have high level API programs that can control the drone autonomously in the programming language of your choice. 

For ArduPilot, the package dronekit is highly popular. It is powerful, because you can control the drone with simple functions without needing to worry about the low level specifics of how the hardware is ran. 

For example, this taco delivery script took 300 lines of code, while ArduPilot has over 700,000 lines of code that high level programmers don’t have to worry about. 

Autonomous Drone Delivery | Taco Copters and Precision Landing

To build this prototyping beast of a drone, check out this raspberry pi drone guide.

In PX4, the primary high level interface into controlling vehicles is MAVSDK. It behaves similarly to dronekit in ArduPilot. 

If you want to learn more about this high level drone/robotic programming, check out this guide to get started, and this guide on how to build a capable drone

Conclusion

It would be easy to overthink the choice of what software program to pick, but really the similarities vastly outweigh any differences. For this reason, it is best to simply make a choice and stick with it, to minimize any wasted time that will arise from switching back and forth between programs. 

Leave a Reply