motrixsim.viewer#

Exceptions:

ViewerError

Base exception for viewer errors

ViewerInvalidArgumentError

Raise when invalid arguments are provided

ViewerLaunchError

Raise when the viewer fails to launch

Functions:

launch([model, data, callback])

Launch a managed viewer with optional model and data.

exception motrixsim.viewer.ViewerError#

基类:Exception

Base exception for viewer errors

exception motrixsim.viewer.ViewerInvalidArgumentError#

基类:ViewerError

Raise when invalid arguments are provided

exception motrixsim.viewer.ViewerLaunchError#

基类:ViewerError

Raise when the viewer fails to launch

motrixsim.viewer.launch(model=None, data=None, callback=None)#

Launch a managed viewer with optional model and data.

This function provides a simplified interface similar to MuJoCo's managed viewer. It blocks until the viewer window is closed, automatically handling the physics simulation loop and rendering.

参数:
  • model (SceneModel, optional) -- The scene model to simulate and visualize. If not provided, loads a default sample model.

  • data (SceneData, optional) -- The scene data containing the initial state. If not provided, creates default data from the model.

  • callback (callable, optional) -- A callback function called at each physics step.