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

PX4 Standard VTOL Gazebo Classic HITL Sensor Error

Open Deltarr350 opened this issue 2 years ago • 3 comments

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 <serialDevice></serialDevice> field in the standard_vtol_hitl.sdf file accordingly
  3. Set <hil_mode>1</hil_mode>
  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
  1. 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):

  • Standard VTOL HITL

Additional context

N/A

Deltarr350 avatar May 31 '23 03:05 Deltarr350

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

vacoff avatar Sep 25 '23 09:09 vacoff

Having this issue now on my jmavsim and Ubuntu 22

NanyongGit avatar Mar 15 '24 08:03 NanyongGit

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.

FilBk avatar Apr 29 '24 08:04 FilBk