UAV Toolbox Support Package for PX4 Autopilots - Pixhawk 4 Flight Experiment
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jae Won Han
el 10 de En. de 2023
Editada: Arun Mathamkode
el 11 de En. de 2023
I designed PX4 Position & Attitude controller in Simulink and built and uploaded to pixhawk4 using UAV Toolbox Support Package for PX4 Autopilots.
I uploaded the controller to pixhawk4 using the px4Demo_FlightController_top.slx file of Simulink's Px4DemoHostTargetWithSimulinkPlantStart.
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.
I judged that only the controller was replaced by a new model and had no effect on the MAVLINK module. (https://kr.mathworks.com/help/supportpkg/px4/ug/px4-capabilities-integration.html)
However, pixhawk4 is connected in QGroundControl, but only Not Ready appears repeatedly, and SD Card Logging also failed repeatedly.
Quadrotor Arming and flight using RC Transmitter are possible, but the position controller cannot be validated because it is not ready on QGroundControl.
Can MAVLINK's communication loss occur while uploading Simulink's controller to Pixhawk4?
Do I need to modify the MAVLINK module of px4 firmware to resolve this?
0 comentarios
Respuesta aceptada
Arun Mathamkode
el 11 de En. de 2023
Editada: Arun Mathamkode
el 11 de En. de 2023
Only controller is replaced from Simulink and MAVLink module is untouched. I am not convinced from this description that the No ready status shown just because of MAVLink communication loss. I dont see any point in modifying the MAVlink module because I dont think this issue comes from the mavlink module sources. If you doubt there is MAVLink data loss, check the telemetry connection you have and see if that is causing any packet loss. There can be multiple other reasons as well, Uncaliberated Senors, or GPS signal getting lost or RC loss etc can also be the reason for Not ready status. Ensure GPS, RC and Sensors, Battery etc are proper.
Not related to this problem, but I see that you are still using the Host Target model for Pixhawk hardware as well. I would recommend using the controller model that is designed and tested for Pixhawk hardware available in the PX4 HITL example.
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!