PX4 - GPS denied simulation - Gazebo

I am trying to simulate x500 gazebo drone with px4 and ros2 so it does not use GPS for arming, taking off and landing but everytime I stop sensor_gps_sim from running, start running sensor_baro_sim and set parammeters as it is said here: PX4-ROS2 VIO navigation in GPS denied condition - #3 by gugafelds or here: Using the ECL EKF | PX4 User Guide I get this INFO message: pxh> INFO [tone_alarm] notify negative
Can anyone help me settup my simulation so it works without using GPS?
I had set up everything by following this tutorial: How to setup PX4 SITL with ROS2 and XRCE-DDS Gazebo simulation on Ubuntu 22 - YouTube

Thank you in advance.

Just some tops i remember

When setting up the simulation environment, the key aspect is to correctly configure the PX4 parameters to support non-GPS operation. The INFO [tone_alarm] notify negative message typically suggests that there’s an issue with the system configuration or the pre-arm checks that prevents the drone from arming.

Here are some steps to troubleshoot your issue:

  1. Ensure your system configuration parameters are set properly. Specifically, you need to set EKF2_AID_MASK to 3 to disable GPS aiding and enable vision pose estimate, and EKF2_HGT_MODE to 1 to use the barometer as the primary height sensor instead of the GPS. Ensure you save these parameters before continuing.

  2. Since you are trying to work without a GPS, you will have to disable the GPS related checks

  3. Depending on the specific sensor setup, you might need to adjust the EKF2_EV_DELAY and EKF2_EV_NOISE parameters as well. This depends on the noise characteristics and latency of your specific sensors.

  4. Check the EKF2 Innovations in QGroundControl or via mavlink console to ensure that your sensors are operating properly and the EKF2 filter is correctly estimating the drone’s state.

  5. If you are using vision-based systems for position estimate, ensure your visual odometry message (/mavros/vision_pose/pose) is being published and the covariance values are set appropriately. Sometimes, having a covariance too high or too low can cause the EKF2 filter to reject the data from the visual odometry system.

  6. Since you are simulating a drone, you must ensure that your simulated sensors are operating correctly. Check that the sensor_baro_sim is publishing valid data and that the sensor_gps_sim is not publishing any data (since you’ve said you’ve turned it off).

1 Like

Thank you very much, I will try to do all the steps you have provided :slight_smile:

Were you able to reach a conclusion after testing?
If you have successfully achieved control with VIO, could you share the resources you used or any GitHub page?