Error in PX4 SITL with UAV Toolbox Support Package for PX4 Autopilots

10 visualizaciones (últimos 30 días)
I'm performing SITL on Windows 11 with jmavsim using UAV Toolbox Support Package for PX4 Autopilots but I got an error:
On the diagnostic view I got:
Top model targets built: Model Action Rebuild Reason ==================================================================================
openloop_2022b Code generated. Global variable px4_Bus_actuator_armed changed. 1 of 1 models built (0 models already up to date) Build duration: 0h 2m 11.97s
action: EXT_INIT Creating Target Handler (XCP on TCP/IP)... Build directory: D:\model validation\matlab2022b\openloop_2022b_ert_rtw Target name: 127.0.0.1 Target port: 17725 action: EXT_CONNECT Connecting to the target...
External Mode Open Protocol Connect command failed
Caused by:
  • Could not connect to target application: XCP TCP/IP error: Connect failed
Component:Simulink | Category:Block diagram error
Unable to connect to the 'PX4 Host Target' target for 'openloop_2022b'.
On the cmd, I got:

Respuesta aceptada

Thiago Felippe
Thiago Felippe el 20 de Sept. de 2023
I had the same problem. I found the following workaround:
  • Click in "Monitor & Tune"
  • Wait for the Simulink error. Wait a little more.
  • Don't close the command window nor the jMAVSim
  • Go in the down arrow in "Monitor & Tune" and change it to "Connect" (under "Step by Step Commands"). See image below:
  • Wait until the connection is made
  • Click in "Start" (it shows in place of "Monitor & Tune"). See image below:
  • And it is done!
I think the Simulink doesn't wait to PX4 Host Target to fully boot up before trying to communicate with it.

Más respuestas (0)

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by