srmainwaring / asv_wave_sim

This package contains plugins that support the simulation of waves and surface vessels in Gazebo.
GNU General Public License v3.0
118 stars 32 forks source link

Migrate plugins and models to Ignition Garden #16

Closed srmainwaring closed 2 years ago

srmainwaring commented 2 years ago

This PR allows the wave simulation and hydrodynamics plugins to run on Ignition Garden

As part of the migration the code has been significantly reorganised to better reflect the structure used in Ignition. A non-exhaustive list of changes includes:

This version is using a HlmsPbs material for the Ocean rather than a custom shader. Some progress has been made to port the original shaders to Ignition, but these will follow in a subsequent update. As a result the Ocean looks a little shiny and the textures, refractions and reflections are not as before.

The default setup uses a FFT wave generator with hardcoded inputs. These can be altered manually in:

https://github.com/srmainwaring/asv_wave_sim/blob/f36bf4c5d5907e91ec0f848b977694e598ee94df/ign-marine/src/systems/waves/WavesVisual.cc#L441-L444

and

https://github.com/srmainwaring/asv_wave_sim/blob/f36bf4c5d5907e91ec0f848b977694e598ee94df/ign-marine/src/Wavefield.cc#L77-L80

These should of course be synchronised and available to set in the SDF interface.