ROS 1 / ROS 2

../_images/rosorg_logo.png

ArduPilot capabilities can be extended with ROS (aka Robot Operating System).

ROS provides libraries, tools, hardware abstraction, device drivers, visualizers, message-passing, package management, and more to help software developers create robot applications. ROS1 is being replaced by ROS 2

../_images/ros2_logo.jpg

The tutorials below are split between ROS 1 and ROS 2. If you aren’t sure which version to use, the ArduPilot development team recommends ROS 2 because ROS 1 is end-of-life in 2025.

Prerequisites

Before using ArduPilot with ROS, you should first be familiar with both ArduPilot and ROS before trying to integrate them together.

  • Learn how to use ArduPilot first by following the relevant wiki for Rover, Copter or Plane. In particular, make sure the vehicle works well in Manual and Autonomous modes like Guided and Auto before trying to use ROS.

  • Learn how to use ROS by reading the ROS 1 tutorials or the ROS 2 tutorials. In the case of a problem with ROS, it is best to ask on ROS community forums or Robotics Stack Exchange first (or google your error). You will find many other tutorials about ROS like Emlid.

MAVROS

MAVROS is a ROS package that can convert between ROS topics and MAVLink messages allowing ArduPilot vehicles to communicate with ROS. The MAVROS code can be found here. Starting in ArduPilot 4.5, ArduPilot supports a direct DDS interface compatible with ROS 2, which removes the need to use MAVROS for certain applications.

ROS 1

ROS 2

Conclusion

ROS is capable of extending autopilot capabilities with a wider ecosystem of technologies that can run on more powerful computers.

Here is ArduPilot Rover performing path planning around objects using ROS navigation.

We are keen to improve ArduPilot’s support of ROS so if you find issues (such as commands that do not seem to be supported), please report them in the ArduPilot issues list with a title that includes “ROS” and we will attempt to resolve them as quickly as possible.