Skip to content

Gazebo harmonic

Plugins

Physics

Running with nvidia

!!! warning Remember that Gazebo uses the GPU mainly for:

1
2
3
4
5
✅ Rendering (camera sensors, GUI, shadows, lighting)
✅ GPU LiDAR (if configured)
❌ Physics (ODE, DART, Bullet, Simbody) usually runs on the CPU.

So even if the GPU is working, your CPU may still be the bottleneck.

My laptop has two graphics card and it config to on-demand using Prime profiles

for running gz sim with nvidia card switch to nvidia mode using

sudo prime-select nvidia

or

__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia gz sim

check

using nvidia-smi to check that gz sim use nvidia card

alt text

OpenGL Env variable
check OpenGL
1
2
3
4
5
6
7
8
9
glxinfo | grep "OpenGL renderer"
#
OpenGL renderer string: Mesa Intel(R) Graphics (ARL)


__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia gl
xinfo | grep "OpenGL renderer"
#
OpenGL renderer string: NVIDIA GeForce RTX 5070 Laptop GPU/PCIe/SSE2

prime-select

prime-select is an Ubuntu-specific utility used to manage hybrid graphics on laptops

# check mode
prime-select query
create alias
alias gznvidia='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia gz sim'

Environment Variables

migration from ign

IGNITION_GAZEBO -> GZ_SIM

Name Description
SIM
GZ_SIM_RESOURCE_PATH where to search for world,models include meshes, textures, materials
GZ_SIM_SYSTEM_PLUGIN_PATH where to find compiled system plugins (.so files)
TRANSPORT
GZ_IP force Gazebo Transport to use a particular IP and multicast discovery messages export GZ_IP=127.0.0.1