HITL simulation


I am trying to do a HITL simulation using either jMAVSim or GAZEBO. I am working with the latest firmware version of PX4 and QGC. After following the steps explained on the PX4 website, I launch the simulation via JMAVsim. When I try to arm, takeoff or start a mission, I don’t get any errors but the drone doesn’t move either on JMAVsim or Gazebo.
I tried with different versions of PX4 firmware but it didn’t work. Does anyone have an idea?


Have you done this work using this guide?

Yes, I followed the steps explained in this guide!! Have you tried it?

Yes, It was working for me. try on the older stable firmware.

Can you please send me the version which you used?

I was using v1.7.3.

Thanks! I will try this version :slight_smile:

Hello @mehdy
i am facing the same issue with fmu v2 , pixhawk.

and gazebo is shooting me an error that model:// iris is not found.

did it work for you finally ?

Does it work with 1.8.0 as well ?


I am facing the same issue with fmu v2, pixhawk.
After i do all steps from https://dev.px4.io/en/simulation/hitl.html, and finaly try to run HITL in gazebo with this command line: Tools/sitl_gazebo/worlds/iris.world

i got this two messages:
Error [parser.cc:581] Unable to find uri[model://iris]
Error [parser.cc:581] Unable to find uri[model://uneven_ground]

Could someone give me an idea?

Hello, I have the same problem… Were you able to fix it?


If you are facing this issue I suggest the following method:
1 - remove src/Firmware and then re-download it
2 - follow the same instruction on PX4 website section HITL
3 - when you are in gazebo simulator setup section do: make posix_sitl_default gazebo then when gazebo is launched you have to close it and then run source Tools/setup_gazebo.bash $(pwd) $(pwd)/build/posix_sitl_default then open and mofidy iris.sdf as explained then follow the rest of the instructions.

It should be work normally and the error will be fixed. Please inform me when you try this.

It worked for me with version 1.7.0 (1.8.0 doesn’t work)

Thank-you! When I launch gazebo in HITL mode (gazebo Tools/sitl_gazebo/worlds/iris.world) I can see the iris model, however I got “Failed sending mavlink message”. The simulation doesn’t respond to QGround takeoff command…
I’m using px4 1.7.0 in my Pixhawk board

Hello Tiago, were you able to solve the problem?

What version of firmware are you using?

becouse I’m using the firmware 1.7.0, but I can not find it in the iris.sdf file the area with serial enable in the firmware 1.7.0. Have more than one firmware 1.7.0 what is the exact one?

Tankyou for the reply.
I git clone the latest firmware version (1.8.0) than I downgrade to 1.7.0 using
git checkout -b tags/v1.7.0
and build with the command
make px4fmu-v2_default
I found this procedure here: https://github.com/PX4/Firmware/issues/9455
But unfortunately I still have problem: I can see the copter in Gazebo but it doesn’t respond to command from QGround. It would be great if you could try version 1.7.0 and update the discussion.
Thankyou in advance

Sorry Matteo but in firmware v1.7.0 you could find in the sdf file the section with serial enable ??

Because I couldn’t find in firmware v1.7.0.

Can i edit the sdf file and put the serial enable and serial device in it ?

“3.Under the mavlink_interface plugin section, change the serialEnabled and hil_mode parameters to true.”-- in gazebo section https://dev.px4.io/en/simulation/hitl.html

Yes, I have that file and I’ve modified serialEnabled and hil_mode fileds; serialDevice was already correct…
I suggest to re-install the firmware. Let me know, thankyou for now