Unable to run example PX4 in Hardware-in-the-Loop (HITL) Simulation with jMAVSim Simulator
Show older comments
Hello, when I run the example PX4 in Hardware-in-the-Loop (HITL) Simulation with jMAVSim Simulator - MATLAB & Simulink - MathWorks Italia I get the following error:
Top model targets built: Model Action Rebuild Reason ================================================================================== px4demo_QGCWaypointFollower_hitl Code generated. Incremental checksum changed. 1 of 1 models built (0 models already up to date) Build duration: 0h 3m 27.816s
action: EXT_INIT Creating Target Handler (XCP on Serial)... Build directory: C:\Users\paolo\OneDrive\Documenti\Tesi_magistrale\px4demo_QGCWaypointFollower_hitl_ert_rtw Serial Port Name: COM4 Baud Rate: 1152000 action: EXT_CONNECT Connecting to the target...
External Mode Open Protocol Connect command failed
Caused by:
- Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command
Component:Simulink | Category:Block diagram error
And JMAVSim doesn't open.
The build is ok, but seems somthing is wrong with the connection. My setup is:
- Pixracer R15
- Serial-to-USB FTDI converter
- Micro USB type-B cable
The port setup is show in photo, I have serial port COM3 e COM4. 

And this is my hardware settings:
- Build options > Automatically determine serial port for firmwareupload √
- Enable HITL Mode > Simulator: JMAVSim √
- External mode > Hardware board serial port: /dev/tty/S1
- External mode > Host serial port: COM4
- MAVLink > Enable MAVLink on /dev/ttyACM0 √
- /dev/ttyS1 > Baud rate : 1152000
Accepted Answer
More Answers (0)
Categories
Find more on Guidance, Navigation, and Control in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!