gz-sim icon indicating copy to clipboard operation
gz-sim copied to clipboard

Hydrodynamic added mass

Open chapulina opened this issue 2 years ago • 2 comments

Desired behavior

Gazebo's Hydrodynamics plugin can be used to apply forces due to added mass (i.e. the forces required to dislocate the fluid around a body moving underwater). However, using a plugin to apply such forces causes the simulation to be less stable, because it's reacting to the acceleration results at the end of a time step. Ideally, the added mass effect would be accounted for as part of the body's 6x6 inertia matrix.

Alternatives considered

Keep using the approach on the Hydrodynamics plugin.

Implementation suggestion

DART's Inertia class can be initialized with any arbitrary 6x6 spatial inertia tensor. So we could expose that to Gazebo users by:

  • [x] Extending the math::Inertial class to support all the terms, or creating a new class that wraps the current Inertial. It would be interesting to hold the mass matrix separately from the current mass matrix so they can be inspected and manipulated separately. https://github.com/gazebosim/gz-math/pull/459
  • [ ] Extending the SDF spec to expose the 21 unique coefficients in the 6x6 added mass matrix. https://github.com/gazebosim/sdformat/pull/1077
  • [ ] Making sure all the inertial data is contained in a Sim component like Inertial https://github.com/gazebosim/gz-sim/pull/1592
  • [ ] Extending the Gazebo Physics API to load these values and populate DART's spatial tensor and populating that through the Sim Physics plugin. https://github.com/gazebosim/gz-physics/pull/384

Other nice-to-haves:

  • [ ] Displaying the inertial component's data in the GUI's component inspector so it's easier for users to debug (part of https://github.com/ignitionrobotics/ign-gazebo/issues/158) https://github.com/gazebosim/gz-sim/pull/1592

Additional context

chapulina avatar Apr 27 '22 15:04 chapulina

  • SDF proposal: https://github.com/gazebosim/sdf_tutorials/pull/76

chapulina avatar May 31 '22 23:05 chapulina

Very interested in making Gazebo simulate the added mass better. Any extra links I can read up that is not mention here?

henrykotze avatar Aug 19 '22 06:08 henrykotze