# PX4 SITL with Simulink/Gazebo

**URL:** <https://discuss.px4.io/t/px4-sitl-with-simulink-gazebo/42303>\
**Category:** PX4 Autopilot\
**Created:** [November 6, 2024, 11:06am UTC](https://discuss.px4.io/t/px4-sitl-with-simulink-gazebo/42303 "2024-11-06T11:06:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aero-Sapphire](https://discuss.px4.io/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@aero-Sapphire](https://discuss.px4.io/u/aero-Sapphire)\
**Post date:** [November 6, 2024, 11:06am UTC](https://discuss.px4.io/t/px4-sitl-with-simulink-gazebo/42303/1 "2024-11-06T11:06:09Z")

</div>

Hello everyone,

I have an FDM in simulink that i want to simulate in SITL with px4 and QGroundControl. I found a working connector that can be used to interface simulink with px4 ([Pixhawk software-in-the-loop (SIL) connector for Simulink - File Exchange - MATLAB Central](https://www.mathworks.com/matlabcentral/fileexchange/114320-pixhawk-software-in-the-loop-sil-connector-for-simulink)).  
However I am running into some problems.

I was wondering if I can simulate my model in gazebo and connect it to px4. How can I achieve that? I am aware of the already available gazebo models that can be run in SITL with px4 using px4\_sitl gz\__name\_of\_model_. My question is, how can i do it with my custom model. The model is of a tailsitter and dyanmics are non-linear. In simulink I am using a 6DOF model with non-linear coefficients computed using CFD (against speed and angle of attack). However gazebo LiftDrag Plugin assumes a linear model.

Any help regarding these issues will be highly appreciated.

---

<div class="post-metadata">

**Author:** ![Shoval\_Nachum](https://discuss.px4.io/user_avatar/discuss.px4.io/shoval_nachum/32/17558_2.png) [@Shoval\_Nachum](https://discuss.px4.io/u/Shoval_Nachum)\
**Post date:** [November 10, 2024, 3:29pm UTC](https://discuss.px4.io/t/px4-sitl-with-simulink-gazebo/42303/2 "2024-11-10T15:29:24Z")

</div>

I’m also trying that right now, kinda failing but still trying.  
A developer in discord shared with me two links (they added “mono cam” to the repo).

that will give you a starting point:

> [take a look at these two PRs which adds a model and the associated airframe file, along with a new world [[gz] X500 mono\_cam\_down and aruco world by dakejahl · Pull Request #23450 · PX4/PX4-Autopilot · GitHub](https://github.com/PX4/PX4-Autopilot/pull/23450/files)  
> [Downward mono cam + aruco tag by dakejahl · Pull Request #48 · PX4/PX4-gazebo-models · GitHub](https://github.com/PX4/PX4-gazebo-models/pull/48/files#diff-52bca03607e16efa931910137c1c36350d15ed4fc365c899ef4f9aa857d5fefd)]
