initialize#

Fully qualified name: isaacsim::physics::manager::initialize

InitializeResult isaacsim::physics::manager::initialize(
void *ovstage,
const char *usdIdentifier,
)#

Initializes all active physics backends from a stage.

Each backend consumes the stage representation it supports. The caller retains ownership of ovstage, and this function does not extend its lifetime. A null ovstage together with a null or empty usdIdentifier is valid input that requests initialization of an empty scene. The manager does not detach an existing stage before dispatching initialization; each backend controls replacement of any stage it already holds.

The caller must keep a non-null ovstage alive until every backend that accepted it has detached. A successful call to close() normally establishes this when all participating backends expose correct cleanup callbacks. A failure result alone does not prove detachment when a backend omits cleanup or attachment-status callbacks.

If a backend fails, successfully initialized backends that expose a close callback are closed in reverse order. The function returns InitializeResult::eFailedDirty when a close callback fails or throws, or when the failed backend’s attachment-status callback reports an attached stage or throws. Otherwise, it returns InitializeResult::eFailed. These results describe manager-observed cleanup; they cannot guarantee absolute attachment state when callbacks are absent or report inaccurate state.

Note

The OV PhysX backend reads ovstage at ordinal 1. Populate that ordinal when using this backend.

Note

Exceptions raised by backend initialization or rollback callbacks are converted to a failure result.

Parameters:
  • ovstage – [in] Opaque pointer to a caller-owned ovstage_instance_t, or nullptr when unavailable.

  • usdIdentifier – [in] Numeric USD stage-cache identifier, such as "123", or nullptr or an empty string when unavailable. The value is interpreted as an identifier, not as a file path.

Returns:

InitializeResult::eOk when every participating initialization callback succeeds, InitializeResult::eFailed when initialization fails without an observed cleanup problem, or InitializeResult::eFailedDirty when cleanup fails or its status cannot be determined.