# Underwater Wireless Communications for Cooperative Robotics with UWSim-NET
## 1 Introduction
Among them, AquaSim (github: [[https://github.com/rmartin5/aqua-sim-ng](https://github.com/rmartin5/aqua-sim-ng)]([https://github.com/rmartin5/aqua-sim-ng](https://github.com/rmartin5/aqua-sim-ng))) [12; 13] is one of the most popular packages that permits the modeling of acoustic communications in UWSN. It has been implemented as a Network Simulator 3 (NS3) module, and models the majority of network  
Figure 1: Illustration of the underwater wireless communication system envisioned for the TWINBOT project: (**a**) on the surface, an acoustic link from the boat or a buoy will provide communication with the AUVs; and (**b**) on the seafloor, the leader will incorporate an acoustic modem to communicate with the surface. A short range communication based on RF or VLC will be used between the AUVs on the seafloor. protocols, from physical to routing layers. Among the UWSN protocols implemented in AquaSim [14; 15], the experiments in this manuscript consider CS-ALOHA and SFAMA that will be briefly described later in Section 2.2. The underwater acoustic network (UAN) framework is another module available in NS3, which models the physical and link layers of acoustic communications in underwater network scenarios, and also allows modeling AUVs. Its major limitation is the small number of medium access control (MAC) protocols that can be used CW-MAC [16], RC-MAC, and ALOHA. AquaSim permits a higher variety of MAC protocols than UAN. However, they both only permit the modeling of acoustic modems. AquaSim and UAN are excellent tools for modeling UWSN with static nodes. They are able to model moving nodes, but the movement of the nodes is required to be defined in advance, before the simulation starts, which strongly limits them to be considered as simulation tools in cooperative robotics. Research in underwater environments requires that multiple hardware elements such as experimentation platforms, sensors and modems are properly assembled, which have to work together. Tests at sea are not appropriate for experimentation during the assembly and evaluation stages because of the high number of devices involved. Spatial limitations in the laboratory also complicates the evaluation of the complete system. Hardware-in-the-Loop (HIL) experiments take a key role during the experimentation, since they permit evaluating some of the hardware devices while the remaining devices are modeled by software. The underwater simulator (UWSim), developed by the authors [17], has proven to be an excellent tool in modeling underwater robots, and also as a Human-Robot Interface (HRI) in robotic experimentation. In this work, we discuss some of the characteristics of UWSim-NET, an extension of UWSim for modeling the behavior of underwater wireless communications for a network of robots. UWSim-NET permits modeling the physical and link layers of an underwater wireless communication system. It also permits evaluating several MAC protocols and to freely modify the position of the nodes during the simulation in order to perform HIL tests. Some experiments conducted with UWSim-NET are also presented in order to show how it can be exploited to benefit the research community in communications for underwater robotic swarms. The remainder of the manuscript is organized as follows. The UWSim-NET is presented in Section 2, which details its architecture and the way the UWSim-NET elements are configured for each simulation. In Section 3, experiments demonstrating the capabilities of the simulator are presented. Firstly, an experiment with two ROVs was performed to demonstrate the modeling of the properties of the physical layer such as the packet loss, collisions, propagation delay and FIFOs. The second experiment aimed to demonstrate the ability to compare different MAC layers in a more complex scenario, such as in the case of the TWINBOT project. The last experiment consisted of the remote control of a team of cooperative robots in HIL (Hardware In the Loop), comparing the results of a teleoperation protocol over two MAC protocols.