From 2e1b84487b840084ecf03cd88ccf8d6a2a4522da Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Mon, 21 Sep 2020 16:11:52 -0700 Subject: [PATCH] Add a soccerball obj/urdf, hand-modeled in Blender, using guidance from https://www.youtube.com/watch?v=N93n6hPsqkI (but using texture mapping so the export to OBJ works in PyBullet) --- examples/pybullet/examples/soccerball.py | 17 + .../pybullet/gym/pybullet_data/colors16.png | Bin 0 -> 953 bytes .../pybullet/gym/pybullet_data/soccerball.mtl | 13 + .../pybullet/gym/pybullet_data/soccerball.obj | 20686 ++++++++++++++++ .../gym/pybullet_data/soccerball.urdf | 32 + 5 files changed, 20748 insertions(+) create mode 100644 examples/pybullet/examples/soccerball.py create mode 100644 examples/pybullet/gym/pybullet_data/colors16.png create mode 100644 examples/pybullet/gym/pybullet_data/soccerball.mtl create mode 100644 examples/pybullet/gym/pybullet_data/soccerball.obj create mode 100644 examples/pybullet/gym/pybullet_data/soccerball.urdf diff --git a/examples/pybullet/examples/soccerball.py b/examples/pybullet/examples/soccerball.py new file mode 100644 index 000000000..dae6acd8b --- /dev/null +++ b/examples/pybullet/examples/soccerball.py @@ -0,0 +1,17 @@ +import pybullet as p +import pybullet_data as pd +import time +p.connect(p.GUI) +p.setAdditionalSearchPath(pd.getDataPath()) +offset = 0 +for scale in range (1,10,1): + ball = p.loadURDF("soccerball.urdf",[offset,0,1], globalScaling=scale*0.1) + p.changeDynamics(ball,-1,linearDamping=0, angularDamping=0, rollingFriction=0.001, spinningFriction=0.001) + p.changeVisualShape(ball,-1,rgbaColor=[0.8,0.8,0.8,1]) + offset += 2*scale*0.1 +p.loadURDF("plane.urdf") +p.setGravity(0,0,-10) +p.setRealTimeSimulation(1) +while p.isConnected(): + #p.getCameraImage(320,200, renderer=p.ER_BULLET_HARDWARE_OPENGL) + time.sleep(0.5) diff --git a/examples/pybullet/gym/pybullet_data/colors16.png b/examples/pybullet/gym/pybullet_data/colors16.png new file mode 100644 index 0000000000000000000000000000000000000000..ecff56b44e00deffd73f388d03037a3c89649de3 GIT binary patch literal 953 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911L)MWvCLm;J7;u=xnT$Gwvl9`{U5R#dj z%HRuR7#S)Arxqv}85kKT7#dp{m|B@yDCink7#J{Zj(q^s$6n&;>&pIwQ&dEh?VWyI zDo}{Cz$3Dlfq`2Hgc&d0t@{HMWJ!1Qb!1@J*w6hZk(GggS-{i9F{I+w+p8CQ4><_1 zI{tP^m~i}Q(eo1xHYbj + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +