Getting started, Gazebo dependencies missing

I’m pretty new to the world of drones but have chosen drone cyber security as my master’s thesis, so I’m trying to familiarize myself and get some basic sims running. I spun up a new Ubuntu VM and ran through the instructions at Ubuntu Development Environment | PX4 Guide (main) and Binary Installation on Ubuntu — Gazebo harmonic documentation to get PX4 and Gazebo installed without running into any issues. But as soon as I try to run a sim, it errors out:
droney@dronez:~/PX4-Autopilot$ make px4_sitl gz_x500
[1/1] cd /home/droney/PX4-Autopilot/bu…ll_ubuntu/" && /usr/bin/cmake -E false
FAILED: src/modules/simulation/gz_bridge/CMakeFiles/gz_x500 /home/droney/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_bridge/CMakeFiles/gz_x500
cd /home/droney/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_bridge && /usr/bin/cmake -E echo “ERROR: Gazebo simulation dependencies not found!” && /usr/bin/cmake -E echo " - For installation instructions, see: Binary Installation on Ubuntu — Gazebo harmonic documentation " && /usr/bin/cmake -E false
ERROR: Gazebo simulation dependencies not found!

I’ve tried uninstalling and reinstalling Gazebo but it didn’t change anything. I checked the CMakeFile directory it’s linking to and it’s empty, but I’m not sure if it’s supposed to be empty and resources are created on sim start or I’m missing something there. Any guidance would be appreciated.

try building sitl first before launching the sim
make px4_sitl
and after it’s done
make px4_sitl gz_x500

Sorry for the long wait, just finished moving across the country. I’m getting the same result:
droney@dronez:~/PX4-Autopilot$ make px4_sitl
ninja: no work to do.
droney@dronez:~/PX4-Autopilot$ make clean
/home/droney/PX4-Autopilot/build/px4_sitl_default
[1/1] Cleaning all built files…
Cleaning… 2068 files.
Entering ‘Tools/simulation/flightgear/flightgear_bridge’
Entering ‘Tools/simulation/gazebo-classic/sitl_gazebo-classic’
Entering ‘Tools/simulation/gz’
Entering ‘Tools/simulation/jmavsim/jMAVSim’
Entering ‘Tools/simulation/jsbsim/jsbsim_bridge’
Entering ‘boards/modalai/voxl2/libfc-sensor-api’
Entering ‘platforms/nuttx/NuttX/apps’
Entering ‘platforms/nuttx/NuttX/nuttx’
Entering ‘src/drivers/actuators/vertiq_io/iq-module-communication-cpp’
Entering ‘src/drivers/cyphal/legacy_data_types’
Entering ‘src/drivers/cyphal/libcanard’
Entering ‘src/drivers/cyphal/public_regulated_data_types’
Entering ‘src/drivers/gps/devices’
Entering ‘src/drivers/ins/microstrain/mip_sdk’
Entering ‘src/drivers/ins/sbgecom/sbgECom’
Entering ‘src/drivers/uavcan/libdronecan/dsdl’
Entering ‘src/drivers/uavcan/libdronecan/libuavcan/dsdl_compiler/pydronecan’
Entering ‘src/lib/cdrstream/cyclonedds’
Entering ‘src/lib/cdrstream/rosidl’
Entering ‘src/lib/crypto/libtomcrypt’
Entering ‘src/lib/crypto/libtommath’
Entering ‘src/lib/crypto/monocypher’
Entering ‘src/lib/events/libevents’
Removing scripts/pycache/
Entering ‘src/lib/heatshrink/heatshrink’
Entering ‘src/lib/tensorflow_lite_micro/tflite_micro’
Entering ‘src/modules/mavlink/mavlink’
Entering ‘src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client’
Entering ‘src/modules/zenoh/zenoh-pico’
Entering ‘test/fuzztest’
droney@dronez:~/PX4-Autopilot$ make px4_sitl
[1/1114] git submodule src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client
[4/1114] git submodule src/drivers/gps/devices
[9/1114] git submodule src/modules/mavlink/mavlink
[1114/1114] Linking CXX shared library…s/dyn_hello/examples__dyn_hello.px4mod
droney@dronez:~/PX4-Autopilot$ make px4_sitl gz_x500
[1/1] cd /home/droney/PX4-Autopilot/bu…ll_ubuntu/" && /usr/bin/cmake -E false
FAILED: src/modules/simulation/gz_bridge/CMakeFiles/gz_x500 /home/droney/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_bridge/CMakeFiles/gz_x500
cd /home/droney/PX4-Autopilot/build/px4_sitl_default/src/modules/simulation/gz_bridge && /usr/bin/cmake -E echo “ERROR: Gazebo simulation dependencies not found!” && /usr/bin/cmake -E echo " - For installation instructions, see: Binary Installation on Ubuntu — Gazebo harmonic documentation " && /usr/bin/cmake -E false
ERROR: Gazebo simulation dependencies not found!

There’s something wrong with your gazebo install on the VM. I would recommend running Ubuntu natively as this is what most people are doing.

Alright, I got a NUC and put a clean install of Ubuntu 24.04 on it, ran the developer toolchain, installed VSCode, then tried to run a sim. NowL

droney@droney-A8:~/PX4-Autopilot$ sudo make px4_sitl gz_x500
ninja: error: unknown target ‘gz_x500’
make: *** [Makefile:227: px4_sitl] Error 1

When I run make list_config_targets, it doesn’t have any gz models. I’ve confirmed Gazebo Harmonics is installed:

droney@droney-A8:~/PX4-Autopilot$ apt list --installed
Listing… Done

gz-harmonic/unknown,now 1.0.0-1~noble amd64 [installed]
gz-launch7-cli/unknown,now 7.1.1-1~noble amd64 [installed,automatic]
gz-plugin2-cli/unknown,now 2.0.4-1~noble amd64 [installed,automatic]
gz-sim8-cli/unknown,now 8.10.0-1~noble amd64 [installed,automatic]
gz-tools2/unknown,now 2.0.3-1~noble amd64 [installed,automatic]

and running a basic gz sim shapes.sdf launches Gazebo no problems. Tried make clean, make distclean, and deleting build/px_sitl_default as I saw in another post on here.

OK, some more playing around finally got it going. I got errors around OpenCV and had to install it separately but I’m flying now. Thank you!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.