Gazebo HITL not working

@JulianOes Yes everything is set correctly. Just to double check, do you want me to upload an image of any file for you to verify it?

I am really new to Ubuntu OS and with Gazebo so it would be great if you could step by step guide me.

Thanks in advance and sorry for the inconvenience.

I can’t guide you step by step. That’s what the instructions are supposed to do. If they are not clear or not working please specifically comment on that. I can try if the instructions are still working for me later.

Which version of PX4 are you using?

I really have no idea which version it is. Can you tell me how to check? Also, I believe the instructions made me download the most recent one.

I would be waiting for your response. Do check whether the instructions are working for you.

Also, I think for some reasons my Pixhawk isnt communicating with the Gazebo only. When I try HITL using Jmavsim, it is working perfectly.

Lastly, can you tell me how can I run HITL using flightgear because I cannot find any documentation of flightgear.

Which version of PX4 are you using?

The PX4 version that I am using is v1.9

Ok, I suggest to use v1.10 or v1.11 beta or master. We can’t really help out with old versions. At least I don’t have time to reproduce issues for old versions, sorry.

Thank you for your response. The thing is, since I followed the documentation, by default it redirected me to v1.9. It would be great if you could direct me from where I can get v1.10.

You can flash it using QGroundControl:

Hello, How about the progress now? I have just set up HITL today both v1.10.1 and v1.11.0-beta2. I follow the instruction step-by-step until the last step. QGC should have connected to the vehicle, however, nothing happened. I also tested with hitl + jmavsim and sih+ jmavsim. It works fine except hitl with gazebo.

In PX4 Firmware version > v1.11.0 no “ available”. If you call the nothing will appear. I have added the iris model into empty.wolrd manually. The gazebo works fine (I saw iris model in the middle of the plane) but QGC still was not connected to the vehicle.

@JulianOes @Andrew_Mangezi

I am still suffering from the same problem. I have tried almost everything and still nothing shows up. I have been working g on gazebo HITL for the past couple of weeks now and tried everything. If you find any solution, let me know.

Hi, I have tested again with v1.10.1, QGC v3.5.6 it works fine. you need to set baudrate to 115200 too in iris.sdf (the other thing set up as instruction). For now, I am testing v1.11.0-beta2 with QGC v3.5.6 and v4.0.8

Hi @saengphet I set the baud rate but when I run gazebo in HITL there is no vehicle. And when I open qground nothing is detecting.

Hi, @saengphet.
I am currently working with PX4 v1.10.1 and QGC v4.0.8. Similarly to @mehdi786 and unlike @isb posts, there is no vehicle in Gazebo, when I run it. When I run QGC and connect FC afterwards, nothing really happens, and QGC just waits for connection.

I fallowed setup instructions from changing the serialEnabled and hil_mode to true. I also tried to change baudrate in iris.sdf as you suggested but that did not change anything. I did not change serialDevice because my FC connects to /dev/ttyACM0.

Did you manage to get ir working on QGC v4.0.8? Maybe you have some suggestions on what I could be missing?

1 Like

Hey @Themaksiest

I was able to resolve this issue by running this command in the src/Fimrware folder “git checkout v1.10.1”

If you didnt run this command after you cloned PX4 repository then you will have to start again.

You only upload the firmware v1.10.1 into pixhawk, however, it is not enough, you need to checkout Firmware folder too.

In Firmware master branch (after you git clone, the master branch is default need to checkout v1.10.1) no “iris vehicle”. It is a bug for master branch for now. because the developer are implementing a new way to call iris and world.

@mehdi786 You can simply use

gazebo Tools/sitl_gazebo/worlds/

Instead of
gazebo Tools/sitl_gazebo/worlds/

I will update the docs accordingly

I have the same problem. If I open QGC, it just says waiting for connection. The question semes connect to upon.

Hey @mehdi786.

Thanks for the response. After some time of recloning and remaking I finally got to the point where iris model was visible in the simulation.
I still could not make the simulation connect to QGC and FC.

@Chris_iav We are working on it in

@Jaeyoung-Lim great to hear, is there a workaround until the pull request is through? Reverting to an older qgc version or changing the parameter names in the firmware?