Working with MAVlink messages in ROS without Mavros

Our current project relies on using ROS to interact with a drone and control station (GCS). The drone and GCS both communicate via MAVLink, so the obvious answer is to use Mavros. Mavros connects to the drone and control system and forwards messages between the two, while making a lot of status information available on ROS topics, and allowing commands to be sent to ROS topics to control the drone.

This seemed like a good idea at first, but there was a problem for our project, we actually wanted to intercept the messages and add some logic to…