What is mavros? simplest explanation!

MAVROS:

 Micro Aerial Vehicle Robotic Operating System (MAVROS

it is a comprehensive ROS package that makes use of the Micro Air Vehicle Link (MAVLink) communication library . It serves as a gateway for sending and receiving information between ROS nodes and a MAVLink compatible FC.

MAVROS is a pivotal ROS (Robot Operating System) package that acts as a communication bridge between MAVLink-compatible flight controllers (like PX4 or ArduPilot) and the ROS ecosystem. It enables seamless integration of UAV telemetry, sensor data, and high-level control commands into robotic systems via ROS topics, services, and actions. Supporting both serial and network (UDP/TCP) interfaces, MAVROS allows developers to connect drones to ground-based computers or cloud systems for mission planning, simulation (SITL), and real-time operations. In ROS 1, MAVROS has been a mature and widely used tool, but with the emergence of ROS 2, the community is actively porting MAVROS for compatibility with DDS-based communication. MAVROS 2 is under continuous development, offering essential plugins for telemetry, state publishing, and offboard control. For developers transitioning to ROS 2, alternatives such as PX4’s native ROS 2 DDS bridge (px4_ros_com) offer tighter real-time integration. However, MAVROS remains a powerful and flexible solution for UAV integration in both legacy and modern robotic workflows, whether for indoor simulation, field deployment, or multi-agent swarm systems.

FC:Flight controller 

mavros vs mavLink


 Mavros Provides a method of connecting to a FC over serial port, User Data-gram Protocol (UDP) or TCP. This flexibility is important for software testing with a simulated FC executing locally, allowing for cohesion between FC hardware execution and SITL simulation testing.

 Acting as a bridge from MAVLink to ROS, MAVROS supplies the medium to interface PC/external server  with the UAV’s FC for high-level control


MAVROS and ROS2:

With the evolution from ROS 1 to ROS 2, MAVROS is also undergoing a significant transition to support the next-generation robotic middleware. MAVROS for ROS 2, often referred to as MAVROS 2, is being actively developed to operate on top of the Data Distribution Service (DDS) layer, the communication backbone of ROS 2. This new architecture enables improved performance, real-time capabilities, and scalability for UAV systems. While still maturing, MAVROS 2 brings forward essential plugins such as state estimation, IMU streaming, offboard control, and waypoint handling, restructured to leverage ROS 2’s node lifecycle, QoS settings, and multi-threading capabilities. Although not as feature-complete as the ROS 1 version yet, MAVROS 2 is gaining rapid traction in the PX4 and ROS communities, particularly for developers building swarm systems, autonomous drones, and ground station integrations. For applications requiring tighter synchronization and lower latency, alternatives like px4_ros_com (PX4’s native ROS 2 interface) may be considered, but MAVROS 2 remains a robust, flexible entry point for ROS 2-based UAV development.


                                                  ***