Lafith Mattara


AUV-Simulator

auvdemo.gif
Figure 1: AUV Simulator

Overview

A simulator recreates a real-world system virtually such that one can test the system rigorously. In the case of robotics a simulator can be very useful for the software development team for testing and optimizing their code before the deployment of the robot/vehicle.

Code is available here

A game engine is a very powerful software and in fact an easier choice as we have to simulate a noisy underwater environment. Further the aim was to create different competion arenas with many 3D obstacles. Aforementioned reasons led to the choice of Unity as the main development tool and Blender for creating 3D models as it is easier to import models from blender to Unity.

The main software stack containing the control algorithm and the image processing pipeline were done using ROS nodes. Hence a ROSBridge library at the Unity end and RosBridge suite at the ROS end were used to communicate and transfer data between the both systems. This simulator contains the arenas for SAUVC-2020 and ROBOSUB-2019.

What is simulated

A noisy underwater environment using the fog system of Unity as well as the underwater caustics. Following the design of Tiburon's AUV the model has two cameras (front & bottom). Now lets discuss about the important data transfer implemented. Simulator will obtain following data every frame:

  1. Orientation
  2. Acceleration
  3. Depth of AUV from the surface
  4. Forward velocity

This data is converted into a 8 point floating array which then will be sent over a ros topic named /combined. The frames captured by both cameras will be compressed and then encoded into Base64 String format. These will also be combined and sent over the ros topic /images. In turn simulator will recieve the thruster values to be applied for all 6 thrusters using ROS subscriber over the ros topic /thruster_speeds.

This is the main cycle of transfer of simulated data, further one can write more ROS Publishers and ROS Subscribers as per their usecase.

Date: 2023-03-10 Fri 00:00

Emacs 27.1 (Org mode 9.3)