osrf / mbari_wec_gz

Simulation of wave energy harvesting buoy
Apache License 2.0
18 stars 2 forks source link

Spring Mean Piston Position #136

Closed andermi closed 1 year ago

andermi commented 1 year ago

may now specify desired mean piston position in empy

to test, in a sourced terminal:

$ empy -D 'inc_wave_spectrum_type="None"' -o install/buoy_description/share/buoy_description/models/mbari_wec/model.sdf install/buoy_description/share/buoy_description/models/mbari_wec/model.sdf.em
$ ros2 launch buoy_gazebo mbari_wec.launch.py extra_gz_args:='-rs' regenerate_models:=false

and in another sourced terminal:

$ ros2 topic echo /spring_data

and check that range_finder settles close to the desired default value of 0.7m

can also define other values:

$ empy -D 'x_mean_pos=0.9' -D 'inc_wave_spectrum_type="None"' -o install/buoy_description/share/buoy_description/models/mbari_wec/model.sdf install/buoy_description/share/buoy_description/models/mbari_wec/model.sdf.em

should settle close to 0.9m

Also added to batch parameters and model regen in tests

TODO:

hamilton8415 commented 1 year ago

Impressive job. I will run and test on friday afternoon.

andermi commented 1 year ago

Everything is passing except the hardcoded coeffs files in the heaveonly & pitchonly tests, as well as the experiment_comparison test. I think I will temporarily ignore mean piston position, adjust the spring to match the testbench, then put the desired mean piston position back and give the OK on whatever the spring looks like in the comparison test. Thoughts?

hamilton8415 commented 1 year ago

Running nicely for me. As for the tests, I will take to improve the hard-coded paths. For the experiment comparison, as you suggest seems fine. Choices seem to be to have the experiment comparison not match in pressure, or have the default piston position be pretty low. mean position as a launch file argument that would allow the experiment test to set it where it needs to? I think that's a bigger discussion about how/where all of these burgeoning parameters can be set from... Monday.

andermi commented 1 year ago

mean position as a launch file argument that would allow the experiment test to set it where it needs to?

Yeah we could definitely do that -- good idea!

andermi commented 1 year ago

should be all set!

andermi commented 1 year ago

@hamilton8415 Go ahead and merge if you'd like to