July 25 2022
I have been reading and researching about AUVs over the last couple years. I gained more knowledge leading the SAUVC team at our school last year. Since then, I have learned many interesting concepts that combined my knowledge of maths, physics, and computer science in ways I couldn't have conceived.
During my recent research I gained knowledge about physics simulators that are the most used[1].
Airsim - A dynamic and high fidelity simulation that can be used to capture training data for application in machine learning models and has support for Gym.
UWSim - A underwater simulation for ROVs built on ROS/ROS2 and Gazebo to emulate robot subroutines.
URSim - A Unity (game engine) simulation that incorporates ROS/ROS2 to emulate robot subroutines
Credit: A Review of Physics Simulators for Robotic Applications[1] - Table 5
Many of these systems are built on game engines, such as Microsoft AirSim using Unreal Engine 4 or URSim using Unity, mainly due to their high development efficiency, large communities, and pre-built photorealistic graphics rendering pipelines. However, I realised that I would need to invest time to learn how the engine works to extract the highest performance and avoid insidious bugs that can slow down the development process. On the other hand, custom engines are scarce, simulators such as UWSim[2], UUVSim[3], and Stonefish[4] have fallen out of development and lack the active communities and documentation of bigger projects. These systems would require significant time investment to understand and work around. One framework that I found was being consistently referenced and used in the majority robotics systems was ROS[6] which facilitates computationally efficient and structured control systems.
For now, I've narrowed down my selection to the following two options: Implement Fossen's control algorithms in a game engine, or build my own custom engine in (Python or C++). In either case I will first build and test the robot (as well as create the appropriate CAD files) with ROS before proceeding to the development of the simulator, which will make its implementation a lot easier.
When researching different frameworks I ran into many compatibility issues with the operating system that I was using —MacOS. To resolve this, I switched to another computer and, for the first time, installed Linux. Many developers have a preference for Linux due to it's built-in developer tools and a highly supported platform for software development in general. It took time to adjust to the new system, there were changes to fundamental elements that I'd come to expect after being accustomed to Mac. It was frustrating to learn how to do even basic tasks that had become second nature on my other computer, but at the same time it was clear that were many benefits to using other systems as well. For instance, Linux boasts a built-in package manager for installing libraries that often made the vexing process, into a simple and intuitive one. After a few days of setting up editors, installing libraries, and troubleshooting, I finally got the ROS2 test up and running. Voilà!
Initially, I thought the most time effective method would be to complete the simulation first, and then build the robot based on the simulation; But during the course of my work on the simulation, I realised I needed to take a step back, have patience, and reconsider my methodology. It made more sense to build the AUV first, program the prerequisite hardware and software systems as well as design the appropriate CAD files. Since then, I have learned many interesting concepts that combined my knowledge of maths, physics, and computer science in ways I couldn't conceive. I now have a clearer idea of the steps that need to be taken. I am now very excited to move on to the next phase of my project. I look forward to building the robot, and testing out the motors. I will be sharing my progress in the next blog post soon, stay tuned!
References/Research -
[1] A Review of Physics Simulators for Robotic Applications
[2] The Underwater Simulator UWSim Benchmarking Capabilities on Autonomous Grasping
[3] UUV Simulator: A Gazebo-based package for underwater intervention and multi-robot simulation
[5] HoloOcean: An Underwater Robotics Simulator
[6] ROS: an open-source Robot Operating System
[8] Modelling and Control of Industrial ROVs
[9] (Book) Guidance and Control of Ocean Vehicles - Thor I. Fossen