Upload custom flight controller on Pixhawk 4, and flight tests
Hello.
I developed my flight controller in simulink, and i tested it In SIL, HITL following the matlab examples https://it.mathworks.com/help/supportpkg/px4/setup-and-configuration_mw_3095a711-0234-45ed-9b75-77488e8e577d.html https://it.mathworks.com/help/supportpkg/px4/setup-and-configuration_mw_06fa168c-661f-4e54-b3b0-197c970f0ac9.htm . Now i want try to perform the flight test with my fligth controller. Now, there isn’t any examples about perform real fligth tests. So, I uploaded the firmware following the HIL procedure:
Build the firmware and upload
Default startup script
Design flight controller in simulink
Boardo Pixhawk 4, whit px4_fmu-v5_default
Then after these passages i Build Start and deploy my fligth controller into Pixhawk 4.
Now if i try to connect my drone with Qground cotnrol station, all the sensors, frame, GPS, ecc… are ok. So I armed the drone and command the take off, but the motors didn’t start to spinn. I also tried with the example in matlab "px4demo_HardwareInLoopWithSimulinkPlantStart", but even this dind’t work. A strange thing is that when i armed and command the take off, i saw (in Qg mavlink inspector) that the actuator_commands change his values to 2000 us, but the engines doesn’t move ( i use the PWM channel block). I alredy cheked that all the wires are connected, and also i tesed the engines via Qg and they works. So I guess that i miss something in the configuration for perform real fligth.
I also tried to uplod custom startup script, but i didn’t undestand very well the procedure. But in any case the default script should work, because it already disable the mc_postion_controller, and mc_attitude_controller.
I anyone have some guides to follow, or some adevices. Thanks in advance.Hello.
I developed my flight controller in simulink, and i tested it In SIL, HITL following the matlab examples https://it.mathworks.com/help/supportpkg/px4/setup-and-configuration_mw_3095a711-0234-45ed-9b75-77488e8e577d.html https://it.mathworks.com/help/supportpkg/px4/setup-and-configuration_mw_06fa168c-661f-4e54-b3b0-197c970f0ac9.htm . Now i want try to perform the flight test with my fligth controller. Now, there isn’t any examples about perform real fligth tests. So, I uploaded the firmware following the HIL procedure:
Build the firmware and upload
Default startup script
Design flight controller in simulink
Boardo Pixhawk 4, whit px4_fmu-v5_default
Then after these passages i Build Start and deploy my fligth controller into Pixhawk 4.
Now if i try to connect my drone with Qground cotnrol station, all the sensors, frame, GPS, ecc… are ok. So I armed the drone and command the take off, but the motors didn’t start to spinn. I also tried with the example in matlab "px4demo_HardwareInLoopWithSimulinkPlantStart", but even this dind’t work. A strange thing is that when i armed and command the take off, i saw (in Qg mavlink inspector) that the actuator_commands change his values to 2000 us, but the engines doesn’t move ( i use the PWM channel block). I alredy cheked that all the wires are connected, and also i tesed the engines via Qg and they works. So I guess that i miss something in the configuration for perform real fligth.
I also tried to uplod custom startup script, but i didn’t undestand very well the procedure. But in any case the default script should work, because it already disable the mc_postion_controller, and mc_attitude_controller.
I anyone have some guides to follow, or some adevices. Thanks in advance. Hello.
I developed my flight controller in simulink, and i tested it In SIL, HITL following the matlab examples https://it.mathworks.com/help/supportpkg/px4/setup-and-configuration_mw_3095a711-0234-45ed-9b75-77488e8e577d.html https://it.mathworks.com/help/supportpkg/px4/setup-and-configuration_mw_06fa168c-661f-4e54-b3b0-197c970f0ac9.htm . Now i want try to perform the flight test with my fligth controller. Now, there isn’t any examples about perform real fligth tests. So, I uploaded the firmware following the HIL procedure:
Build the firmware and upload
Default startup script
Design flight controller in simulink
Boardo Pixhawk 4, whit px4_fmu-v5_default
Then after these passages i Build Start and deploy my fligth controller into Pixhawk 4.
Now if i try to connect my drone with Qground cotnrol station, all the sensors, frame, GPS, ecc… are ok. So I armed the drone and command the take off, but the motors didn’t start to spinn. I also tried with the example in matlab "px4demo_HardwareInLoopWithSimulinkPlantStart", but even this dind’t work. A strange thing is that when i armed and command the take off, i saw (in Qg mavlink inspector) that the actuator_commands change his values to 2000 us, but the engines doesn’t move ( i use the PWM channel block). I alredy cheked that all the wires are connected, and also i tesed the engines via Qg and they works. So I guess that i miss something in the configuration for perform real fligth.
I also tried to uplod custom startup script, but i didn’t undestand very well the procedure. But in any case the default script should work, because it already disable the mc_postion_controller, and mc_attitude_controller.
I anyone have some guides to follow, or some adevices. Thanks in advance. uav toolbox support package for px4 autopilots, px4, flight tests MATLAB Answers — New Questions