Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TigerWuu opened this issue Oct 1, 2024 · 1 comment
Open

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

TigerWuu opened this issue Oct 1, 2024 · 1 comment

Comments

@TigerWuu
Copy link

TigerWuu commented Oct 1, 2024

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

@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Oct 1, 2024

@TigerWuu Thanks for reporting the bug. Feel free to open a pull request for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants