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

update order of wavefield parameters message #674

Closed
wants to merge 2 commits into from

Conversation

tejalbarnwal
Copy link
Collaborator

@tejalbarnwal tejalbarnwal commented Jun 10, 2023

Aims to close #651 and #650

Sub-Tasks

  • Update the order inside the wavefield parameter message published with the .sdf file
  • Tune the steepness parameter to have trochoidal-shaped waves(yet to be done)

Test it

Launching one of the 2023 practice worlds with a considerable gain parameter(like say 0.8) would work

ros2 launch vrx_gz competition.launch.py world:=2023_practice/practice_2023_stationkeeping2_task

@tejalbarnwal tejalbarnwal requested a review from M1chaelM June 10, 2023 11:26
@tejalbarnwal
Copy link
Collaborator Author

Also, I found that the 2023_practice/practice_2023_follow_path0_task*.sdf files don't include a publisher plugin to publish the wavefield parameters. I wanted to confirm if this is intentional or if I should add that snippet.

@caguero
Copy link
Contributor

caguero commented Jun 10, 2023

Also, I found that the 2023_practice/practice_2023_follow_path0_task*.sdf files don't include a publisher plugin to publish the wavefield parameters. I wanted to confirm if this is intentional or if I should add that snippet.

That wasn't intentional if that's the case. Good catch!

@tejalbarnwal
Copy link
Collaborator Author

Also, I found that the 2023_practice/practice_2023_follow_path0_task*.sdf files don't include a publisher plugin to publish the wavefield parameters. I wanted to confirm if this is intentional or if I should add that snippet.

That wasn't intentional if that's the case. Good catch!

Hey, I will update the respective world files.

I also wanted to share some experimental tuning that I performed. As Jessica mentioned in the previous weekly meeting, keeping the steepness parameter to 1 could have led to the formation of loops.
I first tried keeping the steepness to 0.5 and then slowly increasing it to 1.0 but could not observe considerable changes.
I also tried increasing the value to 10.0, hoping that maybe it would help me observe, but I couldn't.
Therefore, I created some recordings with different values of steepness parameters. I have attached them here.
It is possible I might be missing something, and it would really help if you could provide your input.

@j-herman
Copy link
Collaborator

Hi Tejal,
I took a look through the code for the wave field to try to refresh my memory on how this should work. You won't see anything change with steepness parameters above 1 because the values get clipped.
Some ideas to try for troubleshooting - zoom in a bit more than what you have in those video clips, and see if it helps distinguish wave characteristics. Try varying the gain parameter, maybe with zero wind, to see if you are getting appropriate visuals to match the wave size. You can look at the VRX Classis videos to get an idea of what the waves were like, in case that helps.
I tried running a few world's on my laptop to look at this, and the surface visuals really didn't seem to be varying the way I would have expected. Wondering if maybe we are seeing something like issue 665? I'll need to spend a little more solid time on this to be sure, and I want to run it in docker as well.

@tejalbarnwal
Copy link
Collaborator Author

Hi Tejal, I took a look through the code for the wave field to try to refresh my memory on how this should work. You won't see anything change with steepness parameters above 1 because the values get clipped. Some ideas to try for troubleshooting - zoom in a bit more than what you have in those video clips, and see if it helps distinguish wave characteristics. Try varying the gain parameter, maybe with zero wind, to see if you are getting appropriate visuals to match the wave size. You can look at the VRX Classis videos to get an idea of what the waves were like, in case that helps. I tried running a few world's on my laptop to look at this, and the surface visuals really didn't seem to be varying the way I would have expected. Wondering if maybe we are seeing something like issue 665? I'll need to spend a little more solid time on this to be sure, and I want to run it in docker as well.

I experimented with disabling the wind plugin altogether and tried playing with gain, steepness, and even period as well.
The effect of changing the period is evident, but that is not the case for steepness, even when I set the gain value to maximum(1.0).
As suggested, this time, I observed the waves from close and tried to compare them with the videos shown in vrx (gazebo classic, video link).

Though the water surface around the vehicle is sort of similar shape to that shown in the here in the top left and right images, the ocean waves shown in the bottom left and right images are different from what I am experiencing.
Further, it seems changing the steepness parameter has little effect on how ocean waves appear. I have attached an image below for the same. An obvious distinction I noticed was that a low steepness parameter resulted in less bouncing of the vehicle on the surface than a larger steepness value.

Steepness:1, period:5.0, gain:1.0
image
image

steepness:0.5, period5.0, gain:1.0
image
image

@caguero
Copy link
Contributor

caguero commented Jun 16, 2023

I experimented with disabling the wind plugin altogether and tried playing with gain, steepness, and even period as well. The effect of changing the period is evident, but that is not the case for steepness, even when I set the gain value to maximum(1.0).

One important detail is that gain can go bigger than 1. Could you double-check if steepness is more evident with higher values of gain?

@caguero
Copy link
Contributor

caguero commented Jun 16, 2023

I experimented with disabling the wind plugin altogether and tried playing with gain, steepness, and even period as well. The effect of changing the period is evident, but that is not the case for steepness, even when I set the gain value to maximum(1.0).

One important detail is that gain can go bigger than 1. Could you double-check if steepness is more evident with higher values of gain?

Another idea could be to log some values of P.x, P.y, P.z from the shader (https://github.com/osrf/vrx/blob/main/vrx_gz/models/coast_waves/materials/programs/GerstnerWaves_vs_330.glsl#L120-L122) and plot them to see if we see something interesting changing the steepness.

@tejalbarnwal
Copy link
Collaborator Author

I experimented with disabling the wind plugin altogether and tried playing with gain, steepness, and even period as well. The effect of changing the period is evident, but that is not the case for steepness, even when I set the gain value to maximum(1.0).

One important detail is that gain can go bigger than 1. Could you double-check if steepness is more evident with higher values of gain?

Another idea could be to log some values of P.x, P.y, P.z from the shader (https://github.com/osrf/vrx/blob/main/vrx_gz/models/coast_waves/materials/programs/GerstnerWaves_vs_330.glsl#L120-L122) and plot them to see if we see something interesting changing the steepness.

Okay, i will try it out today

@tejalbarnwal
Copy link
Collaborator Author

As discussed in the meeting, we can table this discussion for another time, as it appears that the steepness of ocean waves does not have a visual impact. Therefore, closing this PR.

@M1chaelM M1chaelM deleted the tejal/improve_wavefield_parameter_message branch August 2, 2023 13:45
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

Successfully merging this pull request may close these issues.

Improve Wavefield parameter tutorial and message
3 participants