implement specular, URDF non-standard specular part (see sphere2.urdf) and SDF specular support.

pybullet.changeVisualShape(obUid,linkIndex,specularColor=[R,G,B]) and Bullet C-API b3UpdateVisualShapeSpecularColor
Bug fixes in b3ResourcePath::findResourcePath resolution.
add stadium.sdf and roboschool/models_outdoor/stadium assets https://github.com/openai/roboschool/tree/master/roboschool/models_outdoor/stadium
minor fixes to obj2sdf
This commit is contained in:
Erwin Coumans
2017-06-01 12:32:44 -07:00
parent 439e8c84cf
commit 87293e835c
36 changed files with 78766 additions and 87 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
newmtl stadium_white
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
newmtl stadium_grass
Ka 0.000000 0.000000 0.000000
Kd 0.000000 0.500000 0.000000
Ks 0.000000 0.000000 0.000000
map_Kd stadium_grass.jpg
newmtl stadium_dirt
Ka 0.000000 0.000000 0.000000
Kd 0.600000 0.400000 0.000000
Ks 0.000000 0.000000 0.000000

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -18,6 +18,7 @@
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
<specular rgb="11 1 1"/>
</material>
</visual>
<collision>

108
data/stadium.sdf Normal file
View File

@@ -0,0 +1,108 @@
<sdf version='1.6'>
<world name='default'>
<gravity>0 0 -9.8</gravity>
<model name='roboschool/models_outdoor/stadium/part0.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<link name='link_d0'>
<inertial>
<mass>0</mass>
<inertia>
<ixx>0.166667</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.166667</iyy>
<iyz>0</iyz>
<izz>0.166667</izz>
</inertia>
</inertial>
<visual name='visual'>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>roboschool/models_outdoor/stadium/part0.obj</uri>
</mesh>
</geometry>
<material>
<ambient>1 1 1 1</ambient>
<diffuse>1.00000 1.00000 1.000000 1</diffuse>
<specular>0.1 .1 .1 1</specular>
<emissive>0 0 0 0</emissive>
</material>
</visual>
</link>
</model>
<model name='roboschool/models_outdoor/stadium/part1.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<link name='link_d1'>
<inertial>
<mass>0</mass>
<inertia>
<ixx>0.166667</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.166667</iyy>
<iyz>0</iyz>
<izz>0.166667</izz>
</inertia>
</inertial>
<collision name='collision_1'>
<pose frame=''>0 0 -0.5 0 0 0</pose>
<geometry>
<box>
<size>100 100 1</size>
</box>
</geometry>
</collision>
<visual name='visual'>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>roboschool/models_outdoor/stadium/part1.obj</uri>
</mesh>
</geometry>
<material>
<ambient>1 1 1 1</ambient>
<diffuse>0.600000 0.400000 0.000000 1</diffuse>
<specular>.5 .5 .5 1</specular>
<emissive>0 0 0 0</emissive>
</material>
</visual>
</link>
</model>
<model name='part2.obj'>
<static>1</static>
<pose frame=''>0 0 0 0 0 0</pose>
<link name='link_d2'>
<inertial>
<mass>0</mass>
<inertia>
<ixx>0.166667</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.166667</iyy>
<iyz>0</iyz>
<izz>0.166667</izz>
</inertia>
</inertial>
<visual name='visual'>
<geometry>
<mesh>
<scale>1 1 1</scale>
<uri>roboschool/models_outdoor/stadium/part2.obj</uri>
</mesh>
</geometry>
<material>
<ambient>1 0 0 1</ambient>
<diffuse>0.000000 0.500000 0.000000 1</diffuse>
<specular>0.4 0.4 0.4 1</specular>
<emissive>0 0 0 0</emissive>
</material>
</visual>
</link>
</model>
</world>
</sdf>

View File

@@ -20,7 +20,7 @@
<collision name='collision'>
<geometry>
<plane>
<normal>1 2 3</normal>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
@@ -46,7 +46,7 @@
<cast_shadows>0</cast_shadows>
<geometry>
<plane>
<normal>4 5 6</normal>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
@@ -102,6 +102,8 @@
</inertial>
<collision name='collision'>
<geometry>
<pose frame=''>0 0 -1 0 0 0</pose>
<box>
<size>1 1 1</size>
</box>
@@ -154,26 +156,7 @@
<izz>0.166667</izz>
</inertia>
</inertial>
<collision name='collision'>
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
<max_contacts>10</max_contacts>
<surface>
<contact>
<ode/>
</contact>
<bounce/>
<friction>
<torsional>
<ode/>
</torsional>
<ode/>
</friction>
</surface>
</collision>
<visual name='visual'>
<geometry>
<mesh>