Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waves fail if wind_speed is between 0.26 and 0.39 #172

Open
ellen-thaum opened this issue Oct 14, 2024 · 1 comment
Open

Waves fail if wind_speed is between 0.26 and 0.39 #172

ellen-thaum opened this issue Oct 14, 2024 · 1 comment

Comments

@ellen-thaum
Copy link

Hi Rhys,

I stumbled across some odd behaviour...

Issue

If the wind_speed parameter is set to a number between approximately 0.26 and 0.39 the waves fail to spawn in Gazebo.

Minimal example

Set wind_speed to 0.3 in the 'WavesModel' and 'WavesVisual' plugins of 'gz-waves-models/world_models/waves/model.sdf':

      <wave>
        <!-- `fft` wave parameters -->
        <algorithm>fft</algorithm>
        <tile_size>256</tile_size>
        <cell_count>256</cell_count>
        <wind_speed>0.3</wind_speed>
        <wind_angle_deg>135</wind_angle_deg>
        <steepness>2</steepness>
      </wave>

Re-build and run waves.sdf:

colcon build --merge-install
gz sim -v4 waves.sdf

The waves don't appear and all objects fall:
Example of failure

Note: I removed the wam-v to avoid setting up ArduPilotPlugin in a minimal environment.

There were no unusual messages in the output, so I wouldn't know where to start looking for the problem.

Check

Resetting wind_speed to 5.0 and re-running gz sim waves.sdf, everything looks fine:
Example of success

Any idea what might be causing particular values of wind_speed to fail?

Thanks for the great package.

Regards,

Ellen

@srmainwaring
Copy link
Owner

Hi @ellen-thaum, thanks for the report. I can reproduce the issue on macOS. If the simulation is started in the paused state it's clear that the wave mesh is not generated which is why the objects fall through the surface.

If the simulation is already running and the wind scale is changed using the WaveControl widget the mesh remains and objects stay on the surface. The waves stop when the wind parameter drops below ~1, then resume when it is increased again. I'd previously thought this was simply because the amplitude scale was too small to notice the waves, but it's apparent that something else is going on as well.

I suspect there is an overflow somewhere in the spectrum generator or spreading function when the wind parameter is small - I'll investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants