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

Location-bound wind effects

Open hidmic opened this issue 2 years ago • 2 comments

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.

hidmic avatar Feb 22 '22 18:02 hidmic

FYI @caguero

hidmic avatar Feb 22 '22 18:02 hidmic

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>

hidmic avatar Feb 22 '22 20:02 hidmic