enable real time simulation

This commit is contained in:
Xuchen Han 2019-11-15 22:38:47 -08:00
parent 22fb2cfb5e
commit 6268911a43

View File

@ -12,6 +12,8 @@ planeId = p.loadURDF("plane.urdf", [0,0,-2])
boxId = p.loadURDF("cube.urdf", [0,3,2],useMaximalCoordinates = True)
bunnyId = p.loadSoftBody("torus.vtk", useNeoHookean = 1, NeoHookeanMu = 60, NeoHookeanLambda = 200, NeoHookeanDamping = 0.01, useSelfCollision = 1, frictionCoeff = 0.5)
p.setGravity(0, 0, -10)
p.setRealTimeSimulation(1)
while p.isConnected():
p.stepSimulation()
p.setGravity(0,0,-10)
sleep(1./240.)