Implementation:Google deepmind Mujoco User Objects Header
| Knowledge Sources | |
|---|---|
| Domains | Physics Simulation, Model Objects |
| Last Updated | 2026-02-15 04:00 GMT |
Overview
Declares all C++ classes representing MuJoCo model objects (bodies, joints, geoms, cameras, sensors, actuators, etc.) and associated error handling.
Description
user_objects.h is a comprehensive header (2096 lines) that forward-declares and defines all the C++ classes used to represent model elements during the specification phase. It declares mjCError for error handling, mjCBase as the base class, and concrete classes for every MuJoCo object type: mjCBody, mjCJoint, mjCGeom, mjCSite, mjCCamera, mjCLight, mjCFlex, mjCMesh, mjCSkin, mjCTexture, mjCMaterial, mjCPair, mjCEquality, mjCTendon, mjCActuator, mjCSensor, mjCNumeric, mjCText, mjCTuple, and mjCDef. It also defines the mjGEOMINFO constant array for geom size parameters.
Usage
Included by virtually all files in the user and xml modules that need to work with model specification objects.
Code Reference
Source Location
- Repository: Google_deepmind_Mujoco
- File: src/user/user_objects.h
- Lines: 1-2096
Key Functions
const int mjGEOMINFO[mjNGEOMTYPES] = {3, 0, 1, 2, 3, 2, 3, 0};
class [[nodiscard]] mjCError { /* error information */ };
class mjCBase;
class mjCBody;
class mjCJoint;
class mjCGeom;
class mjCSite;
class mjCCamera;
class mjCLight;
class mjCMesh;
class mjCSkin;
class mjCTexture;
class mjCMaterial;
class mjCActuator;
class mjCSensor;
class mjCDef;
Import
#include "user/user_objects.h"
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| N/A | N/A | N/A | Header file declaring classes; no direct function inputs |
Outputs
| Name | Type | Description |
|---|---|---|
| Class declarations | various | All MuJoCo model object class declarations for use throughout the codebase |