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

Add GUI plugin to control wave environment #31

Merged
merged 13 commits into from
May 16, 2022

Conversation

srmainwaring
Copy link
Owner

@srmainwaring srmainwaring commented May 16, 2022

This PR adds a GUI plugin to control the wave environment. This version allows the wind speed and wind angle parameters for the ECKV cosine-2S spectrum to be adjusted at run time.

There are placeholders for toggling the waterline, water patch and submerged triangle marker visuals, but they are not activated in this PR.

Closes #30

Usage

Build:

$ cd ~/ign_ws/src/asv_wave_sim/ign-marine/src/gui/plugins/waves_control
$ mkdir build && cd build
$ cmake ..
$ make

Configure:

$ cd ~/ign_ws/src/asv_wave_sim/ign-marine/src/gui/plugins/waves_control/build
$ export IGN_GUI_PLUGIN_PATH=$IGN_GUI_PLUGIN_PATH:$(pwd)

Run:

From the sidebar menu select Waves Control

WavesGUIPluginPrototype

- Use the gui_system_plugin example as a starting point

Signed-off-by: Rhys Mainwaring <[email protected]>
- Add checkboxes and parameter fields

Signed-off-by: Rhys Mainwaring <[email protected]>
- Add checkboxes and callbacks for adding and removing markers

Signed-off-by: Rhys Mainwaring <[email protected]>
- Publish a param.proto message containing the wave params

Signed-off-by: Rhys Mainwaring <[email protected]>
- Subscribe to params in waves visual. Tile can only be updated on the render thread.

Signed-off-by: Rhys Mainwaring <[email protected]>
…plugin

- Subscribe to params in waves model plugin.

Signed-off-by: Rhys Mainwaring <[email protected]>
- Subscribe to params in wavefield
- Revert changes to wave model system plugin (moved update to wavefield).

Signed-off-by: Rhys Mainwaring <[email protected]>
- Fix wavefield parameter callback

Signed-off-by: Rhys Mainwaring <[email protected]>
- Reverse displacement direction when switching from matrix to cartesian indexing

Signed-off-by: Rhys Mainwaring <[email protected]>
- Change default wave angle to agree with model SDF

Signed-off-by: Rhys Mainwaring <[email protected]>
- Change wave param topic to be /world/<world>/waves
- Modify Wavefield ctor to accept the world name as parameter
- Modify WaveVisual, WaveModel and WaveControl GUI plugin to extract world name from ECM

Signed-off-by: Rhys Mainwaring <[email protected]>
@srmainwaring srmainwaring self-assigned this May 16, 2022
@srmainwaring srmainwaring added the enhancement New feature or request label May 16, 2022
@srmainwaring srmainwaring merged commit 417bf23 into ign-marine May 16, 2022
@srmainwaring srmainwaring deleted the feature/gui-plugin branch May 16, 2022 13:58
srmainwaring added a commit that referenced this pull request May 17, 2022
* Initial version of waves control gui plugin

- Use the gui_system_plugin example as a starting point

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 2. add parameter fields

- Add checkboxes and parameter fields

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 3. add checkboxes for markers

- Add checkboxes and callbacks for adding and removing markers

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 4. publish wave params message

- Publish a param.proto message containing the wave params

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 5. subscribe to wave params in waves visual

- Subscribe to params in waves visual. Tile can only be updated on the render thread.

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 6. subscribe to wave params in waves model plugin

- Subscribe to params in waves model plugin.

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 6. subscribe to wave params in wavefield

- Subscribe to params in wavefield
- Revert changes to wave model system plugin (moved update to wavefield).

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 6. subscribe to wave params in wavefield

- Fix wavefield parameter callback

Signed-off-by: Rhys Mainwaring <[email protected]>

* Fix FFT error in displacements from (#27)

- Reverse displacement direction when switching from matrix to cartesian indexing

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 7. change default wave angle

- Change default wave angle to agree with model SDF

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 8. obtain world name from ECM

- Change wave param topic to be /world/<world>/waves
- Modify Wavefield ctor to accept the world name as parameter
- Modify WaveVisual, WaveModel and WaveControl GUI plugin to extract world name from ECM

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 9. disable debug prints

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 10. remove unused code

Signed-off-by: Rhys Mainwaring <[email protected]>
srmainwaring added a commit that referenced this pull request May 17, 2022
* Add GUI plugin to control wave environment (#31)

* Initial version of waves control gui plugin

- Use the gui_system_plugin example as a starting point

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 2. add parameter fields

- Add checkboxes and parameter fields

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 3. add checkboxes for markers

- Add checkboxes and callbacks for adding and removing markers

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 4. publish wave params message

- Publish a param.proto message containing the wave params

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 5. subscribe to wave params in waves visual

- Subscribe to params in waves visual. Tile can only be updated on the render thread.

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 6. subscribe to wave params in waves model plugin

- Subscribe to params in waves model plugin.

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 6. subscribe to wave params in wavefield

- Subscribe to params in wavefield
- Revert changes to wave model system plugin (moved update to wavefield).

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 6. subscribe to wave params in wavefield

- Fix wavefield parameter callback

Signed-off-by: Rhys Mainwaring <[email protected]>

* Fix FFT error in displacements from (#27)

- Reverse displacement direction when switching from matrix to cartesian indexing

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 7. change default wave angle

- Change default wave angle to agree with model SDF

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 8. obtain world name from ECM

- Change wave param topic to be /world/<world>/waves
- Modify Wavefield ctor to accept the world name as parameter
- Modify WaveVisual, WaveModel and WaveControl GUI plugin to extract world name from ECM

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 9. disable debug prints

Signed-off-by: Rhys Mainwaring <[email protected]>

* Waves control GUI plugin: 10. remove unused code

Signed-off-by: Rhys Mainwaring <[email protected]>

* Add GUI plugin to control wave environment - header migration

Signed-off-by: Rhys Mainwaring <[email protected]>
@srmainwaring srmainwaring mentioned this pull request Jun 30, 2022
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant