Unable to simulate wind via make px4_sitl gz_x500_windy

Hello everyone,

I’m posting a solution to an issue I encountered while trying to run the standard windy simulation with Gazebo Harmonic.

My Environment:

  • OS: Ubuntu 22.04
  • Gazebo Version: Harmonic
  • PX4 Version: PX4-Autopilot main branch
  • Launch Command: make px4_sitl gz_x500_windy

Issues:

When running the standard gz_x500_windy launch command, the simulation would start, but there were no signs of wind. I tried to debug this with the following steps:

  1. No Visual Effect: The drone would hover perfectly still with no drift.
  2. No Airspeed Output: I checked the vehicle’s airspeed sensor topic using the following command, but it produced no output,
    gz topic -e -t /world/windy/model/x500_0/link/airspeed_link/sensor/air_speed/air_speed
  3. Missing Wind Topic: I was wondering if gazebo will have some topics for us to access the wind information, and chatGPT gave me this command. However, it did not show any topic named this. The only relevant gz topic that I see is the air_speed one above.
    gz topic -l | grep /world/windy/wind

Additionally, there is a missing ekf2 data warning when I run the make command, I am not sure if that is relevant to this issue.

Wind info publication is only available in newer versions of Gazebo

Some work was done here to subscribe to this new data and publish differential pressure but it was not merged.

The wind does effect the models, you can’t visually see a difference unless you crank up the wind velocity in the windy.sdf

As far as I know, there is no airspeed sensor on the gz_x500. That’s why you cannot echo the airspeed information through gz topic -e -t