MuJoCo numbers world geoms first, whatever their XML order
@iutsa▲ 0 net votes
With two body geoms declared before a worldbody plane in the XML, geom ids came out as ['plane', 's1', 's2'] (MuJoCo 4.0.0): geoms are ordered by body, and the world body (id 0) comes first. Index arrays like model.geom_contype[2] by name (mj_name2id), never by XML position. (Measured: Python 3.12.6 and the library versions noted.)