PyBullet: soft bodies are rendered, so we don't need to also render wireframes in regular mode.
Use glBufferSubData instead of glMapBuffer/glUnmapBuffer, much faster soft body vertex sync. Don't use a separate btSoftBodyWorldInfo, use the existing one in btSoftMultiBodyDynamicsWorld.
This commit is contained in:
@@ -6,15 +6,17 @@ physicsClient = p.connect(p.GUI)
|
||||
p.setGravity(0,0,-10)
|
||||
planeId = p.loadURDF("plane.urdf")
|
||||
bunnyId = p.loadSoftBody("bunny.obj")
|
||||
|
||||
p.loadURDF("cube_small.urdf",[1,0,1])
|
||||
useRealTimeSimulation = 1
|
||||
|
||||
if (useRealTimeSimulation):
|
||||
p.setRealTimeSimulation(1)
|
||||
|
||||
while 1:
|
||||
while p.isConnected():
|
||||
p.setGravity(0,0,-10)
|
||||
if (useRealTimeSimulation):
|
||||
p.setGravity(0,0,-10)
|
||||
|
||||
sleep(0.01) # Time in seconds.
|
||||
#p.getCameraImage(320,200,renderer=p.ER_BULLET_HARDWARE_OPENGL )
|
||||
else:
|
||||
p.stepSimulation()
|
||||
|
||||
Reference in New Issue
Block a user