(QGC not running)
(serialDevice is /dev/ttyACM0, so no change required to “Tools/simulation/gazebo/sitl_gazebo/models/iris_hitl/iris_hitl.sdf”)
In Ubuntu:
cd ~/PX4-Autopilot
DONT_RUN=1 make px4_sitl_default gazebo
source Tools/simulation/gazebo/setup_gazebo.bash $(pwd) $(pwd)/build/px4_sitl_default
gazebo Tools/simulation/gazebo/sitl_gazebo/worlds/hitl_iris.world
Result:
Gazebo started after a fairly long delay (~1 minute), but I got the following error message in Ubuntu (and no vehicle showing in gazebo):
Error Code 12 Msg: Unable to find uri[model://iris_hitl]
My setup:
Windows 11 Pro, OS Build 22000.1455
Ubuntu 20.04 (running under WSL 2) serialDevice is /dev/ttyACM0
~/PX4-Autopilot “branch is up to date with ‘origin/main’”
I am now able to run the example. It required changing the permissions for /dev/ttyACM0 as follows:
sudo chmod 666 /dev/ttyACM0
The result that I reported originally apparently occurred when I attempted to run the example using sudo (as follows):
sudo gazebo Tools/simulation/gazebo/sitl_gazebo/worlds/hitl_iris.world
When I ran the example as a user, as follows (without using sudo):
gazebo Tools/simulation/gazebo/sitl_gazebo/worlds/hitl_iris.world
Gazebo started and displayed the IRIS vehicle, but I got the following output:
krr@ASEC_XPS_1:~/PX4-Autopilot$ gazebo Tools/simulation/gazebo/sitl_gazebo/worlds/hitl_iris.world
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
Error opening serial device: open: Permission denied
Serial port closed!
Serial port closed!
… (“Serial port closed!” repeated many times per second)