# Tiltrotor VTOL won't take off in HITL

**URL:** <https://discuss.px4.io/t/tiltrotor-vtol-wont-take-off-in-hitl/32870>\
**Category:** PX4 Autopilot\
**Created:** [June 21, 2023, 10:57am UTC](https://discuss.px4.io/t/tiltrotor-vtol-wont-take-off-in-hitl/32870 "2023-06-21T10:57:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deltarr350](https://discuss.px4.io/user_avatar/discuss.px4.io/deltarr350/32/12686_2.png) [@Deltarr350](https://discuss.px4.io/u/Deltarr350)\
**Post date:** [June 21, 2023, 10:57am UTC](https://discuss.px4.io/t/tiltrotor-vtol-wont-take-off-in-hitl/32870/1 "2023-06-21T10:57:04Z")

</div>

Hi all, I’m trying to run tiltrotor VTOL HITL simulation in Gazebo Classic 11. I have connected to QGC and made the necessary modifications to the sdf file (setting serialEnabled to 1 and hilenabled to 1, as well as setting SYS\_HITL to 1). QGC was able to connect as well. However, when commanded to take off (autonomous mission) from QGC, the rotors on the model simply rotate slowly and the model doesnt move at all. I have previously done this with standard vtol with no problems.

I compared the flight logs of my previous successful Standard VTOL HITL mission VS the current Tiltrotor VTOL HITL mission and discovered that the motor outputs in the Tiltrotor is only 0.1 VS 0.5 in the Standard VTOL. I think this is the cause as to why the rotors turn very slowly in the tiltrotor simulation, but I can’t figure out why this is happening since I did not change airframe parameters except for VT\_TYPE and MAV\_TYPE. I am using a Pixhawk 4 mini, PX4 V1.14.0.0

Can someone please point to where the problem could lie? Thank you very much.

**To Reproduce**

1. Edit tiltrotor sdf file in models folder: in the mavlink plugin set serialenabled to 1, serialDevice to (usb port), hilenabled to 1
2. Open QGroundControl, in application settings listen only to UDP, in vehicle settings set safety setting to HIL mode, then close QGroundControl again
3. Create new world file in worlds folder, include tiltrotor model
4. In terminal, run:

> cd PX4-Autopilot  
> DONT\_RUN=1 make px4\_sitl\_default gazebo-classic  
> source Tools/simulation/gazebo/setup\_gazebo.bash $(pwd)  
> gazebo Tools/simulation/gazebo/sitl\_gazebo/worlds/hitl\_

1. Launch QGroundControl, plan mission and takeoff

**Expected behavior**

Rotors spin up fast and model takes off

**Flight Logs**  
Tiltrotor VTOL Flight Log:  
[https://review.px4.io/plot\_app?log=d5ead83a-4169-41b1-9c76-c22ff2fd567a](https://review.px4.io/plot_app?log=d5ead83a-4169-41b1-9c76-c22ff2fd567a)

Standard VTOL Flight Log:  
[https://review.px4.io/plot\_app?log=1fac9d43-6548-47c3-b75a-d94e8a098f52](https://review.px4.io/plot_app?log=1fac9d43-6548-47c3-b75a-d94e8a098f52)

---

<div class="post-metadata">

**Author:** ![sfuhrer](https://discuss.px4.io/user_avatar/discuss.px4.io/sfuhrer/32/3931_2.png) [@sfuhrer](https://discuss.px4.io/u/sfuhrer)\
**Post date:** [June 26, 2023, 8:38pm UTC](https://discuss.px4.io/t/tiltrotor-vtol-wont-take-off-in-hitl/32870/2 "2023-06-26T20:38:39Z")

</div>

I’m unfortunately not the expert for HITL, but from what I see in the log the topic tiltrotor\_etra\_controls is not published (should get published here: [PX4-Autopilot/src/modules/vtol\_att\_control/tiltrotor.cpp at e0a2e0b2234d371bbe02002468ba9cbe768413cf · PX4/PX4-Autopilot · GitHub](https://github.com/PX4/PX4-Autopilot/blob/e0a2e0b2234d371bbe02002468ba9cbe768413cf/src/modules/vtol_att_control/tiltrotor.cpp#L444C66-L444C66))  
I assume that’s why the motors didn’t properly spin up.

---

<div class="post-metadata">

**Author:** ![Deltarr350](https://discuss.px4.io/user_avatar/discuss.px4.io/deltarr350/32/12686_2.png) [@Deltarr350](https://discuss.px4.io/u/Deltarr350)\
**Post date:** [June 30, 2023, 5:25am UTC](https://discuss.px4.io/t/tiltrotor-vtol-wont-take-off-in-hitl/32870/3 "2023-06-30T05:25:45Z")

</div>

Thank you for your response. I used the listener command to debug this problem and can verify that the tiltrotor\_extra\_controls has values published. However, I discovered that despite the vehicle\_thrust\_setpoint topic having a value of (0,0,-1) (upwards thrust), the value being published to the actuator\_motors topic is very small. This leads me to think that the problem lies in the control allocator module, since the only publishers to the actuator\_motors topic are: ESCRawCommand, control\_allocator, and mixer\_module\_tests.

Nonetheless, I still can’t figure out why the control\_allocator module is outputting these small values since I can’t find any differences in its code for HITL and SITL. (I tried SITL for tiltrotor and everything works fine, now I’m using the same sdf model for HITL, with the same CA parameters and the necessary modifications such as hil\_enabled)

---

<div class="post-metadata">

**Author:** ![Deltarr350](https://discuss.px4.io/user_avatar/discuss.px4.io/deltarr350/32/12686_2.png) [@Deltarr350](https://discuss.px4.io/u/Deltarr350)\
**Post date:** [August 4, 2023, 9:39am UTC](https://discuss.px4.io/t/tiltrotor-vtol-wont-take-off-in-hitl/32870/4 "2023-08-04T09:39:05Z")

</div>

Was able to make it run by reselecting a different control allocation method under Parameters → Geometry each time I start a new HITL simulation. However, this is probably a bug that needs fixing.
