motrixsim.viewer#
Exceptions:
Base exception for viewer errors |
|
Raise when invalid arguments are provided |
|
Raise when the viewer fails to launch |
Functions:
|
Launch a managed viewer with optional model and data. |
- exception motrixsim.viewer.ViewerError#
Bases:
ExceptionBase exception for viewer errors
- exception motrixsim.viewer.ViewerInvalidArgumentError#
Bases:
ViewerErrorRaise when invalid arguments are provided
- exception motrixsim.viewer.ViewerLaunchError#
Bases:
ViewerErrorRaise 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.
- Parameters:
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.