PX4-Autopilot icon indicating copy to clipboard operation
PX4-Autopilot copied to clipboard

[Bug] fixed-wing airspeed and wind estimation problem in SITL

Open TigerWuu opened this issue 4 months ago • 1 comments

Describe the bug

PX4 software-in-the-loop calculates the airspeed using differential pressure in SensorAirspeed.cpp in the simulation module. However, SensorAirspeed.cpp generates the fake differential pressure by body velocity, it will induce some airspeed calculating and wind estimation problems when the wind comes from the x-axis of the body frame
image I think a more feasible modification is using the wind triangle concept, obtaining the ground speed from uorb topic and true wind value from gazebo plugin, and calculating the true airspeed to generate the differential pressure. What do you guys think?

To Reproduce

  1. Follow the steps in https://docs.px4.io/main/en/ros2/user_guide.html to install PX4 autopilot, ROS2 and gazebo sim.
  2. Open a standard_vtol in the windy.sdf
  3. Set the wind magnitude as (0, -2, 0) using the wind tag in the sdf file. <linear_velociy>0 -2 0</linear_velociy>
  4. Arm the drone and transition to the fixed wing mode, fly straightly to the north.
  5. Open the plotjuggler to monitor the wind estimation value in the /fmu/out/wind

Expected behavior

the windspeed_east and windspeed_north value should converge to real value (0, -2) image

Screenshot / Media

No response

Flight Log

No response

Software Version

image

Flight controller

No response

Vehicle type

Hybrid VTOL

How are the different components wired up (including port information)

No response

Additional context

No response

TigerWuu avatar Oct 01 '24 14:10 TigerWuu