gz-sim
gz-sim copied to clipboard
Location-bound wind effects
Desired behavior
Current WindEffects
plugin in Ignition Gazebo 7 (Garden) applies a force to every link in the world, regardless of where these link are found. Modelling changes in wind currents with height, or even its absence below ground or below sea level, isn't possible at the moment.
It'd be great if the WindEffects
plugin supported some form of wind force configuration that was bound to location (i.e. a 3D volume in space).
Implementation suggestion
We could turn the forceApproximatingScalingFactor
in the WindEffects
plugin into a function f(x, y, z) = p(x).q(y).r(z)
, where p(x)
, q(y)
, and r(z)
are piecewise cubic polynomials (ie. splines). There would be no need to embedded complex math expressions in SDF files, and both voxel grids and simple surfaces would be easy to describe.
Additional context
This feature is to be used to support surface winds in a maritime robotics simulation.
FYI @caguero
As a few motivating examples for WindEffects
plugin configuration, consider the following:
<!-- Approximate wind force for links at z > 0 using a scaling factor of 1 -->
<forceApproximation>
<!-- Assume zero everywhere a `scalingFactor` is not defined -->
<scalingFactor zmin="0">1.</scalingFactor>
</forceApproximation>
<!-- Approximate wind force for links at z > 0 using a scaling factor of 1 at z = 0, then increasing quadratically with height -->
<forceApproximation>
<scalingFactor zmin="0">
<!-- Compute scaling factor as .01 z^2 + 1 for links at z > 0 -->
<z>0. 0.01 0. 1.</z>
</scalingFactor>
</forceApproximation>