UAV Toolbox Support Package for PX4 Autopilots : Simulink FlightController Build Failed

10 views (last 30 days)
I am trying to build a controller model and upload it to Pixhawk 4 using the UAV Toolbox support package for px4 Autopilots. Currently, we want to build on Windows 11, Matlab 2022a, UAV Toolbox Support Package for PX4 Autopilots version 22.1.1.
Toolbox was installed and Pixhaw 4 was selected in Hardware Setup.
The project was opened by typing "Px4DemoHostTargetWithSimulinkPlantStart" in the MATLAB Command Window. And among them, I opened the "FlightController.slx" model and tried to build and upload it, but the following error occurred.
I don't think there's an error in the model because it's a model provided by this Toolbox, and I think there's something I've missed.
What additional environment settings are needed if the model imported using Toolbox fails? Is there a possibility that this model is incomplete?
This process was referred to in the "UAV Toolbox Support Package for PX4 Autopilots User's Guide".

Answers (1)

Jianxin Sun
Jianxin Sun on 4 Aug 2022
Edited: Jianxin Sun on 4 Aug 2022
Hi,
I assume you are trying out the following example:
According to the example steps, you should use "PX4 Host Target" and "px4_sitl_default" configuration during hardware setup.
If you want to upload the controller to Pixhawk hardware and simulate, you can follow steps in the hardware in the loop simulation example: https://www.mathworks.com/help/supportpkg/px4/ref/hitl-simulink-plant-example.html

Community Treasure Hunt

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

Start Hunting!

Translated by