Tiltrotor VTOL won't take off in HITL

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:

Standard VTOL Flight Log:

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)
I assume that’s why the motors didn’t properly spin up.

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)

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.