After I load an XML model, I change the size parameters of the objects in the environment. I can visually see that the objects change sizes. I'm using the geom_rbound variable to see if the objects overlap or not, however, when I change the size of the objects and call forward function, the radius variable does not change. I'm using openai mujoco-py wrapper so I am trying to understand if this expected behavior or a bug in the python wrapper.
geom_rbound is computed when the model is compiled. after that, mjModel is considered constant. so if you make changes in it manually, dependent quantities are not going to be recomputed. this is why mjModel and mjData are distinct: mjModel contains constants, while mjData contains quantities that are recomputed at each time step. the next version of the software will have an incremental compiler that allows changed to the model to be made quickly and updates everything. but for now there is no automation to support this.