- Ensure that you are able to run the Monitor and Tune simulation with the same target if you choose USB(/dev/ttyACM0) as the port for the Monitor and Tune simulation. This will ensure that all the customization to add Simulink generated PX4 app to the PX4 stack is done correctly.
- Ensure that the wire connections to FTDI are proper. Just Tx and Rx connections are sufficient (Hardware Tx to FTDI Rx and vice-versa). If there is a way for you to verify the FTDI connection please have a look at that as well. One way I can think of is to enable MALInk on the TELEM port and make sure you have established a connection between Pixhawk and QGC over USB. Now if you open PuTTY or any other similar application on COM6 and try to read data, you should see some MAVLink data.
PX4 HIL with Pixhawk 6x with Monitor and Tune ERROR:Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command
24 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Salvatore Matteo Mennea
am 31 Okt. 2023
Kommentiert: Ankur Bose
am 9 Nov. 2023
I'm trying to run with monitor and tune this mathworks demo https://uk.mathworks.com/help/supportpkg/px4/ref/qgc-hitl-example.html where Pixhawk is connected through USB type C cable and via FTDI converter connected to the TELEM1 port as shown in the figure above:
I follow all the instruction in the documentation:
- Set up all the parameters in QGC
- Disable MAV_0_CONFIG (for monitor and tune)
- Set up HIL mode into the simulink block with jmasim
- Set up external mode for TELEM 1 (dev/ttyS6) and Host serial port (the FTDI converter has COM6)
- Applied a baud rate of 115200 to dev/ttyS6
I have tried to make it work with TELEM1(/dev/ttyS6),TELEM2(/dev/ttyS4),TELEM3(/dev/ttyS1) , GPS2(/dev/ttyS7) ect but it does not work either. The error that appear is the following:
I'm using windows 10(version 22H2 OS build 1905.3570), Matlab 2023b and pixhawk 6x. How can I fix this problem?
0 Kommentare
Akzeptierte Antwort
Arun Mathamkode
am 2 Nov. 2023
From the details provided, the serial port mapping you used, PX4 hardware connections, QGC parameters and the configuration settings in Simulink look correct. To figure out what might be going wrong you can consider following the below steps.
2 Kommentare
Ankur Bose
am 9 Nov. 2023
It should be the USB COM port COM3. In your controller, ensure that "enable mavlink in tty/ACM0" checkbox is selected and then deployed on hardware before you run the plant model
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!