PX4 Standard VTOL Gazebo Classic HITL Sensor Error
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:
- Critical: Preflight Fail: Airspeed invalid
- Critical: Preflight Fail: height estimate error
- Critical: Preflight Fail: Found 0 compass (required: 1)
- 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:
- Connect pixhawk board via usb
- Modify the <serialDevice></serialDevice> field in the standard_vtol_hitl.sdf file accordingly
- Set <hil_mode>1</hil_mode>
- 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
- On a separate terminal window, run:
- ./QGroundControl.AppImage
Expected behavior
QGroundControl shows 'Ready' status, no sensor errors
Log Files and Screenshots
Drone (please complete the following information):
- Standard VTOL HITL
Additional context
N/A
I also have the exact issue on my setup: gazebo and Ubuntu 22. Can't find any solution.
Having this issue now on my jmavsim and Ubuntu 22
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.