Develop PX4 custom controller without QGroundControl
8 views (last 30 days)
Hello, I'm trying to develop a custom controller for my Pixracer R15 autopilot. I followed the MATLAB tutorials and I want to know if is possibile to develop a custom controller and do HITL simulation without using QGroundControl. For example I'm trying to implement the example Position Tracking for X-Configuration Quadcopter in my hardware board instead of PX4 host target. Indeed in this example I can specify some trajectories and modify run-time parameters of the controller, I don't need to specify a mission on QGround I want only that my quadcopter follows some trajectories using the custom controller implemented in my board.
Thanks for help.
Jianxin Sun on 3 Oct 2022
There are two HITL examples related to your application:
https://www.mathworks.com/help/supportpkg/px4/ref/hitl-simulink-plant-example.html shows how to configure HITL with multirotor dynamics in Simulink
https://www.mathworks.com/help/supportpkg/px4/ref/hitl-simulink-fixed-wing-plant-example.html shows how to configure the UAV to follow pre-defined mission in MATLAB/Simulink for fixed-wing UAV
You probably want to base your setup following the first example, but instead of using mission read block to get mission from QGroundControl, you can use pre-defined mission in MATLAB based on the second example implementation.