I am working with a vehicle which currently uses ArduPilot (ArduRover) and a Pixhawk 2.1. I have designed a novel control system in Matlab/Simulink. I would like to incorporate this control system into the vehicle’s current system, but I have limited experience with C++ so I would like to use one of Simulink’s code generation tools to make this easier. There is a lot of documentation from matlab/simulink on these tools, but my understanding is that I need a hardware support package to make the automatic code generation work. I found these and I would appreciate help with determining if either would be useful to me:
this package seems to be designed for ArduPilot Mega 2.0 and not Pixhawk.
this package is designed for Pixhawk, but specifically mentions PX4, although it seems to use this interchangeably with Pixhawk. My concern is that if it is meant for use specifically with the px4 control system I may not be able to generate useful code from it. The user guide is here: https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/hardware-support/files/Simulink_Pixhawk_Support_v2.1.pdf
I am anticipating this process will require generating code and then consulting with someone more knowledgeable in programming to incorporate into our existing control system, but I want to make sure that any code I am able to generate automatically is usable.
P.S. I apologize if I picked the wrong category for this