Using Simulink to read/send MAVlink packets to/from a PX4

조회 수: 17 (최근 30일)
Nikhil Srivastava
Nikhil Srivastava 2024년 8월 9일
답변: Pratyush 2024년 8월 16일
Hello,
I am getting an "Arrays have incompatible sizes for this operation" error when running the 'jetsoncpu_pixhawk_interface' public Simulink model. I am hooked up to the PX4 Cube Orange Plus flight controller. Regardless of when I use the serial send/receive blocks or even the MAVlink blocks, I run into this issue.
Please let me know if anyone has any suggestions for this issue.

답변 (1개)

Pratyush
Pratyush 2024년 8월 16일
Hello Nikhil,
To resolve the "Arrays have incompatible sizes for this operation" error in the jetsoncpu_pixhawk_interface Simulink model with the PX4 Cube Orange Plus, try the following:
  1. Ensure Serial Send/Receive and MAVLink blocks have matching data types and sizes.
  2. Use Simulink's signal dimension display to identify mismatches.
  3. Verify hardware setup consistency, including sample times and data rates.
  4. Use conversion blocks like Reshape or Concatenate for size compatibility.
  5. Confirm correct message IDs and payload sizes.
  6. Use "Update Model" to refresh the setup.
  7. Inspect variable sizes to locate mismatches.
  8. Step through execution to pinpoint errors.
  9. Follow model and library setup guidelines.
These steps should help identify and fix the error.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by