No change in behaviour after setting wind in SITL

Hi,

after starting SITL with:
sim_vehicle.py -v ArduCopter -f gazebo-iris --console
and starting Gazebo with ardupilot_gazebo plugin:
gazebo --verbose ardupilot_gazebo/worlds/iris_arducopter_runway.world

i changed the parameter SIM_WIND_SPD to 15 but the behavior of the drone shows no difference in gazebo. Furthermore the parameter wind in the console is showing -/-, but the parameter is saved with 15 to the eeprom.bin.

I assume that i won’t notice any difference in guided mode anyway, but even in stabilize the drone is drifting slowly across the map with rc 3 1500 (and it seems to me that the direction is random, but i’m not sure).

I use Gazebo 9 and the latest ArduCopter V4.0.4-dev

You can’t see wind estimation in Copter. The code used inside Ardupilot for wind estimation works for plane only since you have to know airspeed for wind estimation.
Try simulating using plane. You will see the effect of wind.

Hi, is it still the same for Arducopter, that SIM_WIND_SPD will not change behaviour in SITL ?
Further, using the same parameter I tried changing this parameter SIM_WIND_SPD to 15 for Arduplane Zephyr_delta_wing plane and still it doesn’t have any change in behaviour & in mavproxy the parameter of the wind speed doesn’t change.

Changing the SITL wind speed parameter SIM_WIND_SPD will not have any effect on the physics in Gazebo (since the SITL environment parameters are not communicated to Gazebo).

The wind in Gazebo may be set in the world file. For example:

<wind>
  <linear_velocity>10 0 0</linear_velocity>
</wind>

sets the wind velocity to be 10 m/s in the direction of the positive x-axis.

At present Gazebo Garden does not have a service that allows the wind velocity to be set at run time. Furthermore the lift drag plugin does not incorporate the wind velocity in its calculations - so the only impact on the physics from wind speed will be via the system plugin gz::sim::systems::WindEffects which applies a simple scaling factor based force to the body if it has the

<enable_wind>true</enable_wind>

element set.

1 Like

hello,
I wonder where I can find the full code for wind plugin.
Also, should I apply this code to runway.world?