"Restrict" simulation to 2D

Hi.

What would be the best way to force a simulation to be in 2D so that a 2D model doesn’t fall over the remaining axis?

I’m trying to use this HalfCheetah mjcf in Isaac Gym, but the model falls over along the unused axis and I’m not sure if there are any settings / options I can use to prevent this from happening.

Thanks!

Hi @oswinso,

Currently, we didn’t look into supporting loading of 2d Mujoco assets in Isaac Gym, as we found Isaac Gym to be fast enough to allow training of the complex 3d robot models in a few minutes in most cases.

What kind of experiments do you plan to perform and how is 2D dimensionality critical for your work?

There are many existing results in the literature that use 2D environments. We would like to recreate these results on the 2D environments so that we can perform comparison against them.

After playing around with the mjcf a bit, it seems like I am able to get around this issue by creating a dummy top level body and setting AssetOptions.fix_base_link to True. However, the PhysX physics simulator doesn’t support the two slider joints and gives the error message “Multi DOF joints can only be rotational for the moment”, and I am forced to use the Flex simulator.

You can emulate 2 slider joints in PhysX by inserting a very small and light dummy link between them.