Position Tracking for X-Configuration Quadcopter error in accel and gyro sensors

조회 수: 2 (최근 30일)
Hi,
I am trying to make a sitl simulation, using the “px4demo_PositionController_quadrotor” model of Matlab/Simulink, as the main controller and the px4 firmware as model, following the Matlab guide: Position Tracking for X-Configuration Quadcopter - MATLAB & Simulink Example - MathWorks Italia.
The connection works and QGroundController also is connected but after some seconds QGC give the Accel #0 fail: TIMEOUT! error and also the gyro error. I am using the JMavSimulator, the Matlab 2021b version, the python 3.8 version, Windows 10 os, and the latest versions of PX4 firmware and QGC. In addition to this, doing Monitor and Tune, the px4 terminal is open but is empty (there isn't the classic logo opened) and I can't write on it. Instead if I Run the Simulink model, the terminal works but I still have the accel and gyro errors.

답변 (1개)

Arun Mathamkode
Arun Mathamkode 2023년 3월 29일
The error you are getting looks like an issue of connectivity between the plant (jMAVSim) and the PX4 Host Target. The plant should update the sensor values to PX4 SITL in regular intervals, if not you will see such errors. Since Simulink doesn't play any part in connectivity between jMAVSim and PX4 Host Target, this might be an issue from PX4 itself. I would recommend you use MATLAB version R2022b or the Recently released R2023a. In the above versions, we support PX4 v1.12.3 and you might not see these issues. The empty PX4 Host Target terminal window is also fixed in the above relese versions and you should be able to enter commands through the terminal.
  댓글 수: 1
Flavia Gioiello
Flavia Gioiello 2023년 3월 29일
Thank you for an answer but I have also tried with both versions R2022b and R2023a and PX4 v1.12.3:
I have no more that error but the drone fall off on the grass in the simulation and I have the "Check: setting sched params for wq:lp_default failed" error on PX4 terminal. I tried also both Win10 and Win11 in three different computer but I have the same error all the times and the drone crashed on the lawn, even it does some pirouettes!

댓글을 달려면 로그인하십시오.

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by