Generate Source Files for ROS
To add MAVlink messages/dialects while working with ROS:
Follow the MAVROS source install instructions to install the mavlink-gbp-release which is the MAVlink library released for ROS.
Uninstall the MAVlink package for ROS if previously installed.
sh
bash
sudo apt-get remove ros-${rosversion -d}-mavlink
code
or source `devel/setup.bash` of your catkin workspace to override the library directory.
3. In the `mavlink-gbp-release`, add the new MAVlink message to `common.xml` or add the new dialect `dialect_name.xml` in the `message definitions`. Do not checkout your MAVlink branch because it is not the version synced with ROS.
4. Generate the MAVlink headers `catkin build mavlink`. You can find the headers in `~/catkin_ws/build/mavlink/include/`.