Commit 7145fdc
committed
Wave-Body: Linear potential wave-body model
This is squashed history of the linear potential wave-body model.
1. Linear potential wave-body model demo (#70)
1.1. Wave Body: Add linear potential wave-body model
- Add model for an ellipsoid buoy
- Add test model for hydrodynamics models.
1.2. Wave-Body: add plugin for testing linear wave-body interaction models
- Initial version of plugin with hydrostatic restoring forces.
1.3. Wave-Body: update linear wave-body interaction model
- Add contributions to moments from hydrostatic equilibrium term (centre
of buoyancy).
1.4. Wave-Body: update linear wave-body interaction model
- Update comments and disable debug output
1.5. Wave-Body: update models for testing linear wave-body interaction model
- Set wave amplitudes to zero and compare the two hydrostatic models
1.6. Wave-Body: add hydro data file and load into plugin
- Add BEM hydro data .hdf5 file for ellipsoid (generated by capytaine / bemio)
- Add dependency on Eigen. HDF5 and HighFive to read data file (HighFive should be cloned into to workspace)
1.7. Wave-Body: use loaded hydro data in calculations
- Store loaded hydro data in a struct and replace hardcoded data.
1.8. Wave-Body: use loaded hydro data in calculations
- Clean up.
1.9. Wave-Body: load remaining hydro data
- Complete loading of all hydro data (except for state space model data)
- Load routines can be factored out and consolidated (2nd pass)
1.10. Wave-Body: split update into contributions by force type
- Split out hydrostatic force calculation.
1.11. Wave-Body: add parameter for hydro data file
- Add parameter <hydrodata> for specifying HDF5 file.
- Move model specific config under model folder.
1.12. Wave-Body: document the hydrostatics calculation
1.13. Wave-Body: use waterplane origin as reference point for displacements
1.14. Wave-Body: add radiation damping test case
- Update variable labelling for pose and vectors
- Add radiation damping test case example (hardcoded)
1.15. Wave-Body: add parameters to control which forces are calculated
- Add flags to control which force contributions are included
- Format hdf5 file reader
- Make hydrostatics forces switchable
1.16. Wave-Body: add force control parameters to ellipsoid example
1.17. Wave-Body: initial version of radiation added mass force
- Reorganise code to enable switching forces on / off
- Outline added mass calculation
1.18. Wave-Body: updated version of radiation added mass force
- Investigate a couple of methods - both approaches to capture acceleration in the force contribution are unstable.
- Alternative methods is to use the SetFluidAddedMass method of the inertial.
- This can be set on the component attached to the link entity in the plugin config, and this appears to propagate to the physics engine.
1.19. Wave-Body: replace hardcoded added mass override with parameters
- Allow the added mass and radiation damping to be set in parameters
- Remove added mass calculation from update and set inertial in config
- Add example parameters to demo world
1.20. Wave-Body: replace hardcoded radiation damping override with parameters
- Allow the radiation damping to be set in parameters
1.21. Wave-Body: add gravity calculation
- Add aliases for Vector6d and Matrix6d
- Add gravity calculation to use instead of global physics engine gravity
- Required when enabling added mass
- Update added mass calculation to use gazebosim/gz-physics#384
1.22. Fluid added mass: update added mass example
- Clean and symmetrise matrix
1.23. Fluid added mass: add code to symmetrise added mass (disabled)
1.24. Fluid added mass: add flags for additional debug info
1.25. Fluid added mass: cleanup
1.26. Wave Excitation: add parameters for constant coefficient overrides
- Add parameters for storing wave excitation force coefficients
- Add template specialisation to read Eigen::Vector6d
- Add example data to sdf model
- Remove stale code for added mass adjustments from class declaration
1.27. Wave Excitation: implement excitation force for regular waves
- Add overrides for wave period, height and phase
- Update documentation describing added mass calculation
- Implement constant coefficient excitation calculation for regular waves
- Update wave model to used trochoids with steepness = 0 (direction not implemented for sinusoids)
- Rename elements for wave excitation force components
1.28. Wave Excitation: correct buoyancy moment calculation
- Correct the buoyancy moment calculation for larger displacements.
- Add missing parameter read for the flag to enable / disable the excitation force
1.29. Wave Excitation: implement excitation Froude-Krylov and scattering force components
- Add example coefficients for excitation Froude-Krylove and scattering components.
- Read parameters in Config.
- Implement force calculations for new components.
- Initialise vectors and matrices to zero.
1.30. Wave Excitation: rename variables using Kane/monogram notation
- Rename pose, vectors using Kane/monogram notation described in the Drake docs.
- Fix gravity calculation.
- Factor out common link state updates.
1.31. Wave Body: update example model and add notes
1.32. Wave Body: add force publishers
- Publish force and torque if enabled
- Add parameters to enable force publishing
- Update launch script to enable ROS bridge for forces
1.33. Wave Body: configure buoy example to use all forces
- Set initial position to origin for linear potential model example
- Update document with references
1.34. Wave Body: refactor flags and publishers
- Group flags into structs to reduce clutter.
- Move debug flags into their own SDF element.
1.35. Wave Body: refactor hydro coefficient overrides
- Group coefficients into structs to reduce clutter.
- Reorganise hydro coefficient elements in SDF.
- Move waves and sim environment params into separate structs.
- Add override for hydrostatic linear restoring.
1.36. Wave Body: add geometry overrides
- Add section for geometry overrides.
- Rename the initial pose the body waterplane.
1.37. Wave Body Tests: add wave models for test cases
- Add regular wave models with different periods and amplitudes.
1.38. Wave Body: fix geometry overrides
- Fix issue with parsing SDF and ensure SDF example valid.
1.39. Wave Body: use waves test model
1.40. Wave Body: revert waves.sdf to original
- Move ellipsoid test to new world file.
1.41. Wave Body: add world for ellipsoid test case
1.42. Wave Body Tests: add spheroid test case
- Add spheroid for added mass Test1a
1.42. Wave Body Tests: update spheroid test case
- Add ROS launch file for tests.
- Update BEM coeffs from WEC-Sim example
1.43. Wave Body: improve overrides - 1
- Rename hydro coefficient class.
- Handle override for hydrostatic restoring.
1.44. Wave Body: improve overrides - 2
- Move HDF5 reader to separate function.
1.45. Wave Excitation: fix error in torque calculation
- Fix indexing error in torque lookup.
- Shorten spatial force names.
1.46. Wave Body Hydrostatics: update treatment of CoB offset from CoM
- Use the initial offset of the CoB from CoM in updates - tricky as CoB is dynamic but linear model appears to rely on this being at initial position.
1.47 Wave Body: improve overrides - 3
- Refactor duplicated code in array read functions.
1.48. Wave Body: improve overrides - 4
- Refactor SDF element names.
- Change <hydrodata> to <hdf5_file> as the element is a file name.
- Move <waves> up a level.
- Change <environment> to <simulation_parameters>
- Shorten <force_publishers> to <publishers>
1.49. Wave Body: improve overrides - 5
- Add notes on model and WEC-Sim data structures and modelling.
1.50. Wave Body: improve overrides - 6
- Name refactoring - preparation for introducing new structs for data that will be used in updates.
1.51. Wave Body: improve overrides - 7
- Add improved handling of overrides.
- Remove all override decision making from update loops.
- Add separate data structure to contain the hydro force coefficients used in the update loop.
- Document the load and override policy.
1.52. ROS: add a project to publish gazebo messages to ros2
1.53. ROS: add node to publish body response labelled using maritime conventions
- Add body_response_publisher
- Update launch file
1.54. ROS: update README
1.55. ROS: correct topic name for excitation force
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2. Wave Body: improve overrides - 8 (#71)
- Remove hardcoded frequency index used to lookup hydro coeffs from hdf5 data.
- Coefficients from hdf5 are linearly interpolated and scaled given the frequency in the simulation params.
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
3. Wave Body: use model:// URI to specify BEM file location (#72)
- Use model://<model_path_to_config> URI syntax to locate BEM data files.
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
4. Wave Body: Update example regular wave models (#73)
4.1 Wave Body: rename regular wave example models to refer to wave height rather than amplitude
- Use wave height in linear wave-body model SDF and in the names of the example regular wave models.
4.2 Wave Body: add extra regular wave models to cover spectrum
- Add low and high frequency examples.
4.3. Wave Body: reset wave model used by examples
- Set examples to use regular_waves_6s_2m model - this matches the override hydro coefficients.
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
5. Wave Body: add checks when reading the hdf5 file (#74)
5.1. Wave Body: add checks when reading the hdf5 file
- Check that datasets are present before loading.
- Check that data is not empty before attempting to display.
5.2. Wave Body: update comments to clarify scaled means non-dimensioned
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
6. Wave Body: add publisher for added mass force (#75)
- Add publisher for estimated added mass force.
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
7. Wave Body MBARI: add MBARI buoy example for testing (#76)
- Add test model for the MBARI WEC buoy (float only)
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
8. Wave Body MBARI: add collision mesh and change default BEM file (#77)
8.1. Wave Body MBARI: add collision mesh for buoy
- Add simplified collision meshes for the buoy at different levels of refinement.
- Use the mesh with 316 faces in the model.
- Add BEM file generated using Capytaine and the 5548 face mesh.
8.2. Wave Body MBARI: change default the BEM data file
- The excitation data in the hdf5 file generated from WAMIT data has the wrong sign, use Capytaine / bemio generated file in the meanwhile.
- Simplify ramp function.
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
9. Wave Body MBARI: fix ramp function missing bracket (#78)
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
10. Wave Body: don't use auto with Eigen (#79)
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
11. Wave Body: update cmake dependencies
- Use FetchContent to retrieve dependency HighFive.
- Fix typo in documentation.
- Remove cpp style header for mlinterp
11.1 Wave Body: update ci workflow
- Add build flag for HighFive dependency
11.2. Wave Body: update waves bridge tests
- Remove breaking tests inherited from ROS project template.
11.3.Wave Body: post rebase fixes.
11.4. Wave-Body: fix config of regular_waves_3s_1m
11.5. Wave-Body: revert changes to regular_waves model
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>1 parent 2a9ced9 commit 7145fdc
File tree
71 files changed
+36388
-2
lines changed- .github
- scripts
- workflows
- gz-waves-models
- models
- ellipsoid_buoy
- config/hydrodata
- meshes
- mbari_buoy
- config/hydrodata
- meshes
- spheroid_test1a
- config/hydrodata
- meshes
- world_models
- regular_waves_15s_2m
- regular_waves_15s_4m
- regular_waves_15s_6m
- regular_waves_1s_0.5m
- regular_waves_20s_0m
- regular_waves_3s_1m
- regular_waves_6s_2m
- regular_waves_6s_4m
- regular_waves_8s_2m
- regular_waves_8s_4m
- worlds
- gz-waves
- cmake
- src/systems
- linear_wave_body
- gz_waves_bridge
- config
- gz_waves_bridge
- launch
- resource
- rviz
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
71 files changed
+36388
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
0 commit comments