PX4 and ArduPilot Basics

I am relatively new to this so please excuse me if I ask too simple or obvious things.

I have a Pixhawk and I want to put my own code in the firmware. For now I want to enable two-way serial communication to an onboard Arduino and make the Pixhawk pass the RC input to the arduino. Later, I would like to implement a new flight mode.

Now I have been reading a lot in the past week, but everything is still a mess and I have lots of concepts unclear.

1. I know that MAVLink is the protocol that APM and Pixhawk use to communicate with the Ground Station. However, is this the only purpose of MAVLink? E.g. some people suggested that I should use it to establish the connection to my Arduino but it seems like simple serial communication would do the job as well.

2. What is the difference between the PX4(https://github.com/PX4/Firmware) and the ArduPilot firmware(https://github.com/diydrones/ardupilot)? As far as I understand, they can both run on a Pixhawk. Am I right that only the PX4 uses embedded linux and NuttX? Then what does ArduPilot use? Which one is more reliable and easier to modify?

3. Should I use APM/Mission Planner or QGroundControl? I have lots of problems with QGround Control so APM Planner seems a better choice (I use linux). However, as far as I know QGroundControl was written for the Pixhawk and can't work properly with APM(ArduPilot) firmware just like APM Planner does not work properly with PX4 firmware.

 

4. Finally and most importantly which guide is best to follow? There is the Pixhawk documentation(https://pixhawk.org) which has PX4 and APM stacks. Are the tutorials interchangeable, meaning can I use a PX4 tutorial to make sth run on an ArduPilot firmware? There is also the qgroundcontrol guide (http://qgroundcontrol.org) which I believe suggests implementing functionality using MAVLink...

I guess most of this comes down to PX4 or ArduPilot. I would really appreciate detailed explanations on any of my enquiries. Thanks a lot in advance!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi, I have some more experience now and will try to answer these myself. My answers might be wrong though...

    1. MAVLink seems to be best suited for communication with Ground Control Stations and provides a great variety of parameters and flexibility. However, generally for hardware communication between Pixhawk and another microcontroller, you will need to transfer different type of information. Therefore, a simpler (maybe even self-developed) protocol will be a better fit.

    2. To my understanding, ArduPilot is built on top of PX4Firmware and NuttX. A hint for that is that there are such modules available in the modules directory of ArduPilot on github. Therefore, ArduPilot should be the more reliable one.

    3. In my experience so far APMPlanner and MissionPlanner are more stable than QGroundControl. Nevertheless, both of them seem to be still unstable and sometimes I have lots of problems until I configure my controllers properly. Sometimes it is good to have all of them installed and just try each one if sth does not work.

    4. In terms of documentation, I don't have a very good answer since I have not been involved very much in following it since I asked the question. Assuming my answer to 2 is correct, ArduPilot should be the right documentation to follow. This is of course assuming that you want to implement something high level. If you want to go down to the hardware level and protocols such as MAVLink, my guess is PX4 documentation would be more helpful.

    Please somebody correct me, if I am wrong.

    Hope this helps!

  • Hi Niko... These question are a year old... Did you find the answer for question 2 and 4 ?

    I have the same questions .... Would be glad if you can post the answer.

    Thanks a lot

This reply was deleted.

Activity