Towards ROS-native drones

3689702513?profile=original

Originally published in Medium:

Announcing alpha support for the PX4 flight stack in a path towards drones that speak ROS natively.

The drones field is an interesting one to analyze from a robotics perspective. While capable flying robots are reasonably new, RC-hobbyists have been around for a much longer time building flying machines developing communities around the so called flight stacks or software autopilots.

Among these, there’re popular options such as the Paparazzi, the APM (commonly known asardupilot) or the PX4. These autopilots matured to the point of acquiring autonomous capabilities and turning these flying machines into actualdrones. Many of these open source flight stacks provide a general codebase for building basic drone behaviors howevermodifications are generally needed when one has the intention of tackling traditional problems in robotics such as navigation, mapping, obstacle avoidance and so on. These modifications are not straightforward when performed directly in the autopilot code thereby, in an attempt to enhance (or sometimes just simplify) the capabilities of autopilots, abstraction layers such as DroneKit started appearing.

For a roboticist however, the common language is the Robot Operating System (ROS). Getting ROS to talk to these flight stacks natively would require a decent amount of resources and effort thereby, generally, roboticists use a bridge such as the mavros ROS package to talk to the flight stacks.

We at Erle Robotics have been offering services with flying robots using such architecture but we’ve always wondered what would be the path towards a ROS-native drone. In order to explore this possibility we’ve added support for the PX4 Pro flight stack.

Supporting the PX4 Pro flight stack

1*ErmgDNaQj2PWIrKYOMzkHg.png

The PX4 Pro drone autopilot is an open source flight control solution for drones that can “fly anything from a racing to a cargo drone — be it a multi copter, plane or VTOL”. PX4 has been built with a philosophy similar to ROS, composed by different software blocks where each one of these modules communicates using a publish/subscribe architecture (currently, a simplified pub/sub middleware called uORB).

In an internal attempt to research the path of getting ROS-native flight stacks and to open up this work to the community I’m happy to announceofficial alpha support for the PX4 Pro in all our products meant for developers such as the PXFminiErle-Brain 2 or Erle-Copter. Our team has put together a new set of Operating System images for our products that will help you switch between flight stacks easily.

To install PX4 Pro, just type the following:

sudo apt-get purge -y apm-* # e.g.: apm-copter-erlebrain
sudo apt-get update 
sudo apt-get install px4-erle-robotics

ROS-native flight stacks

Using the PX4 Pro flight stack as a starting point, our team will be dedicating resources to prototype the concept of a drone autopilot that speaks ROS natively, that is, that uses ROS nodes to abstract each submodule within the autopilot’s logic (attitude estimator, position control, navigator, …) and ROS topics/services to communicate with the rest of the blocks within the autopilot.

Ultimately, this initiative should deliver a software autopilot capable of creating a variety of drones that merges nicely with all the traditional ROS interfaces that roboticists have been building for over a decade now.

If you’re interested in participating with this initiative, reach us out.

E-mail me when people leave their comments –

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

Join diydrones

Comments

  • Victor,

    That brings back memories of an old request done on erle's forum here

    Hola Alejandro

    I am very interested with the way you are ''deconstructing'' the APM, Modularity is the key to integrate with ROS philosophy and to attain a high level of agility and redundancy.

    We are working in to expose all the components (RC, IMUs, GPS, etc) through ROS.

    :-)

  • Hi Jerry, none of the three points. I believe that going through the article again might help.

    As for the source code, it's not open source just yet. We'll do so once we're ready. Contributors will get early access to the codebase so If you're interested, reach out providing details about you and your potential support and commitment.

  • Hi, I could not really understand this article, are you saying:

    1) px4 supports ros natively

    2) now erle capes run px4

    3) now erle capes run ros natively by that apt package?

    Are you once again making an envelope like your OS image to run something, where's the code for px4 fork, if that's not too much to ask.

  • Sure! Just send over you and your group's contact details through http://erlerobotics.com/blog/contact/. We'll reach out once we've got everything in place to start accepting contributions.

    I'll see what Tully and the team thinks about posting this within ROS news.


    Cheers!

  • Moderator

    that would be a great idea to have one stack for all robots.

    we are interested in helping out.  There are parts of the stack that are important to us.

    you should also post this on ros news site ;)

  • Hi Shawn,

    I guess you could say so but we don't want to be too ambitious. Rather than creating a whole new stack, for now It'll be more about porting the existing flight stack to a more ROS-friendly environment.

    In the future, ideally,  the whole flight stack could sit together (capability-wise) with the ROS navigation stack.

    navigation - ROS Wiki
  • Moderator

    Hi Victor,

    Is this an attempt to make a navigation and control stack for drones, like ROS Navigation?

This reply was deleted.