ROS (Robot Operating System) MAVLink Integration Tutorial
MAVLink ROS Bridge Installation
The ETH PIXHAWK team provides a MAVLink to ROS bridge for the most common messages. The bridge translates between UART/serial ports and UDP links transporting MAVLink and a ROS instance on the computer.
$HOMEis your home directory, if your username is john, this would be /home/john on Linux and /Users/john on Mac OS.
/opt/ros/fuerteis where ROS has been installed to. Adjust this if you have ROS installed to a different location
Either change to the ROS workspace:
Or if you want to have a different directory (as we do), add it to the
ROS_PACKAGE_PATH. To do this, edit
$HOME/.bashrc (on a Linux box) or
$HOME/.bash_profile (on a mac) and add the package path after sourcing the ROS setup script (if you do not have the source .. line in your script you should probably add it):
source /opt/ros/fuerte/setup.sh export ROS_PACKAGE_PATH=$HOME/src:$ROS_PACKAGE_PATH
Close ALL terminals after this step and re-open them (pros can source the .bash* file, and leave the terminal open).
Now go to the directory where you want to put the MAVLink bridge, either the ROS workspace:
Or a different directory, as we do:
Download the MAVLink bridge:
git clone https://github.com/mavlink/mavlink_ros.git
Change into the directory and compile
cd mavlink_ros rosmake