PyBullet Humanoid Flagrun Harder: disable collision on target red sphere

This commit is contained in:
erwincoumans
2018-01-24 18:02:24 -08:00
parent aba4671358
commit 583b23ea40
2 changed files with 22 additions and 1 deletions

View File

@@ -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>

View File

@@ -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]