robosuite icon indicating copy to clipboard operation
robosuite copied to clipboard

Add `set_scale` to `Arena` and `MujocoObject`

Open kevin-thankyou-lin opened this issue 11 months ago • 1 comments

What this does

Add ability to set_scale of bodies in arena, as well as set_scale for MujocoObjects; previously only MujocoXMLObject had these functions.

How to test

In _load_arena() add something like:

        table = mujoco_arena.worldbody.find("./body[@name='table']")
        mujoco_arena.set_scale([0.5, 0.5, 0.5], table)

scale=0.5 tmp0

scale=1.5 tmp0

kevin-thankyou-lin avatar Feb 25 '25 23:02 kevin-thankyou-lin

Any reason why you can't just move the code to a parent class? Seems like its repeated across 3 classes.

Abhiram824 avatar Feb 27 '25 23:02 Abhiram824

Refactored @Abhiram824 could you please take a look?

kevin-thankyou-lin avatar Jun 23 '25 18:06 kevin-thankyou-lin