Accelerometer measuremet of pixhawk 6X using UWAV Toolbox Support Package for PX4 Autopilots, MATLAB 2024a
이전 댓글 표시
I'm now trying to setup the pixhawk 6X using UAV Toolbox Support Package for PX4 Autopilots (ver. 24.12).
I successfully finished the hardware setup.
Next, I created a simple simulink file as below.
I connected the hardware and tried to see the measurement values, but I could not find the values.
(The displayed values are zero.)
Please tell me how to solve this problem.

답변 (2개)
Jatin
2024년 8월 9일
0 개 추천
To help you solve the issue, I would recommend you go through the documentation for deployment on unsupported PX4 Autopilots from Simulink:
You might also want to have a look at this MATLAB Answer:
If the issue persists, there can be various reasons of encountering zero value while monitoring accelerometer, few things you might want to check includes:
- Ensure that the accelerometer sensor on the Pixhawk is calibrated correctly.
- Use “QGroundControl” to verify that the accelerometer data is being published correctly by the Pixhawk.
- Ensure that the sample time of the PX4 accelerometer block is set correctly.
Hope this helps.
Ankur Bose
2024년 8월 14일
0 개 추천
When the hardware setup process using the hardware setup screens is almost finished, there is a screen at the end called "Test Connection" where you upload the PX4 Firmware to autopilot and fetch accelerometer data. Can you confirm if you could see the accelerometer data during Test Connection? Also, how are you running the Simulink Model? Is it deployed via Monitor & Tune OR it is running over Connected IO?
댓글 수: 19
Sakahisa Nagai
2024년 8월 15일
Ankur Bose
2024년 8월 16일
Your board has been configured in HITL mode from QGroundControl previously. in HITL mode, all onboard sensors are disabled, hence you are not getting any values when you run Connected IO simulation in Simulink. To remove the HITL mode,
- Connect the Pixhawk 6x board to QGC.
- Once the QGC is conneted, navigate to the parameters, search for SYS_HITL and set 0 as parameter value or HITL disabled.
- Restart the board
- Alternatively, you can select any non-HITL airframe in QGC and appy to the board
Sakahisa Nagai
2024년 8월 19일
Ankur Bose
2024년 8월 19일
Can you select any non-HITL airframe in QGC and then try?
Sakahisa Nagai
2024년 8월 19일
Ankur Bose
2024년 8월 19일
What is the aiframe selected in QGC?
Sakahisa Nagai
2024년 8월 19일
Ankur Bose
2024년 8월 22일
okay. navigate to the MAVLink Inspector tab in QGC. Can you see if there is a MAVLink message called HIGHRES_IMU? If yes, what are the values in the x,y, and z field of the message. You can attach a screenshot of the MAVLink inspector tab here
Sakahisa Nagai
2024년 8월 22일
Ankur Bose
2024년 8월 22일
okay. seems like the board is not in HITL mode then. Can you try running the Connected IO simulation in Simulink now?
Sakahisa Nagai
2024년 8월 22일
편집: Sakahisa Nagai
2024년 8월 22일
Ankur Bose
2024년 8월 22일
The problem syndrome you are mentioning seems similar to the PX4 bug discussed here, but since we dont see the issue with the Pixhawk 6x board we have, we are unable to verify this. Can you make the PX4 Firmware change for the above issue as mentioned here in your clone of PX4 Firmware? Basically, you need to increase the timeout to 1000ms from the current 500 ms. Once you do that, run the PX4 hardware setup screens again for your board and try Test Connection in setup screens or Connected IO simulation.
Sakahisa Nagai
2024년 8월 23일
Sakahisa Nagai
2024년 8월 23일
Ankur Bose
2024년 8월 23일
Thanks for running the experiment. Can you reach out to MathWorks Technical Support with your issue?
Sakahisa Nagai
2024년 8월 23일
Tharani
2024년 11월 28일
Were you able to solve this issue? I'm trying to resolve the same error.
Sakahisa Nagai
2024년 11월 28일
카테고리
도움말 센터 및 File Exchange에서 Cuboid Scenario Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





