How to develop PX4 for integrating sensors

I am developing quadrotor with px4 and px4flow for autonomous flights.

I have done hovering with offboard mode with a companion computer ( )

Now, I want to integrate px4flow (later, sensors such as intel realsense) into the system and make the quadrotor hover.

My question at this point is that

  1. Is it possible to do this with offboard mode (ROS)?
  2. Do I need to develop the system using uORB ?

Also, I am wondering what is the difference between Ardupilot and px4?

Please advise me to develop the quadrotor…

Thank you in advance.

Nobody wants to give some advice?
your team policy does not allow to answer this kind of question?

@netgittemp you can add sensors like cameras and rangefinders to the offboard computer, have a high-level logic to generate offboard commands and then command PX4 using those offboard commands through MAVROS.

Thank you for your reply!
It would be very thankful if you have any tutorial for integration sensors.

Thank you!


We have a similar challenge as described here, and are therefore interested in this topic. As an alternative solution, would it be possible to connect the optical flow sensor to the pixhawk via i2c, utilize PX4s state estimator and send state updates to the companion computer via MAVLINK? I guess that would give a simpler setup on the companion computer. (Unless you need to fuse more sensors that PX4 does not support)

Thank you in advance!

Fundamentally, they’re both capable of doing what you’re trying to achieve.
The key differences are the licensing, code structure and flexibility. It’s probably not worth me going into the technical merits of each, as that can get subjective quite quickly, and I’m not out to start arguments.
License: bsd vs GPLv3. Basically with ArduPilot if you distribute a firmware binary to someone, you have to offer them the source with it. With px4 you don’t, unless you choose to.
Code structure: px4 is modular, with uorb pub/sub. ArduPilot is a bit more complex. Merits to both, and it’s subjective.
Flexibility: the variety of sensors, simulators, gcs tools, etc is much greater with ArduPilot, but for those features/options implemented in px4, px4 is sometimes better documented.

If there are particular features you absolutely need, it’s worth researching both options, to see what best or more closely meets your need. Many people/companies have wasted a lot of time and money heading down one path only to hit a brick wall and have to switch.

Thank you for your reply, @auturgy.
I am still stuck in the issue for integrating px4flow into the quadrotor + companion computer.

@henrik, it sounds good. I will try it.

I would like to use PX4FLOW with ROS which is running on the companion computer.

I am still looking for tutorials… but still stuck…
If there is anyone who can gives some advice then it would be very thankful.

Thank you in advance.