PX4 HIL with Pixhawk 6x : HIL with simulink plant dynamics using Sik Telemetry Radio. Could not connect to target application: XCP serial port error
조회 수: 10 (최근 30일)
이전 댓글 표시
I want to perform HIL with pixhawk 6x using Telemetry radio(Holybro 100mW 433Mhz) instead of the FTDI converter. So I connect the pixhawk via USB type C to PC.One of the telemetry radio is connected to TELEM1 and the other one is connected to USB to PC.
The Pixhawk linked via USB type C is COM9 and the Telemetry radio is COM10 in my PC.
I want to perform HIL using the UAV dynamics on simulink via "Monitor and tune" (https://uk.mathworks.com/help/supportpkg/px4/ref/hitl-simulink-plant-example.html#responsive_offcanvas ) in Matlab 2023b on windows 11. In the setting QGC as the Mathworks documentation says:
- Set HITL mode
- Airframe HIL Quadcopter X
- Set Flight mode
- In the General tab of the settings menu, clear all AutoConnect options except Sik (should I select UDP instead of Sik?i've tried both)
- Set MAV_0_CONFIG to disabled
I've set the following parameters too:
- COM_RC_IN_MODE to Joystick only (virtual joystick option was selected too)
- COM_DISARM_LAND set to -1
- NAV_ACC_RAD set to 10
- NAV_RCL_ACT to disabled
In the Hardware setting in Simulink in the external mode I've selected:
- Hardware board serial port /dev/ttyS6 (TELEM1) (I've also set a band rate of 921600)
- Host serial port : COM10
I've enabled the HIL mode and in the build option I've selected Automatically determine serial port for firmware upload.
When I run through "MONITOR AND TUNE", it displays this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1510374/image.png)
How can I solve this problem? Are some setting wrong?
댓글 수: 1
Ankur Bose
2023년 10월 16일
Please note that from MATLAB & Simulink, the Wireless Monitor & Tune workflow has not been tested. This workflow sometimes works, but at other times due to data drop in wireless mode, the connection errors out. For running Monitor & Tune, we recommend wired connection.
채택된 답변
Ankur Bose
2023년 11월 16일
Note that from MATLAB & Simulink, the Wireless Monitor & Tune workflow has not been tested. This workflow sometimes works, but at other times due to data drop in wireless mode, the connection errors out. For running Monitor & Tune, we recommend wired connection.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!