Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Google deepmind Mujoco Studio App Header

From Leeroopedia
Revision as of 12:47, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Google_deepmind_Mujoco_Studio_App_Header.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Application, API Declaration
Last Updated 2026-02-15 04:00 GMT

Overview

Declares the App class interface for MuJoCo Studio, including configuration, model loading, simulation update, GUI building, and rendering methods.

Description

app.h defines the mujoco::studio::App class which owns and orchestrates a complete MuJoCo simulation session. The Config struct specifies window dimensions, INI settings path, and offscreen rendering mode. The class declares methods for model loading (InitEmptyModel, LoadModelFromFile, LoadModelFromBuffer), simulation lifecycle (Update, BuildGui), and holds members from the platform layer: Window, Renderer, StepControl, SimProfiler, SimHistory, ModelHolder, and PictureGui. It also includes mjvOption, mjvCamera, mjvPerturb for visualization state.

Usage

Included by app.cc and the Studio main entry point. The header defines the complete public interface for the Studio application, enabling external code to create and control Studio instances programmatically.

Code Reference

Source Location

Key Functions

class App {
  struct Config { int width; int height; std::string ini_path; bool offscreen_mode; };
  explicit App(Config config);
  void InitEmptyModel();
  void LoadModelFromFile(const std::string& filepath);
  void LoadModelFromBuffer(std::span<const std::byte> buffer, std::string_view content_type, std::string_view name);
  bool Update();
  void BuildGui();
};

Import

#include "experimental/studio/app.h"

I/O Contract

Inputs

Name Type Required Description
config App::Config Yes Window size, INI path, offscreen mode
filepath std::string No Model file path for LoadModelFromFile
buffer std::span<const std::byte> No Model data buffer for LoadModelFromBuffer

Outputs

Name Type Description
bool bool Update() returns false when the application should exit

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment