Unable to start QGC mission flight mode with PX4 HITL simulation

조회 수: 8 (최근 30일)
I have the “PX4 Autopilot in HITL Simulation with UAV Dynamics in Simulink” (Method 1 Controller Deployed on Autopilot over Normal Mode, No Monitor & Tune) example mostly working, however when the simulation is running I cannot start the mission that I uploaded through QGroundControl. I get an error message in QGC that says “Unable to start mission: Vehicle not changing to Mission flight mode”.
How do I enable mission flight mode in the Simulink controller that I deploy to the hardware so I can fly the mission in QGC?
Follow on question: when I deploy the Simulink controller, which flight mode is it overriding in the PX4 stock firmware? Position flight mode? Stabilize flight mode? Altitude? All of them? Is it possible to design a flight controller so that when I switch into “Acro” mode for example, my custom controller is active, but if I want to have a failsafe I can switch back into the stock “position” flight mode?
Thank you for your help

채택된 답변

Venkat Siddarth Reddy
Venkat Siddarth Reddy 2023년 12월 28일
Hi @Judson,
I understand that you trying to use "Method -1" of "PX4 Autopilot in Hardware-in-the-Loop (HITL) Simulation with UAV Dynamics in Simulink" example, but you are getting an error “Unable to start mission: Vehicle not changing to Mission flight mode” in QGroundControl.
The error seems to be an issue with the SD Card functionalities.
To troubleshoot the issue:
  • Format the SD card and run the example again.
  • Use an alternate SD card in the given situation to confirm that the initial SD card was not defective.
I hope this helps!
  댓글 수: 2
Judson
Judson 2023년 12월 31일
This was exactly the problem, thank you. Replacing the SD card fixed it, despite the fact that the old SD card worked on my last flight.
Any advice on how to control which flight mode in the PX firmware I am overwriting?
Thanks again!
John conner
John conner 2024년 2월 28일
on https://nl.mathworks.com/help/supportpkg/px4/ref/px4-stock-hitl-simulink-example.html you can go to Navigation block, and then Quadcopter Navigation Algorithm-> Guidance system. now you have 4 flight modes. you can add some others or just edit these blocks.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Muhammad Saad
Muhammad Saad 2025년 4월 29일
Prefer changing the sd card

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by