## 3 Description of the Solution
### Description of a Middleware for Underwater Environments  
This section describes the authors' proposal for a new open-source semantic middleware, which is the central component of a new DDS-based system able to coordinate a swarm of vehicles together with other support vehicles, such as USVs and vessels, to collaboratively achieve a common goal. The middleware solution proposed here is part of an open-source architecture consisting of three main functional components, the Mission Management Tool (MMT), the middleware solution, and the Robot System:  
1. The _MMT_ is responsible for generating missions, which are usually composed of (a) tasks; (b) operations required to assign tasks to robots; and (c) operations to supervise the mission. The MMT is located in the CCS, which can be placed on a vessel or onshore during missions. The MMT also contains the Human-Computer Interface (HCI), which allows a human operator to interact with the system, define missions, control each robot, and supervise the evolution of the mission performed by the vehicles. The _Semantic Middleware_ guarantees communication between the MMT and all underwater and overwater vehicles, regardless of type, manufacturer, and capabilities, using buoys or USVs as communication nodes. It uses semantics to infer knowledge from the gathered information. Also, the middleware is the responsible to integrate the DDS communication endpoint on the robot. 3. The _Robot System_ enables a robot to interact and execute the commands provided by the MMT using the Middleware Core. It offers an interface between the underlying functionality of vehicles and the middleware. Functional and physical components of the proposed architecture and the communications links are shown above in Figure 3. Here, the distributed nature of the semantic middleware that has been designed across the different physical components of the maritime vehicles has been highlighted. Note that a _DDS Proxy_ module has been placed as the responsible for providing a DDS-compatible communication channel to the Robot System, providing a bridge between the messages used by robots and the DDS messages, thus ensuring that all robots are able to understand that a CCS has been defined. A DDS Proxy is a middleware component that has to be installed in a robot for interoperability between the software components located at the CCS and the robot itself. Being ROS (Robot Operating System) the most common open-source operating system for robots up to now, the middleware provides a ROS-DDS Proxy module whose responsibility is to connect ROS based vehicles to the middleware. Robot Systems with proprietary interfaces (HW/SW solutions for controlling an AUV) could be connected to the middleware to cooperate with other connected vehicles by using a specific ROS Proxy that should be built by the manufacturer. DDS Proxies provide the middleware with the scalability and flexibility needed to integrate heterogeneous Robot Systems. The Semantic Middleware centralizes communications, providing the system the capability to receive, process, and disseminate messages/data between the MMT and the vehicles. The middleware architecture is in charge of mission execution and control, receiving from the CCS the sequence of individual tasks to be accomplished to complete a mission, and sending them to the specific vehicles involved. The middleware also receives feedback from the vehicles involved in the task of a mission and updates the tasks state at the MMT. Different priorities can be assigned to the different messages exchanged by the middleware depending on the source of the message (e.g., MMT, vehicles) and type of message, e.g., emergency, control, telemetry, etc.