Closed Anmol6 closed 6 years ago
No idea, we focus primarily on URDF for PyBullet (we just added a rudimentary MJCF loader for some OpenAI Gym models). Attached is a URDF you could try to use as a starting point instead. biped_pybullet_urdf_debug (1).zip
If someone wants to improve the MJCF importer, the source code is here. I don't have the time/bandwidth to work on this, but happy to accept contributions.
@erwincoumans Thanks for that! However, I am not able to add a planar movement constraint using planar joints to the body (I also tried adding just one planar constraint). I get a segmentation fault when I load this file. Any ideas on how to add this constraint?
It might be better if I open a new issue, actually.
We start with a fixed base, then add prismatic and revolute joints. This is how we convert MuJoCo 2D models too (2D hopper and Half Cheetah etc). We don't expose/support planar constraints and spherical joints (none of our robots have them).
@erwincoumans i would be very interested in having URDF files of 2D hopper and half cheetah! Are these available somewhere online, or could you provide them to me? Best, Jonas
edit: i just found URDF models here but none of the two mentioned above, could you point me to the location? Thanks!
2d hopper, 2d half cheetah, humanoid, ant etc are all part of PyBullet pybullet_envs and pybullet_data including their Gym environments and pre-trained policies/neural network weights.
MJCF files are here: https://github.com/bulletphysics/bullet3/tree/master/examples/pybullet/gym/pybullet_data/mjcf
pip3 install pybullet
python3 -m pybullet_envs.examples.enjoy_TF_HopperBulletEnv_v0_2017ma
python3 -m pybullet_envs.examples.enjoy_TF_AntBulletEnv_v0_2017may
python3 -m pybullet_envs.examples.enjoy_TF_HumanoidBulletEnv_v0_2017may
python3 -m pybullet_envs.examples.enjoy_TF_HumanoidFlagrunHarderBulletEnv_v1_2017jul
I quickly converted them to urdf, not tested using the mjcf2urdf.py util. 2d_hopper_cheetah.zip
mjcf2urdf.py utility: https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/gym/pybullet_utils/examples/mjcf2urdf.py
this is great, thanks a lot!
Don't expect too much, the mjcf2urdf is a quick rudimentary hack, only covering a small subset of mjcf that was used to get the gym environments working.
Hi, here's a mjcf file (which is a biped that's constrained to move along the y-z plane) that I'm loading in pybullet with the following code:
I noticed the following problems: 1) the torso always wants to stay upright if I try to rotate it 2) when the leg/knees are lifted, they slowly do move down, but not nearly as fast as they should (this can be seen by how much faster the torso falls when it is lifted high)
Any insight into this would be appreciated; thanks!