I use the sample code from this : https://docs.px4.io/v1.12/en/ros/mavros_offboard.html
In the past, it took off vertically and can complete a triangle trajectory
However, it suddenly goes wrongly with this error.
[health_and_arming_checks] Preflight Fail: High Accelerometer Bias
The below is the recorded video
The sample code trajectory becomes not perfect triangle.
I noticed that if using
roslaunch px4 mavros_posix_sitl.launch the issue happened after one flight
However, if using
make px4_sitl gazebo, there is no issue. I can control the drone to take off vertically with QGroundcontrol, ref: https://docs.px4.io/main/en/simulation/gazebo_vehicles.html
The same issue happens when running
roslaunch px4 posix_sitl.launch and take off with QGroundControl
Thus, the issue may be due to px4 posix_sitl.launch in the PX4-Autopilot
The same issue happens in a real drone, https://github.com/PX4/PX4-Autopilot/issues/10833
I also notice the rostopic echo /mavros/imu/data
similar issue ref: https://github.com/mavlink/mavros/issues/1133
The acceleration is not 0, when it did not move.