diff options
author | erwincoumans <erwin.coumans@gmail.com> | 2018-01-24 18:02:24 -0800 |
---|---|---|
committer | erwincoumans <erwin.coumans@gmail.com> | 2018-01-24 18:02:24 -0800 |
commit | 583b23ea40aa23d557fa4c2f587c8ea0e56b2aef (patch) | |
tree | e295ea0839388d0d311632d09d1a9fbfbc4cb946 | |
parent | aba467135881a9975b954a1d8348fe981fcd7cdb (diff) | |
download | bullet3-583b23ea40aa23d557fa4c2f587c8ea0e56b2aef.tar.gz |
PyBullet Humanoid Flagrun Harder: disable collision on target red sphere
-rw-r--r-- | examples/pybullet/gym/pybullet_data/sphere2red_nocol.urdf | 21 | ||||
-rw-r--r-- | examples/pybullet/gym/pybullet_envs/robot_locomotors.py | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/examples/pybullet/gym/pybullet_data/sphere2red_nocol.urdf b/examples/pybullet/gym/pybullet_data/sphere2red_nocol.urdf new file mode 100644 index 000000000..f5db0a283 --- /dev/null +++ b/examples/pybullet/gym/pybullet_data/sphere2red_nocol.urdf @@ -0,0 +1,21 @@ +<?xml version="0.0" ?> +<robot name="urdf_robot"> + <link name="baseLink"> + <inertial> + <origin rpy="0 0 0" xyz="0 0 0"/> + <mass value="0.0"/> + <inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/> + </inertial> + <visual> + <origin rpy="0 0 0" xyz="0 0 0"/> + <geometry> + <mesh filename="sphere_smooth.obj" scale="0.5 0.5 0.5"/> + </geometry> + <material name="red"> + <color rgba="1 0.2 0.2 1"/> + <specular rgb="1 1 1"/> + </material> + </visual> + </link> +</robot> + diff --git a/examples/pybullet/gym/pybullet_envs/robot_locomotors.py b/examples/pybullet/gym/pybullet_envs/robot_locomotors.py index c8528eb6e..2dbb61810 100644 --- a/examples/pybullet/gym/pybullet_envs/robot_locomotors.py +++ b/examples/pybullet/gym/pybullet_envs/robot_locomotors.py @@ -202,7 +202,7 @@ def get_cube(x, y, z): def get_sphere(x, y, z): - body = p.loadURDF(os.path.join(pybullet_data.getDataPath(),"sphere2red.urdf"), x, y, z) + body = p.loadURDF(os.path.join(pybullet_data.getDataPath(),"sphere2red_nocol.urdf"), x, y, z) part_name, _ = p.getBodyInfo(body, 0) part_name = part_name.decode("utf8") bodies = [body] |