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?
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]
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.
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
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
“3.Under the mavlink_interface plugin section, change the serialEnabled and hil_mode parameters to true.”-- in gazebo section HITL Simulation · PX4 Developer Guide
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