PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.16k stars 13.36k forks source link

PX4 Standard VTOL Gazebo Classic HITL Sensor Error #21658

Open Deltarr350 opened 1 year ago

Deltarr350 commented 1 year ago

Describe the bug

Hello I am currently trying to run a HITL simulation on Gazebo Classic 11 and Ubuntu 20.04 of the standard_vtol_hitl model. Following the instructions found here: https://docs.px4.io/main/en/simulation/hitl.html , I was able to launch my custom model on Gazebo and also start QGroundControl successfully. The QGroundControl was also able to connect to my Pixhawk 4 Mini Board. However, the status on QGroundControl is 'Not Ready', with the following errors:

  1. Critical: Preflight Fail: Airspeed invalid
  2. Critical: Preflight Fail: height estimate error
  3. Critical: Preflight Fail: Found 0 compass (required: 1)
  4. EMERGENCY: Baro sensor #0 failure: Timeout

Additionally, the side pane indicates Magnetometer and AHRS are showing error status

To Reproduce

Steps to reproduce the behavior:

  1. Connect pixhawk board via usb
  2. Modify the field in the standard_vtol_hitl.sdf file accordingly
  3. Set 1
  4. On terminal, run:
    • cd PX4-Autopilot
    • DONT_RUN=1 make px4_sitl_default gazebo-classic
    • source Tools/simulation/gazebo-classic/setup_gazebo.bash $h $(pwd) $(pwd)/build/px4_sitl_default
    • gazebo Tools/simulation/gazebo-classic/sitl_gazebo-classic/worlds/hitl_standard_vtol.world
  5. On a separate terminal window, run:
    • ./QGroundControl.AppImage

Expected behavior

QGroundControl shows 'Ready' status, no sensor errors

Log Files and Screenshots

photo_2023-05-31_11-39-32 photo_2023-05-31_11-39-37

Drone (please complete the following information):

Additional context

N/A

vacoff commented 11 months ago

I also have the exact issue on my setup: gazebo and Ubuntu 22. Can't find any solution.

NanyongGit commented 5 months ago

Having this issue now on my jmavsim and Ubuntu 22

FilBk commented 4 months ago

I'm still facing the same issues on gazebo classic and ubuntu 22.0 I moved to HITL in matlab simulink instead and i'm finding similar problems with sensor fails being displayed and navigator therefore changing it's state leading to messy simulation.