ethzasl_fw_px4 icon indicating copy to clipboard operation
ethzasl_fw_px4 copied to clipboard

Add windshear plugin for dynamics soaring

Open Jaeyoung-Lim opened this issue 3 years ago • 2 comments

Describe problem solved by this pull request This PR adds a gazebo windshear plugin, which can be used to test dynamic soaring

Previously the wind plugin was a world plugin so that the same wind velocity is broadcast to all models in the gazebo world. For our purpose, the gazebo_wind_shear_plugin is added as a model plugin so that the wind strength can depend on the model pose.

Describe your solution A specific SITL target with airframe plane_dynamicsoaring is created and can be run with the following command.

make px4_sitl gazebo_plane_dynamicsoaring

A linear wind gradient is implemented so that the wind gradient stays the same regardless of the altitude. We can extend this plugin to include more complicated wind plugins in the future.

The plugin can be configured with the following parameters

    <plugin name='wind_shear_plugin' filename='libgazebo_wind_shear_plugin.so'>
      <frameId>base_link</frameId>
      <robotNamespace/>
      <xyzOffset>1 0 0</xyzOffset>
      <windDirectionMean>0 1 0</windDirectionMean>
      <windVelocityMax>15.0</windVelocityMax>
      <windGustDirection>0 0 0</windGustDirection>
      <windGustDuration>0</windGustDuration>
      <windGustStart>0</windGustStart>
      <windGustVelocityMean>0</windGustVelocityMean>
      <windShearGradient>0.2</windShearGradient>
      <windShearOffset>0.0</windShearOffset>
      <windPubTopic>world_wind</windPubTopic>
    </plugin>

FYI @MarvinHarms

Test data / coverage Tested in SITL Gazebo (flightlog: log), flying loiter circles at the same location with different altitudes. You can see the wind estimates varying depending on the altitude.

To reproduce:

make px4_sitl gazebo_plane_dynamicsoaring

Additional context

  • The wind field visualization is not present. This would require another visual plugin and will follow up with an additional PR

Jaeyoung-Lim avatar Feb 20 '22 10:02 Jaeyoung-Lim

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar May 31 '22 01:05 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

stale[bot] avatar Sep 09 '22 02:09 stale[bot]