Trouble checking windspeeds set during gazebo simulation

Hello All,

I was trying to change the default windspeed for px4 gazebo simulation and experiment with different windspeed values. Currently, I am using px4 version 1.12.3 on a MACOS. Gazebo is being run on a headless mode. I am not using QGC. I have added the plugin in windy.world and set the windVelocityMean value to 16.0. I am using ros to run my missions. I used the HEADLESS=1 make px4_sitl gazebo_iris__windy command to launch px4 and gazebo. Everything loads fine and my missions complete without any issue.

Now, while running px4 and the missions, is there any way (apart from through QGC) through which I can verify the windspeed that I have actually set in windy.world?

I tried analyzing my ulog files generated after the mission completed, through flight review tool. But I do not see the graphs for Airspeeds in it. This is my ulg file: https://review.px4.io/plot_app?log=eaa0271a-1d0d-4a04-bc73-acb570f3b57b I noticed that some of the other public logs available in flight review do have the Airspeed graphs in them. I do not understand why that is the case.
Can anyone help me understand how I can view the Airspeed graphs for my log?

Also, should we be looking at the Airspeed graphs alone to check whether the desired windspeed that we have set up in gazebo actually got reflected while the mission ran? Or, do we need to look someplace else?

Note: I tried using the command airspeed_selector start in px4 before I ran my missions, and then analyzed my logs again. I still did not get the Airspeed graphs.

Any suggestions would be really appreciated!

I tried analyzing my ulog files generated after the mission completed, through flight review tool. But I do not see the graphs for Airspeeds in it. This is my ulg file: https://review.px4.io/plot_app?log=eaa0271a-1d0d-4a04-bc73-acb570f3b57b I noticed that some of the other public logs available in flight review do have the Airspeed graphs in them. I do not understand why that is the case.
Can anyone help me understand how I can view the Airspeed graphs for my log?

@Josh SITL is simulating the PX4 firmware itself, therefore the data logged is quite similar to what you will see on a real vehicle. The Gazebo Iris model does not have an airspeed sensor as most of multicopters do not have an airspeed sensor attached.

You can find other vehicles that have an airspeed sensor such as VTOLs or planes. They are attached as a sensor plugin in PX4-SITL_gazebo-classic/models/plane/plane.sdf.jinja at 27298574ce33a79ba6cfc31ed4604974605e7257 · PX4/PX4-SITL_gazebo-classic · GitHub

Now, while running px4 and the missions, is there any way (apart from through QGC) through which I can verify the windspeed that I have actually set in windy.world?

The wind speed you see in QGC is the “estimated” wind speed. You can look at what the wind topic is in the simulator (gazebo): PX4-SITL_gazebo-classic/src/gazebo_wind_plugin.cpp at 27298574ce33a79ba6cfc31ed4604974605e7257 · PX4/PX4-SITL_gazebo-classic · GitHub

1 Like

@Jaeyoung-Lim Thanks! I was able to change the model & now I can see the airspeeds. One more quick question: Even though the Iris model does not have the airspeed sensors, if one sets the windspeed through windy.world and uses the Iris model, the wind (as a force) should still be effecting the vehichle in some ways like say during lift/drag calculation or other calculations? Do correct me if I am wrong.

One more quick question: Even though the Iris model does not have the airspeed sensors, if one sets the windspeed through windy.world and uses the Iris model, the wind (as a force) should still be effecting the vehichle in some ways like say during lift/drag calculation or other calculations?

@Josh Yes, it affects the inflow of the motors and therefore has influence on the thrust and drag and also the rolling moment of the rotors: PX4-SITL_gazebo-classic/src/gazebo_motor_model.cpp at 27298574ce33a79ba6cfc31ed4604974605e7257 · PX4/PX4-SITL_gazebo-classic · GitHub

2 Likes

Great! Thanks for the information.