Utilities and helpers#
Genesis World bundles a set of helper modules under genesis.utils for the operations that surround a simulation: selecting a compute backend, converting between array formats, applying geometric transforms, and loading assets from disk. This page is the entry point to those modules; each linked page documents one of them in detail.
Modules#
Constants and enums: enums and named constants for compute backends, joint types, and geometry types.
Device and platform utilities: detecting the platform and selecting the compute backend and PyTorch device.
Tensor utilities: converting between Quadrants fields, PyTorch tensors, and NumPy arrays.
Geometry utilities: quaternion, rotation, and coordinate-transform helpers in
genesis.utils.geom.File I/O utilities: cache and source directory paths, plus loading URDF and MJCF descriptions.
Initialization and globals#
Most utilities assume the library has been initialized. gs.init() selects the backend, sets the random seed and float precision, and populates the module-level globals below.
import genesis as gs
gs.init(
backend=gs.gpu, # CUDA on Linux, Metal on macOS
precision="32",
seed=42,
)
After gs.init() returns, these globals hold the resolved configuration:
Global |
Type |
Description |
|---|---|---|
|
|
The active PyTorch device (for example, |
|
backend enum |
The backend that was actually selected, after resolving |
|
|
Numerical epsilon for the active float precision. |
Components#
See also#
Options: configuration options passed to the scene and solvers.