UAV Toolbox Support Package for PX4 Autopilots - Pixhawk 4 Flight preparation
조회 수: 4 (최근 30일)
이전 댓글 표시
The project I am working on is to design a controller in Simulink using UAV Toolbox Support Package for PX4 Autopilots and distribute it to Pixhawk4 to enable actual flight.
I designed Position&Altitude Controller and Attitude Controller as my model and uploaded it to Pixhawk4 using Build&Deploy.
It was confirmed that the auto code generated by Simulink was generated in the px4_simulink_app folder as follows. I confirmed that auto code generation replaces firmware with newly generated code from existing px4 firmware.
In order to verify the actual hardware flight performance of the controller I designed myself, I tried to conduct a flight test of a quadrotor equipped with a Pixhawk4 through QGrondControl. However, even when Arming at QGroundControl, the motor did not arm and eventually failed the flight test.
What additional work is required to apply the Auto generated Simulink code to the actual flight?
Should I change the input and output variables of the Auto-generated controller to the same as the variables of the code connected by px4 firmware? I'm looking for related data, but I'm having a hard time because I can't find a case where the actual flight took place.
댓글 수: 3
Edorado Baldacci
2023년 9월 19일
you mean the passage below?
- Make sure your autopilot not in HITL mode. Ensure that you uncheck the 'Enable HITL Mode' in the Model Configuration paramters so that the Autopilot not in HITL mode. Verify the same in QGC as well.
- When you say you arm the drone, did you just arm it in the Simulink model or did you use the safety switch to arm the drone. For PX4 Autopilots the software arming as well as hardware arming using safety switch is required for successful arming.
- Enable the PWM error staus output from the PWM block and observe for any error status.
Because I already tried this.
채택된 답변
Arun Mathamkode
2022년 12월 28일
편집: Arun Mathamkode
2022년 12월 28일
As per my understanding there are no specific steps other than what you did to deploy code for an actual flight. I can provide some direction for you investigate and understand what might be going wrong here.
- Make sure your autopilot not in HITL mode. Ensure that you uncheck the 'Enable HITL Mode' in the Model Configuration paramters so that the Autopilot not in HITL mode. Verify the same in QGC as well.
- When you say you arm the drone, did you just arm it in the Simulink model or did you use the safety switch to arm the drone. For PX4 Autopilots the software arming as well as hardware arming using safety switch is required for successful arming.
- Enable the PWM error staus output from the PWM block and observe for any error status.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!