PX4-Autopilot: Acceleration and Gyro sensors send STALE error messages

Describe the bug

When running gz simulation normally, two different errors appears shortly after starting:

ERROR [sensors] Accel #0 fail:  STALE!
ERROR [sensors] Gyro #0 fail:  STALE!

To my knowledge, this was first reported by @slgrobotics in https://github.com/PX4/PX4-Autopilot/pull/22550#issuecomment-1946286865.

To Reproduce

On current main branch (74303a79e195083144c9d63fd2346b5828015a31) run

make px4_sitl gz_x500

Expected behavior

No error should appear.

Screenshot / Media

No response

Flight Log

N/A

Software Version

Current main 74303a79e195083144c9d63fd2346b5828015a31

Flight controller

SITL

Vehicle type

None

How are the different components wired up (including port information)

No response

Additional context

No response

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 31 (24 by maintainers)

Most upvoted comments

It would be good to know why this is occurring as it is unexpected behaviour.

@dagar @frede791 Let the submodule dance begin!

@dagar @Jaeyoung-Lim @PerFrivik @slgrobotics As discussed yesterday in the call, the issue can be fixed by adding some noise distributions to the imu sensor in the sdf file. I test ran this using the screenshot below and it worked fine. @Jaeyoung-Lim mentioned that we should use the values based on what was used in gazebo-classic. I will look into this.

image

@goupil35000 a temporary solution until @dagar replies is to interactively rebase on your branch and remove the following commit:

https://github.com/PX4/PX4-Autopilot/pull/22736

@vibgyor-s It seems the system has been idle for a long time (20+ minutes). I also receive these warnings, which could be related to the estimator. With minimal acceleration data for fusion, the estimator may struggle to handle drift effectively.

@VBS2004 @slgrobotics @PerFrivik @goupil35000 The gz submodule has been updated by PR https://github.com/PX4/PX4-Autopilot/pull/22841. Please check that the models you need are working without the error message.

It is done in https://github.com/PX4/PX4-gazebo-models, but the submodule hash in PX4 main is old

@PerFrivik Many Thanks.

I will wait until @dagar’s changes. I will retest after.

The error seems to be caused by removing the line param set-default SENS_IMU_MODE 0 from the rcS file. It seems that when running gz it no longer gets set to any value leading to the checkFailover function being called in the voted_sensors_update.cpp file which creates this error.