MAVROS

The mavros ros package enables MAVLink extendable communication between computers running ROS, MAVLink enabled autopilots, and MAVLink enabled GCS. While MAVRos can be used to communicate with any MAVLink enabled autopilot this documentation will be in the context of enabling communication between the PX4 flight stack and a ROS enabled companion computer.

Installation

MAVROS can be installed either from source or binary. Developers working with ROS are advised to use the source installation.

Binary installation (Debian / Ubuntu)

Since v0.5 that programs available in precompiled debian packages for x86 and amd64 (x86_64).
Also v0.9+ exists in ARMv7 repo for Ubuntu armhf.
Just use apt-get for installation:

$ sudo apt-get install ros-indigo-mavros ros-indigo-mavros-extras

Source installation

Dependencies

This installation assumes you have a catkin workspace located at ~/catkin_ws If you don't create one with:

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws
$ catkin init

You will be using the ROS python tools wstool, rosinstall,and catkin_tools for this installation. While they may have been installed during your installation of ROS you can also install them with:

If you are installing mavros on a raspberry pi, you may get an error related to your os, when running "rosdep install ...". Add "--os=OS_NAME:OS_VERSION " to the rosdep command and replace OS_NAME with your OS name and OS_VERSION with your OS version (e.g. --os=debian:jessie).