gs.options.SimOptions#
- class genesis.options.solvers.SimOptions(*, dt: float = 0.01, substeps: int = 1, substeps_local: int | None = None, gravity: tuple = (0.0, 0.0, -9.81), floor_height: float = 0.0, requires_grad: bool = False)[source]#
Options configuring the top-level simulator.
Note
SimOptions specifies the global settings for the simulator. Some parameters exist both in SimOptions and SolverOptions. In this case, if such parameters are given in SolverOptions, it will override the one specified in SimOptions for this specific solver. For example, if dt is only given in SimOptions, it will be shared by all the solvers, but it’s also possible to let a solver run at a different temporal speed by setting its own dt to be a different value.
In differentiable mode, substeps_local must be divisible by substeps, as external command is input per step, but substep. If requires_grad is False, we can use arbitrary substeps_local.
- Parameters:
dt (float, optional) – Time duration for each simulation step in seconds. Defaults to 1e-2.
substeps (int, optional) – Number of substeps per simulation step. Defaults to 1.
substeps_local (int, optional) – Number of substeps stored in GPU memory. Defaults to None. This is used for differentiable mode.
gravity (tuple, optional) – Gravity force in N/kg. Defaults to (0.0, 0.0, -9.81).
floor_height (float, optional) – Height of the floor in meters. Defaults to 0.0.
requires_grad (bool, optional) – Whether to enable differentiable mode. Defaults to False.
use_hydroelastic_contact (bool, optional) – Whether to use hydroelastic contact. Defaults to False.