SOAR-UWU / UWU-Blobfish

General repo for Underwater Unit 2024
6 stars 0 forks source link

feat: Pull in Gazebo Sim work #24

Closed Interpause closed 4 weeks ago

Interpause commented 4 weeks ago

Overview

Merging branch into main as I now need to touch more widespread code to further integrate the robot into the simulator.

Robot Model

A very simplified Blobfish has been added in, courtesy of me debugging the Fusion 360 SDF exporter for a few hours. There is also a pool with solid walls, with the main issue being Gazebo doesn't support texture tiling.

There is reasonable hydrodynamics and the thrusters work. I anticipate we will never be able to make the simulation physically accurate, hence further development will rely on assumptions like "moving/turning fixed distances is accurate irl". After all, motor PID values, and strategy PID values (which frankly shouldn't exist) won't be transferrable to real life when tuned in the simulator.

Gazebo Launch Files & Customization

The UI for Gazebo has been customized. It is necessary at some point to do so if we decide to add our own UI plugins, as Gazebo disables all default system and UI plugins if you add even a single one. Also I added some cool, non-default plugins, like the ability to drag to apply torque and force to the robot.

Launch files have been added for the simulation. Each world will have its own launch file. The main launch file launch.py will run robot.launch.py to compile the robot's xacro file at runtime, launch the world launch file and topic bridges. One example of a topic bridge is the keypress bridge between Gazebo and our own ROS keypress system. Any world specific nodes or bridges can go in each world's launch file.

Gazebo Tutorials

A large quantity of links to tutorials, guides and relevant API documentation has been added to uwu_sim/README.md. Going forwards, most important packages should have their own README.md.

Misc

Should've been done on another branch and merged into main, but already done here: