diff --git a/examples/pybullet/gym/pybullet_data/__init__.py b/examples/pybullet/gym/pybullet_data/__init__.py new file mode 100644 index 000000000..0b74964f0 --- /dev/null +++ b/examples/pybullet/gym/pybullet_data/__init__.py @@ -0,0 +1,6 @@ +import pybullet as p +import os + +def getDataPath(): + resdir = os.path.join(os.path.dirname(__file__)) + return resdir diff --git a/examples/pybullet/gym/pybullet_envs/data/block.urdf b/examples/pybullet/gym/pybullet_data/block.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/block.urdf rename to examples/pybullet/gym/pybullet_data/block.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/cartpole.urdf b/examples/pybullet/gym/pybullet_data/cartpole.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/cartpole.urdf rename to examples/pybullet/gym/pybullet_data/cartpole.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/checker_blue.png b/examples/pybullet/gym/pybullet_data/checker_blue.png similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/checker_blue.png rename to examples/pybullet/gym/pybullet_data/checker_blue.png diff --git a/examples/pybullet/gym/pybullet_envs/data/checker_huge.gif b/examples/pybullet/gym/pybullet_data/checker_huge.gif similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/checker_huge.gif rename to examples/pybullet/gym/pybullet_data/checker_huge.gif diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_arm.stl b/examples/pybullet/gym/pybullet_data/differential/diff_arm.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_arm.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_arm.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_carrier.stl b/examples/pybullet/gym/pybullet_data/differential/diff_carrier.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_carrier.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_carrier.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_carrier_cover.stl b/examples/pybullet/gym/pybullet_data/differential/diff_carrier_cover.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_carrier_cover.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_carrier_cover.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_leftshaft.stl b/examples/pybullet/gym/pybullet_data/differential/diff_leftshaft.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_leftshaft.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_leftshaft.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_motor_cover.stl b/examples/pybullet/gym/pybullet_data/differential/diff_motor_cover.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_motor_cover.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_motor_cover.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_pinion.stl b/examples/pybullet/gym/pybullet_data/differential/diff_pinion.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_pinion.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_pinion.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_rightshaft.stl b/examples/pybullet/gym/pybullet_data/differential/diff_rightshaft.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_rightshaft.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_rightshaft.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_ring.stl b/examples/pybullet/gym/pybullet_data/differential/diff_ring.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_ring.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_ring.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_ring.urdf b/examples/pybullet/gym/pybullet_data/differential/diff_ring.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_ring.urdf rename to examples/pybullet/gym/pybullet_data/differential/diff_ring.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_side.stl b/examples/pybullet/gym/pybullet_data/differential/diff_side.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_side.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_side.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_spider.stl b/examples/pybullet/gym/pybullet_data/differential/diff_spider.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_spider.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_spider.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_spider_shaft.stl b/examples/pybullet/gym/pybullet_data/differential/diff_spider_shaft.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_spider_shaft.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_spider_shaft.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/diff_stand.stl b/examples/pybullet/gym/pybullet_data/differential/diff_stand.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/diff_stand.stl rename to examples/pybullet/gym/pybullet_data/differential/diff_stand.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/differential/modelorigin.txt b/examples/pybullet/gym/pybullet_data/differential/modelorigin.txt similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/differential/modelorigin.txt rename to examples/pybullet/gym/pybullet_data/differential/modelorigin.txt diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/kuka_with_gripper.sdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/kuka_with_gripper.sdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/kuka_with_gripper.sdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/kuka_with_gripper.sdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/kuka_with_gripper2.sdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/kuka_with_gripper2.sdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/kuka_with_gripper2.sdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/kuka_with_gripper2.sdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/kuka_world.sdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/kuka_world.sdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/kuka_world.sdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/kuka_world.sdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_base_left.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_base_left.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_base_left.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_base_left.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_base_right.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_base_right.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_base_right.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_base_right.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_tip_left.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_tip_left.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_tip_left.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_tip_left.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_tip_right.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_tip_right.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/finger_tip_right.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/finger_tip_right.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_0.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_0.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_0.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_0.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_0.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_0.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_0.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_0.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_0.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_0.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_0.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_0.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_1.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_1.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_1.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_1.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_1.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_1.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_1.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_1.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_1.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_1.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_1.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_1.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_2.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_2.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_2.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_2.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_2.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_2.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_2.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_2.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_2.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_2.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_2.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_2.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_3.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_3.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_3.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_3.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_3.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_3.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_3.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_3.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_3.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_3.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_3.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_3.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_4.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_4.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_4.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_4.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_4.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_4.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_4.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_4.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_4.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_4.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_4.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_4.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_5.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_5.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_5.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_5.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_5.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_5.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_5.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_5.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_5.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_5.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_5.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_5.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_6.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_6.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_6.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_6.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_6.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_6.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_6.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_6.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_6.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_6.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_6.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_6.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_7.mtl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_7.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_7.mtl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_7.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_7.obj b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_7.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_7.obj rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_7.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_7.stl b/examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_7.stl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/meshes/link_7.stl rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/meshes/link_7.stl diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model.sdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/model.sdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model.sdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/model.sdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model.urdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/model.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model.urdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/model.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model2.sdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/model2.sdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model2.sdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/model2.sdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model_for_sdf.urdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/model_for_sdf.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model_for_sdf.urdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/model_for_sdf.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model_free_base.urdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/model_free_base.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model_free_base.urdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/model_free_base.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model_vr_limits.urdf b/examples/pybullet/gym/pybullet_data/kuka_iiwa/model_vr_limits.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/kuka_iiwa/model_vr_limits.urdf rename to examples/pybullet/gym/pybullet_data/kuka_iiwa/model_vr_limits.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/ant.xml b/examples/pybullet/gym/pybullet_data/mjcf/ant.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/ant.xml rename to examples/pybullet/gym/pybullet_data/mjcf/ant.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/capsule.xml b/examples/pybullet/gym/pybullet_data/mjcf/capsule.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/capsule.xml rename to examples/pybullet/gym/pybullet_data/mjcf/capsule.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/capsule_fromtoX.xml b/examples/pybullet/gym/pybullet_data/mjcf/capsule_fromtoX.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/capsule_fromtoX.xml rename to examples/pybullet/gym/pybullet_data/mjcf/capsule_fromtoX.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/capsule_fromtoY.xml b/examples/pybullet/gym/pybullet_data/mjcf/capsule_fromtoY.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/capsule_fromtoY.xml rename to examples/pybullet/gym/pybullet_data/mjcf/capsule_fromtoY.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/capsule_fromtoZ.xml b/examples/pybullet/gym/pybullet_data/mjcf/capsule_fromtoZ.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/capsule_fromtoZ.xml rename to examples/pybullet/gym/pybullet_data/mjcf/capsule_fromtoZ.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder.xml b/examples/pybullet/gym/pybullet_data/mjcf/cylinder.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder.xml rename to examples/pybullet/gym/pybullet_data/mjcf/cylinder.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder_fromtoX.xml b/examples/pybullet/gym/pybullet_data/mjcf/cylinder_fromtoX.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder_fromtoX.xml rename to examples/pybullet/gym/pybullet_data/mjcf/cylinder_fromtoX.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder_fromtoY.xml b/examples/pybullet/gym/pybullet_data/mjcf/cylinder_fromtoY.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder_fromtoY.xml rename to examples/pybullet/gym/pybullet_data/mjcf/cylinder_fromtoY.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder_fromtoZ.xml b/examples/pybullet/gym/pybullet_data/mjcf/cylinder_fromtoZ.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/cylinder_fromtoZ.xml rename to examples/pybullet/gym/pybullet_data/mjcf/cylinder_fromtoZ.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/ground.xml b/examples/pybullet/gym/pybullet_data/mjcf/ground.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/ground.xml rename to examples/pybullet/gym/pybullet_data/mjcf/ground.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/ground_plane.xml b/examples/pybullet/gym/pybullet_data/mjcf/ground_plane.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/ground_plane.xml rename to examples/pybullet/gym/pybullet_data/mjcf/ground_plane.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/half_cheetah.xml b/examples/pybullet/gym/pybullet_data/mjcf/half_cheetah.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/half_cheetah.xml rename to examples/pybullet/gym/pybullet_data/mjcf/half_cheetah.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/hello_mjcf.xml b/examples/pybullet/gym/pybullet_data/mjcf/hello_mjcf.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/hello_mjcf.xml rename to examples/pybullet/gym/pybullet_data/mjcf/hello_mjcf.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/hopper.xml b/examples/pybullet/gym/pybullet_data/mjcf/hopper.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/hopper.xml rename to examples/pybullet/gym/pybullet_data/mjcf/hopper.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid.xml b/examples/pybullet/gym/pybullet_data/mjcf/humanoid.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid.xml rename to examples/pybullet/gym/pybullet_data/mjcf/humanoid.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid_fixed.xml b/examples/pybullet/gym/pybullet_data/mjcf/humanoid_fixed.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid_fixed.xml rename to examples/pybullet/gym/pybullet_data/mjcf/humanoid_fixed.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid_symmetric.xml b/examples/pybullet/gym/pybullet_data/mjcf/humanoid_symmetric.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid_symmetric.xml rename to examples/pybullet/gym/pybullet_data/mjcf/humanoid_symmetric.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid_symmetric_no_ground.xml b/examples/pybullet/gym/pybullet_data/mjcf/humanoid_symmetric_no_ground.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/humanoid_symmetric_no_ground.xml rename to examples/pybullet/gym/pybullet_data/mjcf/humanoid_symmetric_no_ground.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/inverted_double_pendulum.xml b/examples/pybullet/gym/pybullet_data/mjcf/inverted_double_pendulum.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/inverted_double_pendulum.xml rename to examples/pybullet/gym/pybullet_data/mjcf/inverted_double_pendulum.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/inverted_pendulum.xml b/examples/pybullet/gym/pybullet_data/mjcf/inverted_pendulum.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/inverted_pendulum.xml rename to examples/pybullet/gym/pybullet_data/mjcf/inverted_pendulum.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/pusher.xml b/examples/pybullet/gym/pybullet_data/mjcf/pusher.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/pusher.xml rename to examples/pybullet/gym/pybullet_data/mjcf/pusher.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/reacher.xml b/examples/pybullet/gym/pybullet_data/mjcf/reacher.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/reacher.xml rename to examples/pybullet/gym/pybullet_data/mjcf/reacher.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/striker.xml b/examples/pybullet/gym/pybullet_data/mjcf/striker.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/striker.xml rename to examples/pybullet/gym/pybullet_data/mjcf/striker.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/swimmer.xml b/examples/pybullet/gym/pybullet_data/mjcf/swimmer.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/swimmer.xml rename to examples/pybullet/gym/pybullet_data/mjcf/swimmer.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/thrower.xml b/examples/pybullet/gym/pybullet_data/mjcf/thrower.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/thrower.xml rename to examples/pybullet/gym/pybullet_data/mjcf/thrower.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/mjcf/walker2d.xml b/examples/pybullet/gym/pybullet_data/mjcf/walker2d.xml similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/mjcf/walker2d.xml rename to examples/pybullet/gym/pybullet_data/mjcf/walker2d.xml diff --git a/examples/pybullet/gym/pybullet_envs/data/plane.mtl b/examples/pybullet/gym/pybullet_data/plane.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/plane.mtl rename to examples/pybullet/gym/pybullet_data/plane.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/plane.obj b/examples/pybullet/gym/pybullet_data/plane.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/plane.obj rename to examples/pybullet/gym/pybullet_data/plane.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/plane.urdf b/examples/pybullet/gym/pybullet_data/plane.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/plane.urdf rename to examples/pybullet/gym/pybullet_data/plane.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/LOG00076.TXT b/examples/pybullet/gym/pybullet_data/quadruped/LOG00076.TXT similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/LOG00076.TXT rename to examples/pybullet/gym/pybullet_data/quadruped/LOG00076.TXT diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/minitaur.urdf b/examples/pybullet/gym/pybullet_data/quadruped/minitaur.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/minitaur.urdf rename to examples/pybullet/gym/pybullet_data/quadruped/minitaur.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/minitaur_fixed_all.urdf b/examples/pybullet/gym/pybullet_data/quadruped/minitaur_fixed_all.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/minitaur_fixed_all.urdf rename to examples/pybullet/gym/pybullet_data/quadruped/minitaur_fixed_all.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/minitaur_fixed_knees.urdf b/examples/pybullet/gym/pybullet_data/quadruped/minitaur_fixed_knees.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/minitaur_fixed_knees.urdf rename to examples/pybullet/gym/pybullet_data/quadruped/minitaur_fixed_knees.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/quadruped.urdf b/examples/pybullet/gym/pybullet_data/quadruped/quadruped.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/quadruped.urdf rename to examples/pybullet/gym/pybullet_data/quadruped/quadruped.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/t-motor.jpg b/examples/pybullet/gym/pybullet_data/quadruped/t-motor.jpg similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/t-motor.jpg rename to examples/pybullet/gym/pybullet_data/quadruped/t-motor.jpg diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/tmotor.blend b/examples/pybullet/gym/pybullet_data/quadruped/tmotor.blend similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/tmotor.blend rename to examples/pybullet/gym/pybullet_data/quadruped/tmotor.blend diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/tmotor3.mtl b/examples/pybullet/gym/pybullet_data/quadruped/tmotor3.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/tmotor3.mtl rename to examples/pybullet/gym/pybullet_data/quadruped/tmotor3.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/quadruped/tmotor3.obj b/examples/pybullet/gym/pybullet_data/quadruped/tmotor3.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/quadruped/tmotor3.obj rename to examples/pybullet/gym/pybullet_data/quadruped/tmotor3.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/chassis.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/chassis.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/chassis.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/chassis.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/chassis.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/chassis.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/chassis.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/chassis.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/chassis_differential.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/chassis_differential.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/chassis_differential.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/chassis_differential.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/checker_blue.png b/examples/pybullet/gym/pybullet_data/racecar/meshes/checker_blue.png similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/checker_blue.png rename to examples/pybullet/gym/pybullet_data/racecar/meshes/checker_blue.png diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/cone.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/cone.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/cone.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/cone.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/cone.mtl b/examples/pybullet/gym/pybullet_data/racecar/meshes/cone.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/cone.mtl rename to examples/pybullet/gym/pybullet_data/racecar/meshes/cone.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/cone.obj b/examples/pybullet/gym/pybullet_data/racecar/meshes/cone.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/cone.obj rename to examples/pybullet/gym/pybullet_data/racecar/meshes/cone.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/hokuyo.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/hokuyo.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/hokuyo.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/hokuyo.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/hokuyo.mtl b/examples/pybullet/gym/pybullet_data/racecar/meshes/hokuyo.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/hokuyo.mtl rename to examples/pybullet/gym/pybullet_data/racecar/meshes/hokuyo.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/hokuyo.obj b/examples/pybullet/gym/pybullet_data/racecar/meshes/hokuyo.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/hokuyo.obj rename to examples/pybullet/gym/pybullet_data/racecar/meshes/hokuyo.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.mtl b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.mtl rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.obj b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_front_wheel.obj rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_front_wheel.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.mtl b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.mtl rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.obj b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_rear_wheel.obj rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_rear_wheel.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_steering_hinge.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_steering_hinge.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_steering_hinge.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_steering_hinge.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_steering_hinge.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/left_steering_hinge.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/left_steering_hinge.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/left_steering_hinge.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/parking_1.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/parking_1.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/parking_1.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/parking_1.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.mtl b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.mtl rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.obj b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_front_wheel.obj rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_front_wheel.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.mtl b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.mtl rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.obj b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_rear_wheel.obj rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_rear_wheel.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_steering_hinge.STL b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_steering_hinge.STL similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_steering_hinge.STL rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_steering_hinge.STL diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_steering_hinge.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/right_steering_hinge.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/right_steering_hinge.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/right_steering_hinge.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/walker_racecourse.dae b/examples/pybullet/gym/pybullet_data/racecar/meshes/walker_racecourse.dae similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/walker_racecourse.dae rename to examples/pybullet/gym/pybullet_data/racecar/meshes/walker_racecourse.dae diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/meshes/wheel.jpg b/examples/pybullet/gym/pybullet_data/racecar/meshes/wheel.jpg similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/meshes/wheel.jpg rename to examples/pybullet/gym/pybullet_data/racecar/meshes/wheel.jpg diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/racecar.urdf b/examples/pybullet/gym/pybullet_data/racecar/racecar.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/racecar.urdf rename to examples/pybullet/gym/pybullet_data/racecar/racecar.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/racecar/racecar_differential.urdf b/examples/pybullet/gym/pybullet_data/racecar/racecar_differential.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/racecar/racecar_differential.urdf rename to examples/pybullet/gym/pybullet_data/racecar/racecar_differential.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/part0.obj b/examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/part0.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/part0.obj rename to examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/part0.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/part1.obj b/examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/part1.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/part1.obj rename to examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/part1.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/part2.obj b/examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/part2.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/part2.obj rename to examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/part2.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/stadium.mtl b/examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/stadium.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/stadium.mtl rename to examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/stadium.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/stadium.obj b/examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/stadium.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/stadium.obj rename to examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/stadium.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/stadium_grass.jpg b/examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/stadium_grass.jpg similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/roboschool/models_outdoor/stadium/stadium_grass.jpg rename to examples/pybullet/gym/pybullet_data/roboschool/models_outdoor/stadium/stadium_grass.jpg diff --git a/examples/pybullet/gym/pybullet_envs/data/sphere2.urdf b/examples/pybullet/gym/pybullet_data/sphere2.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/sphere2.urdf rename to examples/pybullet/gym/pybullet_data/sphere2.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/sphere2red.urdf b/examples/pybullet/gym/pybullet_data/sphere2red.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/sphere2red.urdf rename to examples/pybullet/gym/pybullet_data/sphere2red.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/sphere_smooth.mtl b/examples/pybullet/gym/pybullet_data/sphere_smooth.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/sphere_smooth.mtl rename to examples/pybullet/gym/pybullet_data/sphere_smooth.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/sphere_smooth.obj b/examples/pybullet/gym/pybullet_data/sphere_smooth.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/sphere_smooth.obj rename to examples/pybullet/gym/pybullet_data/sphere_smooth.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/stadium.sdf b/examples/pybullet/gym/pybullet_data/stadium.sdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/stadium.sdf rename to examples/pybullet/gym/pybullet_data/stadium.sdf diff --git a/examples/pybullet/gym/pybullet_envs/data/table/table.mtl b/examples/pybullet/gym/pybullet_data/table/table.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/table/table.mtl rename to examples/pybullet/gym/pybullet_data/table/table.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/table/table.obj b/examples/pybullet/gym/pybullet_data/table/table.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/table/table.obj rename to examples/pybullet/gym/pybullet_data/table/table.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/table/table.png b/examples/pybullet/gym/pybullet_data/table/table.png similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/table/table.png rename to examples/pybullet/gym/pybullet_data/table/table.png diff --git a/examples/pybullet/gym/pybullet_envs/data/table/table.urdf b/examples/pybullet/gym/pybullet_data/table/table.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/table/table.urdf rename to examples/pybullet/gym/pybullet_data/table/table.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/textured_sphere_smooth.mtl b/examples/pybullet/gym/pybullet_data/textured_sphere_smooth.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/textured_sphere_smooth.mtl rename to examples/pybullet/gym/pybullet_data/textured_sphere_smooth.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/textured_sphere_smooth.obj b/examples/pybullet/gym/pybullet_data/textured_sphere_smooth.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/textured_sphere_smooth.obj rename to examples/pybullet/gym/pybullet_data/textured_sphere_smooth.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray.jpg b/examples/pybullet/gym/pybullet_data/tray/tray.jpg similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray.jpg rename to examples/pybullet/gym/pybullet_data/tray/tray.jpg diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray.urdf b/examples/pybullet/gym/pybullet_data/tray/tray.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray.urdf rename to examples/pybullet/gym/pybullet_data/tray/tray.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured.mtl b/examples/pybullet/gym/pybullet_data/tray/tray_textured.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured.mtl rename to examples/pybullet/gym/pybullet_data/tray/tray_textured.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured.obj b/examples/pybullet/gym/pybullet_data/tray/tray_textured.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured.obj rename to examples/pybullet/gym/pybullet_data/tray/tray_textured.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured2.mtl b/examples/pybullet/gym/pybullet_data/tray/tray_textured2.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured2.mtl rename to examples/pybullet/gym/pybullet_data/tray/tray_textured2.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured2.obj b/examples/pybullet/gym/pybullet_data/tray/tray_textured2.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured2.obj rename to examples/pybullet/gym/pybullet_data/tray/tray_textured2.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured2.urdf b/examples/pybullet/gym/pybullet_data/tray/tray_textured2.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured2.urdf rename to examples/pybullet/gym/pybullet_data/tray/tray_textured2.urdf diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured4.mtl b/examples/pybullet/gym/pybullet_data/tray/tray_textured4.mtl similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured4.mtl rename to examples/pybullet/gym/pybullet_data/tray/tray_textured4.mtl diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/tray_textured4.obj b/examples/pybullet/gym/pybullet_data/tray/tray_textured4.obj similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/tray_textured4.obj rename to examples/pybullet/gym/pybullet_data/tray/tray_textured4.obj diff --git a/examples/pybullet/gym/pybullet_envs/data/tray/traybox.urdf b/examples/pybullet/gym/pybullet_data/tray/traybox.urdf similarity index 100% rename from examples/pybullet/gym/pybullet_envs/data/tray/traybox.urdf rename to examples/pybullet/gym/pybullet_data/tray/traybox.urdf diff --git a/examples/pybullet/gym/pybullet_envs/baselines/__init__.py b/examples/pybullet/gym/pybullet_envs/baselines/__init__.py new file mode 100644 index 000000000..b67603479 --- /dev/null +++ b/examples/pybullet/gym/pybullet_envs/baselines/__init__.py @@ -0,0 +1,10 @@ +from . import enjoy_kuka_grasping +from . import enjoy_pybullet_cartpole +from . import enjoy_pybullet_racecar +from . import enjoy_pybullet_zed_racecar +from . import train_kuka_cam_grasping +from . import train_kuka_grasping +from . import train_pybullet_cartpole +from . import train_pybullet_racecar +from . import train_pybullet_zed_racecar + diff --git a/examples/pybullet/gym/pybullet_envs/examples/enjoy_kuka_grasping.py b/examples/pybullet/gym/pybullet_envs/baselines/enjoy_kuka_grasping.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/enjoy_kuka_grasping.py rename to examples/pybullet/gym/pybullet_envs/baselines/enjoy_kuka_grasping.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/enjoy_pybullet_cartpole.py b/examples/pybullet/gym/pybullet_envs/baselines/enjoy_pybullet_cartpole.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/enjoy_pybullet_cartpole.py rename to examples/pybullet/gym/pybullet_envs/baselines/enjoy_pybullet_cartpole.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/enjoy_pybullet_racecar.py b/examples/pybullet/gym/pybullet_envs/baselines/enjoy_pybullet_racecar.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/enjoy_pybullet_racecar.py rename to examples/pybullet/gym/pybullet_envs/baselines/enjoy_pybullet_racecar.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/enjoy_pybullet_zed_racecar.py b/examples/pybullet/gym/pybullet_envs/baselines/enjoy_pybullet_zed_racecar.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/enjoy_pybullet_zed_racecar.py rename to examples/pybullet/gym/pybullet_envs/baselines/enjoy_pybullet_zed_racecar.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/train_kuka_cam_grasping.py b/examples/pybullet/gym/pybullet_envs/baselines/train_kuka_cam_grasping.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/train_kuka_cam_grasping.py rename to examples/pybullet/gym/pybullet_envs/baselines/train_kuka_cam_grasping.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/train_kuka_grasping.py b/examples/pybullet/gym/pybullet_envs/baselines/train_kuka_grasping.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/train_kuka_grasping.py rename to examples/pybullet/gym/pybullet_envs/baselines/train_kuka_grasping.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/train_pybullet_cartpole.py b/examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/train_pybullet_cartpole.py rename to examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/train_pybullet_racecar.py b/examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_racecar.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/train_pybullet_racecar.py rename to examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_racecar.py diff --git a/examples/pybullet/gym/pybullet_envs/examples/train_pybullet_zed_racecar.py b/examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_zed_racecar.py similarity index 100% rename from examples/pybullet/gym/pybullet_envs/examples/train_pybullet_zed_racecar.py rename to examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_zed_racecar.py diff --git a/examples/pybullet/gym/pybullet_envs/bullet/bullet_client.py b/examples/pybullet/gym/pybullet_envs/bullet/bullet_client.py index c1ef9349d..6d4749eb9 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/bullet_client.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/bullet_client.py @@ -22,8 +22,5 @@ class BulletClient(object): """Inject the client id into Bullet functions.""" attribute = getattr(pybullet, name) if inspect.isbuiltin(attribute): - if name not in ["invertTransform", "computeViewMatrix","multiplyTransforms", - "getMatrixFromQuaternion"]: # A temporary hack for now. attribute = functools.partial(attribute, physicsClientId=self._client) return attribute - diff --git a/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py b/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py index 7d9aff36b..8559e16f7 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/cartpole_bullet.py @@ -2,7 +2,11 @@ Classic cart-pole system implemented by Rich Sutton et al. Copied from https://webdocs.cs.ualberta.ca/~sutton/book/code/pole.c """ -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +print ("current_dir=" + currentdir) +os.sys.path.insert(0,currentdir) + import logging import math import gym @@ -12,6 +16,7 @@ import numpy as np import time import subprocess import pybullet as p +import pybullet_data logger = logging.getLogger(__name__) @@ -76,7 +81,7 @@ class CartPoleBulletEnv(gym.Env): def _reset(self): # print("-----------reset simulation---------------") p.resetSimulation() - self.cartpole = p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","cartpole.urdf"),[0,0,0]) + self.cartpole = p.loadURDF(os.path.join(pybullet_data.getDataPath(),"cartpole.urdf"),[0,0,0]) self.timeStep = 0.01 p.setJointMotorControl2(self.cartpole, 1, p.VELOCITY_CONTROL, force=0) p.setGravity(0,0, -10) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/kuka.py b/examples/pybullet/gym/pybullet_envs/bullet/kuka.py index 445880411..ceab2fa1d 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/kuka.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/kuka.py @@ -1,12 +1,18 @@ -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +print ("current_dir=" + currentdir) +os.sys.path.insert(0,currentdir) + import pybullet as p import numpy as np import copy import math +import pybullet_data + class Kuka: - def __init__(self, urdfRootPath='', timeStep=0.01): + def __init__(self, urdfRootPath=pybullet_data.getDataPath(), timeStep=0.01): self.urdfRootPath = urdfRootPath self.timeStep = timeStep @@ -32,7 +38,7 @@ class Kuka: self.reset() def reset(self): - objects = p.loadSDF(os.path.join(os.path.dirname(__file__),"../data","kuka_iiwa/kuka_with_gripper2.sdf")) + objects = p.loadSDF(os.path.join(self.urdfRootPath,"kuka_iiwa/kuka_with_gripper2.sdf")) self.kukaUid = objects[0] #for i in range (p.getNumJoints(self.kukaUid)): # print(p.getJointInfo(self.kukaUid,i)) @@ -43,7 +49,7 @@ class Kuka: p.resetJointState(self.kukaUid,jointIndex,self.jointPositions[jointIndex]) p.setJointMotorControl2(self.kukaUid,jointIndex,p.POSITION_CONTROL,targetPosition=self.jointPositions[jointIndex],force=self.maxForce) - self.trayUid = p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","tray/tray.urdf"), 0.640000,0.075000,-0.190000,0.000000,0.000000,1.000000,0.000000) + self.trayUid = p.loadURDF(os.path.join(self.urdfRootPath,"tray/tray.urdf"), 0.640000,0.075000,-0.190000,0.000000,0.000000,1.000000,0.000000) self.endEffectorPos = [0.537,0.0,0.5] self.endEffectorAngle = 0 diff --git a/examples/pybullet/gym/pybullet_envs/bullet/kukaCamGymEnv.py b/examples/pybullet/gym/pybullet_envs/bullet/kukaCamGymEnv.py index cb2aa3986..581f56b43 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/kukaCamGymEnv.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/kukaCamGymEnv.py @@ -1,4 +1,8 @@ -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +print ("current_dir=" + currentdir) +os.sys.path.insert(0,currentdir) + import math import gym from gym import spaces @@ -8,6 +12,8 @@ import time import pybullet as p from . import kuka import random +import pybullet_data + class KukaCamGymEnv(gym.Env): metadata = { @@ -16,7 +22,7 @@ class KukaCamGymEnv(gym.Env): } def __init__(self, - urdfRoot="", + urdfRoot=pybullet_data.getDataPath(), actionRepeat=1, isEnableSelfCollision=True, renders=True): @@ -55,15 +61,15 @@ class KukaCamGymEnv(gym.Env): p.resetSimulation() p.setPhysicsEngineParameter(numSolverIterations=150) p.setTimeStep(self._timeStep) - p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","plane.urdf"),[0,0,-1]) + p.loadURDF(os.path.join(self._urdfRoot,"plane.urdf"),[0,0,-1]) - p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","table/table.urdf"), 0.5000000,0.00000,-.820000,0.000000,0.000000,0.0,1.0) + p.loadURDF(os.path.join(self._urdfRoot,"table/table.urdf"), 0.5000000,0.00000,-.820000,0.000000,0.000000,0.0,1.0) xpos = 0.5 +0.05*random.random() ypos = 0 +0.05*random.random() ang = 3.1415925438*random.random() orn = p.getQuaternionFromEuler([0,0,ang]) - self.blockUid =p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","block.urdf"), xpos,ypos,-0.1,orn[0],orn[1],orn[2],orn[3]) + self.blockUid =p.loadURDF(os.path.join(self._urdfRoot,"block.urdf"), xpos,ypos,-0.1,orn[0],orn[1],orn[2],orn[3]) p.setGravity(0,0,-10) self._kuka = kuka.Kuka(urdfRootPath=self._urdfRoot, timeStep=self._timeStep) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py b/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py index b2e96eeeb..56c9fb864 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/kukaGymEnv.py @@ -1,4 +1,8 @@ -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +print ("current_dir=" + currentdir) +os.sys.path.insert(0,currentdir) + import math import gym from gym import spaces @@ -8,6 +12,8 @@ import time import pybullet as p from . import kuka import random +import pybullet_data + class KukaGymEnv(gym.Env): metadata = { @@ -16,7 +22,7 @@ class KukaGymEnv(gym.Env): } def __init__(self, - urdfRoot="", + urdfRoot=pybullet_data.getDataPath(), actionRepeat=1, isEnableSelfCollision=True, renders=True): @@ -53,15 +59,15 @@ class KukaGymEnv(gym.Env): p.resetSimulation() p.setPhysicsEngineParameter(numSolverIterations=150) p.setTimeStep(self._timeStep) - p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","plane.urdf"),[0,0,-1]) + p.loadURDF(os.path.join(self._urdfRoot,"plane.urdf"),[0,0,-1]) - p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","table/table.urdf"), 0.5000000,0.00000,-.820000,0.000000,0.000000,0.0,1.0) + p.loadURDF(os.path.join(self._urdfRoot,"table/table.urdf"), 0.5000000,0.00000,-.820000,0.000000,0.000000,0.0,1.0) xpos = 0.5 +0.05*random.random() ypos = 0 +0.05*random.random() ang = 3.1415925438*random.random() orn = p.getQuaternionFromEuler([0,0,ang]) - self.blockUid =p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","block.urdf"), xpos,ypos,-0.1,orn[0],orn[1],orn[2],orn[3]) + self.blockUid =p.loadURDF(os.path.join(self._urdfRoot,"block.urdf"), xpos,ypos,-0.1,orn[0],orn[1],orn[2],orn[3]) p.setGravity(0,0,-10) self._kuka = kuka.Kuka(urdfRootPath=self._urdfRoot, timeStep=self._timeStep) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/minitaur.py b/examples/pybullet/gym/pybullet_envs/bullet/minitaur.py index 7e05c0ec1..c968f3731 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/minitaur.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/minitaur.py @@ -70,7 +70,7 @@ class Minitaur(object): kd_for_pd_controllers: kd value for the pd controllers of the motors. """ self.num_motors = 8 - self.num_legs = self.num_motors / 2 + self.num_legs = int(self.num_motors / 2) self._pybullet_client = pybullet_client self._urdf_root = urdf_root self._self_collision_enabled = self_collision_enabled @@ -114,7 +114,7 @@ class Minitaur(object): def _BuildJointNameToIdDict(self): num_joints = self._pybullet_client.getNumJoints(self.quadruped) self._joint_name_to_id = {} - for i in xrange(num_joints): + for i in range(num_joints): joint_info = self._pybullet_client.getJointInfo(self.quadruped, i) self._joint_name_to_id[joint_info[1].decode("UTF-8")] = joint_info[0] @@ -184,7 +184,7 @@ class Minitaur(object): Args: add_constraint: Whether to add a constraint at the joints of two feet. """ - for i in xrange(self.num_legs): + for i in range(self.num_legs): self._ResetPoseForLeg(i, add_constraint) def _ResetPoseForLeg(self, leg_id, add_constraint): @@ -368,7 +368,7 @@ class Minitaur(object): actual_torque, observed_torque = self._motor_model.convert_to_torque( motor_commands, q, qdot) if self._motor_overheat_protection: - for i in xrange(self.num_motors): + for i in range(self.num_motors): if abs(actual_torque[i]) > OVERHEAT_SHUTDOWN_TORQUE: self._overheat_counter[i] += 1 else: @@ -469,7 +469,7 @@ class Minitaur(object): offset_for_singularity = 1.5 half_num_motors = self.num_motors / 2 quater_pi = math.pi / 4 - for i in xrange(self.num_motors): + for i in range(self.num_motors): action_idx = i // 2 forward_backward_component = (-scale_for_singularity * quater_pi * ( actions[action_idx + half_num_motors] + offset_for_singularity)) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py b/examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py index 566c098ed..321377934 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py @@ -1,6 +1,13 @@ """This file implements the gym environment of minitaur. """ + +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(os.path.dirname(currentdir)) +os.sys.path.insert(0,parentdir) + + import math import time import gym @@ -11,6 +18,7 @@ import pybullet from . import bullet_client from . import minitaur import os +import pybullet_data NUM_SUBSTEPS = 5 NUM_MOTORS = 8 @@ -38,7 +46,7 @@ class MinitaurBulletEnv(gym.Env): } def __init__(self, - urdf_root=os.path.join(os.path.dirname(__file__),"../data"), + urdf_root=pybullet_data.getDataPath(), action_repeat=1, distance_weight=1.0, energy_weight=0.005, @@ -127,6 +135,7 @@ class MinitaurBulletEnv(gym.Env): self._hard_reset = True self._kd_for_pd_controllers = kd_for_pd_controllers self._last_frame_time = 0.0 + print("urdf_root=" + self._urdf_root) self._env_randomizer = env_randomizer # PD control needs smaller time step for stability. if pd_control_enabled or accurate_motor_model_enabled: @@ -160,7 +169,7 @@ class MinitaurBulletEnv(gym.Env): if self._hard_reset: self._pybullet_client.resetSimulation() self._pybullet_client.setPhysicsEngineParameter( - numSolverIterations=self._num_bullet_solver_iterations) + numSolverIterations=int(self._num_bullet_solver_iterations)) self._pybullet_client.setTimeStep(self._time_step) self._pybullet_client.loadURDF("%s/plane.urdf" % self._urdf_root) self._pybullet_client.setGravity(0, 0, -10) @@ -192,7 +201,7 @@ class MinitaurBulletEnv(gym.Env): self._pybullet_client.resetDebugVisualizerCamera( self._cam_dist, self._cam_yaw, self._cam_pitch, [0, 0, 0]) if not self._torque_control_enabled: - for _ in xrange(100): + for _ in range(100): if self._pd_control_enabled or self._accurate_motor_model_enabled: self.minitaur.ApplyAction([math.pi / 2] * 8) self._pybullet_client.stepSimulation() @@ -240,7 +249,7 @@ class MinitaurBulletEnv(gym.Env): self._pybullet_client.resetDebugVisualizerCamera( self._cam_dist, self._cam_yaw, self._cam_pitch, base_pos) action = self._transform_action_to_motor_command(action) - for _ in xrange(self._action_repeat): + for _ in range(self._action_repeat): self.minitaur.ApplyAction(action) self._pybullet_client.stepSimulation() diff --git a/examples/pybullet/gym/pybullet_envs/bullet/racecar.py b/examples/pybullet/gym/pybullet_envs/bullet/racecar.py index 55b9393ff..6b80c1bc1 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/racecar.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/racecar.py @@ -11,8 +11,8 @@ class Racecar: self._p = bullet_client self.reset() - def reset(self): - car = self._p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","racecar/racecar_differential.urdf"), [0,0,.2],useFixedBase=False) + def reset(self): + car = self._p.loadURDF(os.path.join(self.urdfRootPath,"racecar/racecar_differential.urdf"), [0,0,.2],useFixedBase=False) self.racecarUniqueId = car #for i in range (self._p.getNumJoints(car)): # print (self._p.getJointInfo(car,i)) diff --git a/examples/pybullet/gym/pybullet_envs/bullet/racecarGymEnv.py b/examples/pybullet/gym/pybullet_envs/bullet/racecarGymEnv.py index 1d4074262..35a5e586e 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/racecarGymEnv.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/racecarGymEnv.py @@ -1,4 +1,9 @@ import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(os.path.dirname(currentdir)) +os.sys.path.insert(0,parentdir) + import math import gym from gym import spaces @@ -9,6 +14,7 @@ import pybullet from . import racecar import random from . import bullet_client +import pybullet_data class RacecarGymEnv(gym.Env): metadata = { @@ -17,7 +23,7 @@ class RacecarGymEnv(gym.Env): } def __init__(self, - urdfRoot="", + urdfRoot=pybullet_data.getDataPath(), actionRepeat=50, isEnableSelfCollision=True, isDiscrete=False, @@ -59,8 +65,8 @@ class RacecarGymEnv(gym.Env): self._p.resetSimulation() #p.setPhysicsEngineParameter(numSolverIterations=300) self._p.setTimeStep(self._timeStep) - #self._p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","plane.urdf")) - stadiumobjects = self._p.loadSDF(os.path.join(os.path.dirname(__file__),"../data","stadium.sdf")) + #self._p.loadURDF(os.path.join(self._urdfRoot,"plane.urdf")) + stadiumobjects = self._p.loadSDF(os.path.join(self._urdfRoot,"stadium.sdf")) #move the stadium objects slightly above 0 #for i in stadiumobjects: # pos,orn = self._p.getBasePositionAndOrientation(i) @@ -74,7 +80,7 @@ class RacecarGymEnv(gym.Env): bally = dist * math.cos(ang) ballz = 1 - self._ballUniqueId = self._p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","sphere2.urdf"),[ballx,bally,ballz]) + self._ballUniqueId = self._p.loadURDF(os.path.join(self._urdfRoot,"sphere2.urdf"),[ballx,bally,ballz]) self._p.setGravity(0,0,-10) self._racecar = racecar.Racecar(self._p,urdfRootPath=self._urdfRoot, timeStep=self._timeStep) self._envStepCounter = 0 diff --git a/examples/pybullet/gym/pybullet_envs/bullet/racecarZEDGymEnv.py b/examples/pybullet/gym/pybullet_envs/bullet/racecarZEDGymEnv.py index 72b5f1630..5fcbd75f7 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/racecarZEDGymEnv.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/racecarZEDGymEnv.py @@ -1,4 +1,8 @@ -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(os.path.dirname(currentdir)) +os.sys.path.insert(0,parentdir) + import math import gym from gym import spaces @@ -9,6 +13,7 @@ import pybullet from . import bullet_client from . import racecar import random +import pybullet_data class RacecarZEDGymEnv(gym.Env): metadata = { @@ -17,7 +22,7 @@ class RacecarZEDGymEnv(gym.Env): } def __init__(self, - urdfRoot="", + urdfRoot=pybullet_data.getDataPath(), actionRepeat=10, isEnableSelfCollision=True, isDiscrete=True, @@ -57,7 +62,7 @@ class RacecarZEDGymEnv(gym.Env): #p.setPhysicsEngineParameter(numSolverIterations=300) self._p.setTimeStep(self._timeStep) #self._p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","plane.urdf")) - stadiumobjects = self._p.loadSDF(os.path.join(os.path.dirname(__file__),"../data","stadium.sdf")) + stadiumobjects = self._p.loadSDF(os.path.join(self._urdfRoot,"stadium.sdf")) #move the stadium objects slightly above 0 for i in stadiumobjects: pos,orn = self._p.getBasePositionAndOrientation(i) @@ -71,7 +76,7 @@ class RacecarZEDGymEnv(gym.Env): bally = dist * math.cos(ang) ballz = 1 - self._ballUniqueId = self._p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","sphere2red.urdf"),[ballx,bally,ballz]) + self._ballUniqueId = self._p.loadURDF(os.path.join(self._urdfRoot,"sphere2red.urdf"),[ballx,bally,ballz]) self._p.setGravity(0,0,-10) self._racecar = racecar.Racecar(self._p,urdfRootPath=self._urdfRoot, timeStep=self._timeStep) self._envStepCounter = 0 diff --git a/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoid.py b/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoid.py index 95150a22f..b0ea7aa40 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoid.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoid.py @@ -5,21 +5,26 @@ import copy import math import time +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +print ("current_dir=" + currentdir) +os.sys.path.insert(0,currentdir) + +import pybullet_data class SimpleHumanoid: - def __init__(self, urdfRootPath='', timeStep=0.01): + def __init__(self, urdfRootPath=pybullet_data.getDataPath(), timeStep=0.01): self.urdfRootPath = urdfRootPath self.timeStep = timeStep self.reset() - def reset(self): self.initial_z = None - objs = p.loadMJCF(os.path.join(os.path.dirname(__file__),"../data","mjcf/humanoid_symmetric_no_ground.xml"),flags = p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS) + objs = p.loadMJCF(os.path.join(self.urdfRootPath,"mjcf/humanoid_symmetric_no_ground.xml"),flags = p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS) self.human = objs[0] self.jdict = {} self.ordered_joints = [] diff --git a/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoidGymEnv.py b/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoidGymEnv.py index 57f54e0e5..d9c65e143 100644 --- a/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoidGymEnv.py +++ b/examples/pybullet/gym/pybullet_envs/bullet/simpleHumanoidGymEnv.py @@ -1,4 +1,9 @@ import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +print ("current_dir=" + currentdir) +os.sys.path.insert(0,currentdir) + import math import gym from gym import spaces @@ -9,6 +14,10 @@ import pybullet as p from . import simpleHumanoid import random + +import pybullet_data + + class SimpleHumanoidGymEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_array'], @@ -16,7 +25,7 @@ class SimpleHumanoidGymEnv(gym.Env): } def __init__(self, - urdfRoot="", + urdfRoot=pybullet_data.getDataPath(), actionRepeat=50, isEnableSelfCollision=True, renders=True): @@ -48,7 +57,7 @@ class SimpleHumanoidGymEnv(gym.Env): p.resetSimulation() #p.setPhysicsEngineParameter(numSolverIterations=300) p.setTimeStep(self._timeStep) - p.loadURDF(os.path.join(os.path.dirname(__file__),"../data","plane.urdf")) + p.loadURDF(os.path.join(self._urdfRoot,"plane.urdf")) dist = 5 +2.*random.random() ang = 2.*3.1415925438*random.random() diff --git a/examples/pybullet/gym/pybullet_envs/env_bases.py b/examples/pybullet/gym/pybullet_envs/env_bases.py index 494a86a74..04340da07 100644 --- a/examples/pybullet/gym/pybullet_envs/env_bases.py +++ b/examples/pybullet/gym/pybullet_envs/env_bases.py @@ -5,7 +5,7 @@ import pybullet as p class MJCFBaseBulletEnv(gym.Env): """ - Base class for MuJoCo .xml environments in a Scene. + Base class for Bullet physics simulation loading MJCF (MuJoCo .xml) environments in a Scene. These environments create single-player scenes and behave like normal Gym environments, if you don't use multiplayer. """ diff --git a/examples/pybullet/gym/pybullet_envs/examples/__init__.py b/examples/pybullet/gym/pybullet_envs/examples/__init__.py index ce46ab989..2b37605a2 100644 --- a/examples/pybullet/gym/pybullet_envs/examples/__init__.py +++ b/examples/pybullet/gym/pybullet_envs/examples/__init__.py @@ -7,17 +7,7 @@ from . import enjoy_TF_InvertedDoublePendulumBulletEnv_v0_2017may from . import enjoy_TF_InvertedPendulumBulletEnv_v0_2017may from . import enjoy_TF_InvertedPendulumSwingupBulletEnv_v0_2017may from . import enjoy_TF_Walker2DBulletEnv_v0_2017may -from . import enjoy_kuka_grasping -from . import enjoy_pybullet_cartpole -from . import enjoy_pybullet_racecar -from . import enjoy_pybullet_zed_racecar from . import kukaGymEnvTest from . import racecarGymEnvTest from . import racecarZEDGymEnvTest from . import simpleHumanoidGymEnvTest -from . import train_kuka_cam_grasping -from . import train_kuka_grasping -from . import train_pybullet_cartpole -from . import train_pybullet_racecar -from . import train_pybullet_zed_racecar - diff --git a/examples/pybullet/gym/pybullet_envs/examples/enjoy_TF_HopperBulletEnv_v0_2017may.py b/examples/pybullet/gym/pybullet_envs/examples/enjoy_TF_HopperBulletEnv_v0_2017may.py index 9cf845731..e260568c9 100644 --- a/examples/pybullet/gym/pybullet_envs/examples/enjoy_TF_HopperBulletEnv_v0_2017may.py +++ b/examples/pybullet/gym/pybullet_envs/examples/enjoy_TF_HopperBulletEnv_v0_2017may.py @@ -1,6 +1,5 @@ #add parent dir to find package. Only needed for source code build, pip install doesn't need it. -import os -import inspect +import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0,parentdir) diff --git a/examples/pybullet/gym/pybullet_envs/robot_bases.py b/examples/pybullet/gym/pybullet_envs/robot_bases.py index 4ff262723..125154615 100644 --- a/examples/pybullet/gym/pybullet_envs/robot_bases.py +++ b/examples/pybullet/gym/pybullet_envs/robot_bases.py @@ -1,7 +1,11 @@ import pybullet as p import gym, gym.spaces, gym.utils import numpy as np -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(os.path.dirname(currentdir)) +os.sys.path.insert(0,parentdir) +import pybullet_data class MJCFBasedRobot: @@ -83,10 +87,10 @@ class MJCFBasedRobot: if self.self_collision: self.parts, self.jdict, self.ordered_joints, self.robot_body = self.addToScene( - p.loadMJCF(os.path.join(os.path.dirname(__file__),"data/mjcf", self.model_xml), flags=p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS)) + p.loadMJCF(os.path.join(pybullet_data.getDataPath(),"mjcf", self.model_xml), flags=p.URDF_USE_SELF_COLLISION_EXCLUDE_ALL_PARENTS)) else: self.parts, self.jdict, self.ordered_joints, self.robot_body = self.addToScene( - p.loadMJCF(os.path.join(os.path.dirname(__file__),"data/mjcf", self.model_xml))) + p.loadMJCF(os.path.join(pybullet_data.getDataPath(),"mjcf", self.model_xml))) self.robot_specific_reset() diff --git a/examples/pybullet/gym/pybullet_envs/scene_stadium.py b/examples/pybullet/gym/pybullet_envs/scene_stadium.py index c66d8e9b6..fef1a2eb9 100644 --- a/examples/pybullet/gym/pybullet_envs/scene_stadium.py +++ b/examples/pybullet/gym/pybullet_envs/scene_stadium.py @@ -1,7 +1,14 @@ -import os +import os, inspect +currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) +parentdir = os.path.dirname(os.path.dirname(currentdir)) +os.sys.path.insert(0,parentdir) +import pybullet_data + + from .scene_abstract import Scene import pybullet as p + class StadiumScene(Scene): zero_at_running_strip_start_line = True # if False, center of coordinates (0,0,0) will be at the middle of the stadium stadium_halflen = 105*0.25 # FOOBALL_FIELD_HALFLEN @@ -12,10 +19,12 @@ class StadiumScene(Scene): # stadium_pose = cpp_household.Pose() # if self.zero_at_running_strip_start_line: # stadium_pose.set_xyz(27, 21, 0) # see RUN_STARTLINE, RUN_RAD constants - filename = os.path.join(os.path.dirname(__file__), "data", "stadium.sdf") + filename = os.path.join(pybullet_data.getDataPath(),"stadium.sdf") print(filename) self.stadium = p.loadSDF(filename) - self.ground_plane_mjcf = p.loadMJCF(os.path.join(os.path.dirname(__file__), "data","mjcf/ground_plane.xml")) + planeName = os.path.join(pybullet_data.getDataPath(),"mjcf/ground_plane.xml") + + self.ground_plane_mjcf = p.loadMJCF(planeName) for i in self.ground_plane_mjcf: p.changeVisualShape(i,-1,rgbaColor=[0,0,0,0]) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index d85a156ee..3bd3ece20 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -3958,11 +3958,20 @@ static PyObject* pybullet_rayTestBatch(PyObject* self, PyObject* args, PyObject* return Py_None; } -static PyObject* pybullet_getMatrixFromQuaternion(PyObject* self, PyObject* args) +static PyObject* pybullet_getMatrixFromQuaternion(PyObject* self, PyObject* args, PyObject* keywds) { PyObject* quatObj; double quat[4]; - if (PyArg_ParseTuple(args, "O", &quatObj)) + int physicsClientId=0; + static char* kwlist[] = {"quaternion","physicsClientId", NULL}; + + if (!PyArg_ParseTupleAndKeywords(args, keywds, "O|i", kwlist, &quatObj,&physicsClientId)) + { + return NULL; + } + + + if (quatObj) { if (pybullet_internalSetVector4d(quatObj, quat)) { @@ -7160,7 +7169,7 @@ static PyMethodDef SpamMethods[] = { {"invertTransform", (PyCFunction) pybullet_invertTransform, METH_VARARGS | METH_KEYWORDS, "Invert a transform, provided as [position], [quaternion]."}, - {"getMatrixFromQuaternion", pybullet_getMatrixFromQuaternion, METH_VARARGS, + {"getMatrixFromQuaternion", (PyCFunction)pybullet_getMatrixFromQuaternion, METH_VARARGS| METH_KEYWORDS, "Compute the 3x3 matrix from a quaternion, as a list of 9 values (row-major)"}, {"calculateInverseDynamics", (PyCFunction)pybullet_calculateInverseDynamics, METH_VARARGS | METH_KEYWORDS, diff --git a/setup.py b/setup.py index 3288ad37c..f82142cdf 100644 --- a/setup.py +++ b/setup.py @@ -421,7 +421,7 @@ else: setup_py_dir = os.path.dirname(os.path.realpath(__file__)) need_files = [] -datadir = "examples/pybullet/gym/pybullet_envs" +datadir = "examples/pybullet/gym/pybullet_data" hh = setup_py_dir + "/" + datadir @@ -440,7 +440,7 @@ print("-----") setup( name = 'pybullet', - version='1.2.6', + version='1.2.7', description='Official Python Interface for the Bullet Physics SDK Robotics Simulator', long_description='pybullet is an easy to use Python module for physics simulation, robotics and machine learning based on the Bullet Physics SDK. With pybullet you can load articulated bodies from URDF, SDF and other file formats. pybullet provides forward dynamics simulation, inverse dynamics computation, forward and inverse kinematics and collision detection and ray intersection queries. Aside from physics simulation, pybullet supports to rendering, with a CPU renderer and OpenGL visualization and support for virtual reality headsets.', url='https://github.com/bulletphysics/bullet3', @@ -470,6 +470,6 @@ setup( 'Framework :: Robot Framework'], package_dir = { '': 'examples/pybullet/gym'}, packages=[x for x in find_packages('examples/pybullet/gym')], - package_data = { 'pybullet_envs': need_files } + package_data = { 'pybullet_data': need_files } )