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.

Principle:Google deepmind Mujoco Object Name Lookup

From Leeroopedia
Knowledge Sources
Domains Physics_Simulation, Model_IO
Last Updated 2026-02-15 06:00 GMT

Overview

Mechanism for resolving human-readable object names to integer IDs for efficient runtime access to model elements.

Description

Object Name Lookup converts string names (e.g., "left_hand", "joint_1") into integer indices used internally by MuJoCo. The compiled mjModel stores all names in a concatenated string buffer with address arrays for O(1) lookup by ID. The reverse operation (name-to-ID) performs a linear search through the name table. This is essential for programmatic access to specific model elements.

Usage

Use to look up specific model elements by name after loading. Common for finding keyframes, sensors, actuators, or bodies by their XML-defined names.

Theoretical Basis

MuJoCo stores names as a concatenated byte array with per-type address arrays:

# Abstract name storage (not real code)
names = "world\0body1\0joint_1\0..."
body_name_adr = [0, 6, ...]  # offsets into names array
# Lookup: scan body_name_adr, compare names[adr[i]] with target

Related Pages

Implemented By

Page Connections

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