#3397·mujoco

[Performance; Model editing] Batch adding of bodies/geoms/etc.

Author: davidhozicCreated Jul 12, 2026Updated Sep 18, 2026
Labelsenhancement

The feature, motivation and pitch

Currently, MuJoCo's model editing (C) API allows adding a single item (e.g., geom via mjs_addGeom) at a time. Each time, the signature is recomputed which can be painfully slow in worlds that already contain a lot of items and need a lot more items added.

For example, mjs_addGeom ends up going into, which recomputes signature each time: https://github.com/google-deepmind/mujoco/blob/fbf031a7d5afb87bc252346276e8c983c81ab407/src/user/user_objects.cc#L2085-L2101

Alternatives

No response

Additional context

No response